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 |
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 | |
| 18 | boot=mmc |
| 19 | mmcdev=1 |
| 20 | bootpart=1:2 |
| 21 | bootdir=/boot |
| 22 | rd_spec=- |
| 23 | init_mmc=run args_all args_mmc |
| 24 | get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${name_fdt} |
| 25 | get_overlay_mmc= |
| 26 | fdt address ${fdtaddr}; |
| 27 | fdt resize 0x100000; |
| 28 | for overlay in $name_overlays; |
| 29 | do; |
| 30 | load mmc ${bootpart} ${dtboaddr} ${bootdir}/${overlay} && |
| 31 | fdt apply ${dtboaddr}; |
| 32 | done; |
| 33 | get_kern_mmc=load mmc ${bootpart} ${loadaddr} |
| 34 | ${bootdir}/${name_kern} |
| 35 | get_fit_mmc=load mmc ${bootpart} ${addr_fit} |
| 36 | ${bootdir}/${name_fit} |
| 37 | partitions=name=rootfs,start=0,size=-,uuid=${uuid_gpt_rootfs} |
| 38 | |
| 39 | args_usb=run finduuid;setenv bootargs console=${console} |
| 40 | ${optargs} |
| 41 | root=PARTUUID=${uuid} rw |
| 42 | rootfstype=${mmcrootfstype} |
| 43 | init_usb=run args_all args_usb |
| 44 | get_fdt_usb=load usb ${bootpart} ${fdtaddr} ${bootdir}/${name_fdt} |
| 45 | get_overlay_usb= |
| 46 | fdt address ${fdtaddr}; |
| 47 | fdt resize 0x100000; |
| 48 | for overlay in $name_overlays; |
| 49 | do; |
| 50 | load usb ${bootpart} ${dtboaddr} ${bootdir}/${overlay} && fdt apply |
| 51 | ${dtboaddr}; |
| 52 | done; |
| 53 | get_kern_usb=load usb ${bootpart} ${loadaddr} |
| 54 | ${bootdir}/${name_kern} |
| 55 | get_fit_usb=load usb ${bootpart} ${addr_fit} |
| 56 | ${bootdir}/${name_fit} |
| 57 | usbboot=setenv boot usb; |
| 58 | setenv bootpart 0:2; |
| 59 | usb start; |
| 60 | run findfdt; |
| 61 | run init_usb; |
| 62 | run get_kern_usb; |
| 63 | run get_fdt_usb; |
| 64 | run run_kern; |