imx8ulp_evk: Move environment variables to .env file
Add board-specific environment variables to imx8ulp_evk.env for better maintainability. Define bsp_bootcmd in the environment to resolve the runtime error: "bsp_bootcmd" not defined. Signed-off-by: Alice Guo <alice.guo@nxp.com>
This commit is contained in:
@@ -0,0 +1,97 @@
|
||||
#ifdef CONFIG_AHAB_BOOT
|
||||
sec_boot=yes
|
||||
#else
|
||||
sec_boot=no
|
||||
#endif
|
||||
|
||||
jh_clk=
|
||||
jh_mmcboot=setenv jh_clk kvm.enable_virt_at_load=false clk_ignore_unused mem=896MB; run loadimage; \
|
||||
run mmcboot
|
||||
jh_netboot=setenv jh_clk kvm.enable_virt_at_load=false clk_ignore_unused mem=896MB; run netboot
|
||||
|
||||
initrd_addr=0x83800000
|
||||
scriptaddr=0x83500000
|
||||
splashimage=0x90000000
|
||||
kernel_addr_r=CONFIG_SYS_LOAD_ADDR
|
||||
fdtoverlay_addr_r=0x83040000
|
||||
fdt_addr_r=0x83000000
|
||||
fdt_addr=0x83000000
|
||||
cntr_addr=0x98000000
|
||||
emmc_dev=0
|
||||
sd_dev=2
|
||||
mmcdev=CONFIG_SYS_MMC_ENV_DEV
|
||||
mmcpart=1
|
||||
image=Image
|
||||
cntr_file=os_cntr_signed.bin
|
||||
fdtfile=CONFIG_DEFAULT_FDT_FILE
|
||||
console=ttyLP1,115200 earlycon
|
||||
bootm_size=0x10000000
|
||||
boot_fit=no
|
||||
mmcroot=/dev/mmcblk0p2 rootwait rw
|
||||
mmcautodetect=yes
|
||||
mmcargs=setenv bootargs ${jh_clk} console=${console} root=${mmcroot}
|
||||
netargs=setenv bootargs ${jh_clk} console=${console}
|
||||
root=/dev/nfs
|
||||
ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp
|
||||
loadbootscript=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};
|
||||
loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}
|
||||
loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr_r} ${fdtfile}
|
||||
loadcntr=fatload mmc ${mmcdev}:${mmcpart} ${cntr_addr} ${cntr_file}
|
||||
bootscript=echo Running bootscript from mmc ...; source
|
||||
auth_os=booti ${cntr_addr}
|
||||
boot_os=booti ${loadaddr} - ${fdt_addr_r}
|
||||
mmcboot=echo Booting from mmc ...;
|
||||
run mmcargs;
|
||||
if test ${sec_boot} = yes; then
|
||||
run auth_os;
|
||||
else
|
||||
if test ${boot_fit} = yes || test ${boot_fit} = try; then
|
||||
bootm ${loadaddr};
|
||||
else
|
||||
if run loadfdt loadimage; then
|
||||
run boot_os;
|
||||
else
|
||||
echo WARN: Cannot load the fdt and image;
|
||||
fi;
|
||||
fi;
|
||||
fi;
|
||||
netboot=echo Booting from net ...;
|
||||
run netargs;
|
||||
if test ${ip_dyn} = yes; then
|
||||
setenv get_cmd dhcp;
|
||||
else
|
||||
setenv get_cmd tftp;
|
||||
fi;
|
||||
if test ${sec_boot} = yes; then
|
||||
${get_cmd} ${cntr_addr} ${cntr_file};
|
||||
run auth_os;
|
||||
else
|
||||
${get_cmd} ${loadaddr} ${image};
|
||||
if test ${boot_fit} = yes || test ${boot_fit} = try; then
|
||||
bootm ${loadaddr};
|
||||
else
|
||||
if ${get_cmd} ${fdt_addr_r} ${fdtfile}; then
|
||||
run boot_os;
|
||||
else
|
||||
echo WARN: Cannot load the DT;
|
||||
fi;
|
||||
fi;
|
||||
fi;
|
||||
bsp_bootcmd=echo Running BSP bootcmd ...;
|
||||
mmc dev ${mmcdev}; if mmc rescan; then
|
||||
if run loadbootscript; then
|
||||
run bootscript;
|
||||
else
|
||||
if test ${sec_boot} = yes; then
|
||||
if run loadcntr; then
|
||||
run mmcboot;
|
||||
else run netboot;
|
||||
fi;
|
||||
else
|
||||
if run loadimage; then
|
||||
run mmcboot;
|
||||
else run netboot;
|
||||
fi;
|
||||
fi;
|
||||
fi;
|
||||
fi;
|
||||
@@ -29,7 +29,7 @@ CONFIG_FIT_VERBOSE=y
|
||||
CONFIG_BOOTSTD_FULL=y
|
||||
CONFIG_BOOTDELAY=0
|
||||
CONFIG_BOOTCOMMAND="bootflow scan -l; run bsp_bootcmd"
|
||||
CONFIG_DEFAULT_FDT_FILE="imx8ulp-evk"
|
||||
CONFIG_DEFAULT_FDT_FILE="imx8ulp-evk.dtb"
|
||||
CONFIG_SYS_CBSIZE=2048
|
||||
CONFIG_SYS_PBSIZE=2068
|
||||
CONFIG_BOARD_EARLY_INIT_F=y
|
||||
|
||||
@@ -21,20 +21,6 @@
|
||||
#define CFG_FEC_MXC_PHYADDR 1
|
||||
#endif
|
||||
|
||||
/* Initial environment variables */
|
||||
#define CFG_EXTRA_ENV_SETTINGS \
|
||||
"scriptaddr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
|
||||
"kernel_addr_r=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
|
||||
"image=Image\0" \
|
||||
"console=ttyLP1,115200 earlycon\0" \
|
||||
"fdt_addr_r=0x83000000\0" \
|
||||
"boot_fit=no\0" \
|
||||
"fdtfile=imx8ulp-evk.dtb\0" \
|
||||
"initrd_addr=0x83800000\0" \
|
||||
"bootm_size=0x10000000\0" \
|
||||
"mmcpart=1\0" \
|
||||
"mmcroot=/dev/mmcblk2p2 rootwait rw\0" \
|
||||
|
||||
/* Link Definitions */
|
||||
|
||||
#define CFG_SYS_INIT_RAM_ADDR 0x80000000
|
||||
|
||||
Reference in New Issue
Block a user