| /* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */ |
| |
| boot_targets=mmc0 mmc1 |
| boot_fit=no |
| bootm_size=0x10000000 |
| cntr_addr=0x98000000 |
| cntr_file=os_cntr_signed.bin |
| console=ttyLP0,115200 earlycon |
| fdt_addr_r=0x83000000 |
| fdt_addr=0x83000000 |
| fdtfile=CONFIG_DEFAULT_FDT_FILE |
| image=Image |
| mmcpart=1 |
| mmcroot=/dev/mmcblk1p2 rootwait rw |
| mmcautodetect=yes |
| mmcargs=setenv bootargs ${jh_clk} ${mcore_clk} console=${console} root=${mmcroot} |
| prepare_mcore=setenv mcore_clk clk-imx93.mcore_booted |
| 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} |
| auth_os=auth_cntr ${cntr_addr} |
| boot_os=booti ${loadaddr} - ${fdt_addr_r} |
| mmcboot= |
| echo Booting from mmc ...; |
| run mmcargs; |
| if test ${sec_boot} = yes; then |
| if run auth_os; then |
| run boot_os; |
| else |
| echo ERR: failed to authenticate; |
| fi; |
| else |
| if run loadfdt; then |
| run boot_os; |
| else |
| echo WARN: Cannot load the DT; |
| fi; |
| fi; |
| netargs=setenv bootargs ${jh_clk} ${mcore_clk} console=${console} root=/dev/nfs |
| ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp |
| 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}; |
| if run auth_os; then |
| run boot_os; |
| else |
| echo ERR: failed to authenticate; |
| fi; |
| else |
| ${get_cmd} ${loadaddr} ${image}; |
| if ${get_cmd} ${fdt_addr_r} ${fdtfile}; then |
| run boot_os; |
| else |
| echo WARN: Cannot load the DT; |
| fi; |
| fi; |