Manually building Arm Trusted Firmware errors

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Manually building Arm Trusted Firmware errors

145 Views
minersrevolt
Contributor II

I am attempting to manually build the arm-trusted-firmware to de-couple it from Yocto. However I am running into linker errors that I'm not sure how to resolve and would appreciate any tips.

#!/bin/bash
# $ git branch
# * bsp40.0-2.5
export BUILDROOTPATH=$(pwd)/buildroot-fc/buildroot
export CROSS_COMPILE=$BUILDROOTPATH/output/host/bin/aarch64-linux-
export ARCH=aarch64
export PLAT=s32g399ardb3
export DTB_FILE_NAME=s32g399a-rdb3.dtb
export FIP_OFFSET_DELTA=0x20000
export HOSTCC=gcc
export HOSTSTRIP=true
export S32CC_USE_SCMI_PINCTRL=0
export S32CC_USE_SCMI_NVMEM=0
export S32_LINFLEX_BAUDRATE=115200
export MKIMAGE=$BUILDROOTPATH/output/images/mkimage
export MKIMAGE_CFG=$BUILDROOTPATH/images/output/u-boot-s32.cfgout
export BL33=$BUILDROOTPATH/output/images/u-boot.bin

make -C arm-trusted-firmware clean
make -C arm-trusted-firmware TF_LDFLAGS+=--no-warn-rwx-segments all

#########################################################
# --no-warn-rwx-segments used to bypass the below error #
#########################################################
# LD      /bitbucket/arm-trusted-firmware/build/fvp/release/bl1/bl1.elf
# /bitbucket/buildroot-fc/buildroot/output/host/bin/aarch64-linux-ld: warning: /bitbucket/arm-trusted-firmware/build/fvp/release/bl1/bl1.elf has a LOAD segment with RWX permissions

