Nishanth Menon | efee070 | 2023-08-25 13:02:54 -0500 | [diff] [blame] | 1 | #include <env/ti/ti_common.env> |
Simon Glass | c484095 | 2023-07-30 21:01:45 -0600 | [diff] [blame] | 2 | #include <env/ti/mmc.env> |
| 3 | #include <env/ti/k3_dfu.env> |
Nikhil M Jain | 18efa42 | 2023-03-30 14:24:09 +0530 | [diff] [blame] | 4 | |
| 5 | findfdt= |
| 6 | if test $board_name = am64x_gpevm; then |
Andrew Davis | 5e1f436 | 2023-07-14 11:22:30 +0530 | [diff] [blame] | 7 | setenv name_fdt ti/k3-am642-evm.dtb; fi; |
Nikhil M Jain | 18efa42 | 2023-03-30 14:24:09 +0530 | [diff] [blame] | 8 | if test $board_name = am64x_skevm; then |
Andrew Davis | 5e1f436 | 2023-07-14 11:22:30 +0530 | [diff] [blame] | 9 | setenv name_fdt ti/k3-am642-sk.dtb; fi; |
Nikhil M Jain | 18efa42 | 2023-03-30 14:24:09 +0530 | [diff] [blame] | 10 | if test $name_fdt = undefined; then |
| 11 | echo WARNING: Could not determine device tree to use; fi; |
Kamlesh Gurudasani | 0812a30 | 2023-07-14 11:22:26 +0530 | [diff] [blame] | 12 | setenv fdtfile ${name_fdt} |
Nikhil M Jain | 18efa42 | 2023-03-30 14:24:09 +0530 | [diff] [blame] | 13 | name_kern=Image |
| 14 | console=ttyS2,115200n8 |
| 15 | args_all=setenv optargs earlycon=ns16550a,mmio32,0x02800000 ${mtdparts} |
| 16 | run_kern=booti ${loadaddr} ${rd_spec} ${fdtaddr} |
| 17 | |
Roger Quadros | ed5fbaf | 2023-10-05 16:06:42 +0300 | [diff] [blame^] | 18 | boot_targets=mmc1 mmc0 usb pxe dhcp |
Nikhil M Jain | 18efa42 | 2023-03-30 14:24:09 +0530 | [diff] [blame] | 19 | boot=mmc |
| 20 | mmcdev=1 |
| 21 | bootpart=1:2 |
| 22 | bootdir=/boot |
| 23 | rd_spec=- |
Nikhil M Jain | 18efa42 | 2023-03-30 14:24:09 +0530 | [diff] [blame] | 24 | |
| 25 | args_usb=run finduuid;setenv bootargs console=${console} |
| 26 | ${optargs} |
| 27 | root=PARTUUID=${uuid} rw |
| 28 | rootfstype=${mmcrootfstype} |
| 29 | init_usb=run args_all args_usb |
| 30 | get_fdt_usb=load usb ${bootpart} ${fdtaddr} ${bootdir}/${name_fdt} |
| 31 | get_overlay_usb= |
| 32 | fdt address ${fdtaddr}; |
| 33 | fdt resize 0x100000; |
| 34 | for overlay in $name_overlays; |
| 35 | do; |
| 36 | load usb ${bootpart} ${dtboaddr} ${bootdir}/${overlay} && fdt apply |
| 37 | ${dtboaddr}; |
| 38 | done; |
| 39 | get_kern_usb=load usb ${bootpart} ${loadaddr} |
| 40 | ${bootdir}/${name_kern} |
| 41 | get_fit_usb=load usb ${bootpart} ${addr_fit} |
| 42 | ${bootdir}/${name_fit} |
| 43 | usbboot=setenv boot usb; |
| 44 | setenv bootpart 0:2; |
| 45 | usb start; |
| 46 | run findfdt; |
| 47 | run init_usb; |
| 48 | run get_kern_usb; |
| 49 | run get_fdt_usb; |
| 50 | run run_kern; |