board_init.c file not compiled

Chan Kim ckim at
Thu Nov 18 08:53:28 CET 2021


I knew CONFIG_SPL_BUILD value is supposed to be set by the build system
(Makefille, during spl build).

But I found I had "config SPL_BUILD" with default "y" under my Kconfig in
the board directory.

Because this value was always "y", the board_init.c under common/init and
some other files were not compiled.

So I removed the SPL_BUILD in the board's Kconfig.


Chan Kim


From: Chan Kim <ckim at> 
Sent: Tuesday, November 16, 2021 7:06 PM
To: U-Boot Mailing List <u-boot at>
Subject: board_init.c file not compiled


Hello all,

I'm new to u-boot and having difficulty while trying to build u-boot for our
test board.(arm64, armv8)

I wanted to try the "SPL falcon" mode". The DDR is not ready yet in the

A small scp chip(cortex-M7) will initialize clk and will load
kernel(including initramfs), dtb, u-boot-spl, images to a small internal

And the AP chip will start from the u-boot-spl. (I know some low-level init
can be skipped)

I added SPL related config settings and ran this command.

make CROSS_COMPILE=aarch64-none-elf- ab21m_defconfig

make CROSS_COMPILE=aarch64-none-elf-

I see "u-boot/arch/arm/lib/crt0_64.S:88: undefined reference to
`board_init_f_alloc_reserve'" error during the u-boot build. (not related to

By comparing the build process with that of rk3036 board (arm board with
SUPPORT_SPL, no SUPPORT_TPL), I found in my case even common/board_init.c is
not compiled.

Where should I look? I'm reading the documents or build scripts here and
there but can't figure it out.

Thank you.

Chan Kim

More information about the U-Boot mailing list