###################
# Linker problems #
###################
# PP      bl1/bl1.ld.S
# LD      /bitbucket/arm-trusted-firmware/build/fvp/release/bl1/bl1.elf
# /bitbucket/buildroot-fc/buildroot/output/host/bin/aarch64-linux-ld: /bitbucket/arm-trusted-firmware/build/fvp/release/bl1/arm_bl1_setup.o: in function `bl1_early_platform_setup':
# arm_bl1_setup.c:(.text.bl1_early_platform_setup+0xc): undefined reference to `plat_arm_interconnect_init'
# /bitbucket/buildroot-fc/buildroot/output/host/bin/aarch64-linux-ld: arm_bl1_setup.c:(.text.bl1_early_platform_setup+0x14): undefined reference to `plat_arm_interconnect_enter_coherency'
# /bitbucket/buildroot-fc/buildroot/output/host/bin/aarch64-linux-ld: /bitbucket/arm-trusted-firmware/build/fvp/release/bl1/arm_dyn_cfg.o: in function `arm_bl2_dyn_cfg_init':
# arm_dyn_cfg.c:(.text.arm_bl2_dyn_cfg_init+0x44): undefined reference to `get_bl_mem_params_node'
# /bitbucket/buildroot-fc/buildroot/output/host/bin/aarch64-linux-ld: /bitbucket/arm-trusted-firmware/build/fvp/release/bl1/errata_report.o: in function `errata_needs_reporting':
# errata_report.c:(.text.errata_needs_reporting+0x20): undefined reference to `spin_lock'
# /bitbucket/buildroot-fc/buildroot/output/host/bin/aarch64-linux-ld: errata_report.c:(.text.errata_needs_reporting+0x40): undefined reference to `spin_unlock'
# /bitbucket/buildroot-fc/buildroot/output/host/bin/aarch64-linux-ld: /bitbucket/arm-trusted-firmware/build/fvp/release/bl1/context_mgmt.o: in function `cm_init_context_by_index':
# context_mgmt.c:(.text.cm_init_context_by_index+0x18): undefined reference to `cm_get_context_by_index'
# /bitbucket/buildroot-fc/buildroot/output/host/bin/aarch64-linux-ld: /bitbucket/arm-trusted-firmware/build/fvp/release/bl1/plat_common.o: in function `platform_core_pos_helper':
# plat_common.c:(.text.platform_core_pos_helper+0x0): undefined reference to `plat_core_pos_by_mpidr'
# /bitbucket/buildroot-fc/buildroot/output/host/bin/aarch64-linux-ld: /bitbucket/arm-trusted-firmware/build/fvp/release/bl1/misc_helpers.o: in function `fixup_gdt_reloc':
# (.text.asm.fixup_gdt_reloc+0x4c): undefined reference to `__RELA_START__'
# /bitbucket/buildroot-fc/buildroot/output/host/bin/aarch64-linux-ld: (.text.asm.fixup_gdt_reloc+0x50): undefined reference to `__RELA_START__'
# /bitbucket/buildroot-fc/buildroot/output/host/bin/aarch64-linux-ld: (.text.asm.fixup_gdt_reloc+0x54): undefined reference to `__RELA_END__'
# /bitbucket/buildroot-fc/buildroot/output/host/bin/aarch64-linux-ld: (.text.asm.fixup_gdt_reloc+0x58): undefined reference to `__RELA_END__'
# /bitbucket/buildroot-fc/buildroot/output/host/bin/aarch64-linux-ld: /bitbucket/arm-trusted-firmware/build/fvp/release/bl1/platform_helpers.o: in function `plat_handle_uncontainable_ea':
# (.text.asm.plat_handle_uncontainable_ea+0x0): undefined reference to `report_unhandled_exception'
# /bitbucket/buildroot-fc/buildroot/output/host/bin/aarch64-linux-ld: /bitbucket/arm-trusted-firmware/build/fvp/release/bl1/platform_helpers.o: in function `plat_handle_double_fault':
# (.text.asm.plat_handle_double_fault+0x0): undefined reference to `report_unhandled_exception'
# /bitbucket/buildroot-fc/buildroot/output/host/bin/aarch64-linux-ld: /bitbucket/arm-trusted-firmware/build/fvp/release/bl1/platform_helpers.o: in function `plat_handle_el3_ea':
# (.text.asm.plat_handle_el3_ea+0x0): undefined reference to `report_unhandled_exception'
# make: *** [Makefile:1119: /bitbucket/arm-trusted-firmware/build/fvp/release/bl1/bl1.elf] Error 1
# make: Leaving directory '/bitbucket/arm-trusted-firmware'
0 Kudos
3 Replies

124 Views
Daniel-Aguirre
NXP TechSupport
NXP TechSupport

Hi,

We might be misunderstanding the overall inquiry. If so, we do apologize.

For the available information on regards of manually building TF-A, we understand that the steps you are doing are not the ones shown under the official BSP40.0 documentation.

Can you help us follow the steps shown under the BSP40.0 User Manual to understand if those provide the same outcome?

Please, let us know.

0 Kudos

109 Views
minersrevolt
Contributor II

Can you provide me a link to that documentation? The only one I've been able to find is for the BSP33.0 BSP and it only discusses what the AT-F is and not how to build it.

The main rationale is I intend on using the S32G3 without Yocto. 

0 Kudos

103 Views
Daniel-Aguirre
NXP TechSupport
NXP TechSupport

Hi,

Thanks for your feedback. If your account has the required access, you should be able to access it through the following steps:

- Sign in to your NXP account (Automotive, IoT & Industrial Solutions | NXP Semiconductors)
- Click on "My NXP Account" (top-right) and click on "Software Licensing and Support" under the "Licensing" section within the window it opens.
- This will redirect you to another page. In this new page, select the option "View Accounts" under the "Software accounts" section.
- This will again redirect you to another page. On this page, you should see an "Automotive SW - S32G - Linux BSP (Cortex-A53)" option, click on it.
- In here, select the BSP version you are looking (verifying is the same platform as the one you are developing), then click the option. In there, you should see the available documentation for the selected BSP version.

Please, let us know.

0 Kudos