Nikhil M Jain | 18efa42 | 2023-03-30 14:24:09 +0530 | [diff] [blame] | 1 | #include <environment/ti/ti_armv7_common.env> |
| 2 | #include <environment/ti/mmc.env> |
| 3 | #include <environment/ti/k3_dfu.env> |
| 4 | |
| 5 | findfdt= |
| 6 | if test $board_name = am64x_gpevm; then |
| 7 | setenv name_fdt k3-am642-evm.dtb; fi; |
| 8 | if test $board_name = am64x_skevm; then |
| 9 | setenv name_fdt k3-am642-sk.dtb; fi; |
| 10 | if test $name_fdt = undefined; then |
| 11 | echo WARNING: Could not determine device tree to use; fi; |
| 12 | name_kern=Image |
| 13 | console=ttyS2,115200n8 |
| 14 | args_all=setenv optargs earlycon=ns16550a,mmio32,0x02800000 ${mtdparts} |
| 15 | run_kern=booti ${loadaddr} ${rd_spec} ${fdtaddr} |
| 16 | |
| 17 | boot=mmc |
| 18 | mmcdev=1 |
| 19 | bootpart=1:2 |
| 20 | bootdir=/boot |
| 21 | rd_spec=- |
| 22 | init_mmc=run args_all args_mmc |
| 23 | get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${name_fdt} |
| 24 | get_overlay_mmc= |
| 25 | fdt address ${fdtaddr}; |
| 26 | fdt resize 0x100000; |
| 27 | for overlay in $name_overlays; |
| 28 | do; |
| 29 | load mmc ${bootpart} ${dtboaddr} ${bootdir}/${overlay} && |
| 30 | fdt apply ${dtboaddr}; |
| 31 | done; |
| 32 | get_kern_mmc=load mmc ${bootpart} ${loadaddr} |
| 33 | ${bootdir}/${name_kern} |
| 34 | get_fit_mmc=load mmc ${bootpart} ${addr_fit} |
| 35 | ${bootdir}/${name_fit} |
| 36 | partitions=name=rootfs,start=0,size=-,uuid=${uuid_gpt_rootfs} |
| 37 | |
| 38 | args_usb=run finduuid;setenv bootargs console=${console} |
| 39 | ${optargs} |
| 40 | root=PARTUUID=${uuid} rw |
| 41 | rootfstype=${mmcrootfstype} |
| 42 | init_usb=run args_all args_usb |
| 43 | get_fdt_usb=load usb ${bootpart} ${fdtaddr} ${bootdir}/${name_fdt} |
| 44 | get_overlay_usb= |
| 45 | fdt address ${fdtaddr}; |
| 46 | fdt resize 0x100000; |
| 47 | for overlay in $name_overlays; |
| 48 | do; |
| 49 | load usb ${bootpart} ${dtboaddr} ${bootdir}/${overlay} && fdt apply |
| 50 | ${dtboaddr}; |
| 51 | done; |
| 52 | get_kern_usb=load usb ${bootpart} ${loadaddr} |
| 53 | ${bootdir}/${name_kern} |
| 54 | get_fit_usb=load usb ${bootpart} ${addr_fit} |
| 55 | ${bootdir}/${name_fit} |
| 56 | usbboot=setenv boot usb; |
| 57 | setenv bootpart 0:2; |
| 58 | usb start; |
| 59 | run findfdt; |
| 60 | run init_usb; |
| 61 | run get_kern_usb; |
| 62 | run get_fdt_usb; |
| 63 | run run_kern; |