新手从零编译uboot源码(三),配置 uboot spl ,编译 SPL 代码

第一步: 在 uboot根目录下Kconfig 文件中增加 4行代码,如下

config SUPPORT_SPL
	bool "SUPPORT_SPL suozhang"
config SPL
	bool "SPL suozhang"

具体位置:

menu "Boot images"

config ANDROID_BOOT_IMAGE
	bool "Enable support for Android Boot Images"
	default y if FASTBOOT
	help
	  This enables support for booting images which use the Android
	  image format header.

config SUPPORT_SPL
	bool "SUPPORT_SPL suozhang"
config SPL
	bool "SPL suozhang"

config FIT
	bool "Support Flattened Image Tree"
	select MD5
	select SHA1
	help
	  This option allows you to boot the new uImage structure,
	  Flattened Image Tree.  FIT is formally a FDT, which can include
	  images of various types (kernel, FDT blob, ramdisk, etc.)
	  in a single blob.  To boot this new uImage structure,
	  pass the address of the blob to the "bootm" command.
	  FIT is very flexible, supporting compression, multiple images,
	  multiple configurations, verification through hashing and also
	  verified boot (secure boot using RSA).

第二步:在uboot根目录configs/s5pv210_goni_suozhang_defconfig文件中 增加下面两行宏定义:

CONFIG_SUPPORT_SPL=y
CONFIG_SPL=y

第三步: make s5pv210_goni_suozhang_defconfig

第四步:make,发现以下错误,初步判定是 这些函数未定义,估计要自己实现

common/spl/built-in.o: In function `board_boot_order':
/home/suozhang/linux/u-boot-2018.11/common/spl/spl.c:404: undefined reference to `spl_boot_device'
common/spl/built-in.o: In function `board_init_r':
/home/suozhang/linux/u-boot-2018.11/common/spl/spl.c:493: undefined reference to `hang'
/home/suozhang/linux/u-boot-2018.11/common/spl/spl.c:500: undefined reference to `timer_init'
/home/suozhang/linux/u-boot-2018.11/common/spl/spl.c:504: undefined reference to `spl_board_init'
make[1]: *** [spl/u-boot-spl] Error 1
make: *** [spl/u-boot-spl] Error 2
[root@VM_0_3_centos u-boot-2018.11]# 

你可能感兴趣的:(uboot,uboot,SPL,S5PV210)