BPI-SINOVOIP / BPI-F2S-bsp

Supports Banana Pi BPI-F2S / BPI-F2P (SP7021) (uboot-2019.04 + Kernel 5.4.35)
12 stars 6 forks source link

u-boot-sp: boot_normal calls bootr #1

Open afaerber opened 4 years ago

afaerber commented 4 years ago

The default environment contains this in boot_normal: run uenvcmd; fatload mmc 1:1 ${loadaddr} ${bpi}/${board}/${service}/${kernel}; bootr

bootr is a Realtek-specific command and unavailable on SunPlus. It would need to be bootm with suitable arguments for kernel and DT.

However, even better would be to use U-Boot v2019.04's distro boot mechanism the way it's meant to be - bootcmd calling run distro_bootcmd, iterating over boot devices and potential binaries, which would avoid such hard-coded commands and gives the user much more flexibility, not to mention potential EBBR compliance.

wellslutw commented 4 years ago

The last two commands, fatload mmc 1:1 ${loadaddr} ${bpi}/${board}/${service}/${kernel}; bootr, in boot_normal will never be executed because run uenvcmd will never return. Defined in default uEnv.txt, the last command of uenvcmd is bootm ${kernel_addr_r} ... command. Refer to default uEnv.txt in folder sp-pack/sp7021/configs/default/linux/uEnv.txt.

To build SD card image, please run script build.sh in top folder. Choose 1 to make all (u-boot and kernel) and pack image. Choose 6 to install image into an SD card.