u-boot-sunxi icon indicating copy to clipboard operation
u-boot-sunxi copied to clipboard

How to compile u-boot with SPL

Open weiguixm opened this issue 8 years ago • 1 comments

To compile u-boot with SPL I have done the following operations:

  1. add the following definitions in include/configs/smdk2410.h:

define CONFIG_SPL

define CONFIG_SPL_BUILD

define CONFIG_SPL_FRAMEWORK

define CONFIG_SYS_ONENAND_BASE 0x4E000000

define CONFIG_SPL_TEXT_BASE 0x0

define CONFIG_SPL_SKIP_RELOCATE

define CONFIG_SPL_SERIAL_SUPPORT

  1. make distclean make smdk2410_defconfig make

and then, the compiler throwed a lot of error of multiple definition of functions like s3serial1_putc, s3serial1_getc and etc.

following is the fiction of the error messages: .... LD examples/standalone/hello_world OBJCOPY examples/standalone/hello_world.srec OBJCOPY examples/standalone/hello_world.bin LDS u-boot.lds LD u-boot drivers/serial/built-in.o: In function serial_putc_dev': /home/wxm/Desktop/work/u-boot-2015.10/drivers/serial/serial_s3c24x0.c:209: multiple definition ofs3serial1_putc' drivers/built-in.o:/home/wxm/Desktop/work/u-boot-2015.10/drivers/serial/serial_s3c24x0.c:209: first defined here drivers/serial/built-in.o: In function serial_stub_start': /home/wxm/Desktop/work/u-boot-2015.10/drivers/serial/serial.c:261: multiple definition ofs3serial1_puts' drivers/built-in.o:/home/wxm/Desktop/work/u-boot-2015.10/drivers/serial/serial.c:261: first defined here drivers/serial/built-in.o: In function serial_stub_start': /home/wxm/Desktop/work/u-boot-2015.10/drivers/serial/serial.c:261: multiple definition ofs3serial0_puts' drivers/built-in.o:/home/wxm/Desktop/work/u-boot-2015.10/drivers/serial/serial.c:261: first defined here drivers/serial/built-in.o: In function `serial_stub_start': .......

I can't find where the key point of the problem is. Is my operations wrong? Or miss some configurations.

It will be appreciate someone can offer some SPL related documents especially the configuration and compiling process of SPL.

weiguixm avatar Nov 06 '15 07:11 weiguixm

on the nightlies it's build like:

make CROSS_COMPILE=$CROSS_COMPILE O="$builddir" -j$JOBS ${board}_config
make CROSS_COMPILE=$CROSS_COMPILE O="$builddir" -j$JOBS all

prebuilts of the custodian go to http://dl.linux-sunxi.org/nightly/u-boot-sunxi/u-boot-sunxi-custodian-next/u-boot-sunxi-custodian-next-latest/ and prebuilts of sunxi machines in mainline (denx/master) to http://dl.linux-sunxi.org/nightly/u-boot-sunxi/u-boot-sunxi-mainline/u-boot-sunxi-mainline-latest/

amery avatar Nov 06 '15 10:11 amery