blob: 834073919763b119104a75974365ecc4a4ec8f92 [file] [log] [blame]
initrd_addr=0x83800000
image=Image.gz
img_addr=0x82000000
console=ttyLP0,115200
fdt_addr_r=0x83000000
fdt_addr=0x83000000
cntr_addr=0x98000000
cntr_file=os_cntr_signed.bin
boot_fit=no
bootdir=/boot
fdt_file=undefined
bootm_size=0x10000000
mmcdev=0
mmcpart=1
mmcautodetect=yes
optargs=setenv bootargs ${bootargs} ${kernelargs};
mmcroot=root=/dev/mmcblk0p1
mmcargs=setenv bootargs ${jh_clk} console=${console} ${mmcroot} rootwait rw
loadbootscript=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${bootdir}/${script};
bootscript=echo Running bootscript from mmc ...; source
loadimage=load mmc ${mmcdev}:${mmcpart} ${img_addr} ${bootdir}/${image};
unzip ${img_addr} ${loadaddr}
findfdt=if test $fdt_file = undefined; then
setenv fdt_file CONFIG_DEFAULT_FDT_FILE ;
fi;
echo fdt_file=${fdt_file};
loadfdt=run findfdt;load mmc ${mmcdev}:${mmcpart} ${fdt_addr_r} ${bootdir}/${fdt_file}
loadcntr=fatload mmc ${mmcdev}:${mmcpart} ${cntr_addr} ${cntr_file}
auth_os=auth_cntr ${cntr_addr}
boot_os=booti ${loadaddr} - ${fdt_addr_r};
mmcboot=echo Booting from mmc ...;
run mmcargs;
run optargs;
if test ${sec_boot} = yes; then
if run auth_os; then
"run boot_os;
else
"echo ERR: failed to authenticate;
fi;
else
if test ${boot_fit} = yes || test ${boot_fit} = try; then
bootm ${loadaddr};
else
if run loadfdt; then
run boot_os;
else
echo WARN: Cannot load the DT;
fi;
fi;
fi;
netargs=setenv bootargs ${jh_clk} console=${console}
root=/dev/nfs
ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp
etboot=echo Booting from net ...;
run netargs;
run optargs;
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};
if run auth_os; then
"run boot_os;
else
"echo ERR: failed to authenticate;
fi;
else
${get_cmd} ${img_addr} ${image}; unzip ${img_addr} ${loadaddr};
if test ${boot_fit} = yes || test ${boot_fit} = try; then
bootm ${loadaddr};
else
run findfdt;
if ${get_cmd} ${fdt_addr_r} ${fdt_file}; 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;