blob: 1567907fcbdc30b95af41ead8daa4abf3683425f [file] [log] [blame]
Simon Glassc4840952023-07-30 21:01:45 -06001#include <env/ti/ti_armv7_common.env>
2#include <env/ti/mmc.env>
3#include <env/ti/k3_dfu.env>
Nikhil M Jain18efa422023-03-30 14:24:09 +05304
5findfdt=
6 if test $board_name = am64x_gpevm; then
Andrew Davis5e1f4362023-07-14 11:22:30 +05307 setenv name_fdt ti/k3-am642-evm.dtb; fi;
Nikhil M Jain18efa422023-03-30 14:24:09 +05308 if test $board_name = am64x_skevm; then
Andrew Davis5e1f4362023-07-14 11:22:30 +05309 setenv name_fdt ti/k3-am642-sk.dtb; fi;
Nikhil M Jain18efa422023-03-30 14:24:09 +053010 if test $name_fdt = undefined; then
11 echo WARNING: Could not determine device tree to use; fi;
Kamlesh Gurudasani0812a302023-07-14 11:22:26 +053012 setenv fdtfile ${name_fdt}
Nikhil M Jain18efa422023-03-30 14:24:09 +053013name_kern=Image
14console=ttyS2,115200n8
15args_all=setenv optargs earlycon=ns16550a,mmio32,0x02800000 ${mtdparts}
16run_kern=booti ${loadaddr} ${rd_spec} ${fdtaddr}
17
18boot=mmc
19mmcdev=1
20bootpart=1:2
21bootdir=/boot
22rd_spec=-
Nikhil M Jain18efa422023-03-30 14:24:09 +053023
24args_usb=run finduuid;setenv bootargs console=${console}
25 ${optargs}
26 root=PARTUUID=${uuid} rw
27 rootfstype=${mmcrootfstype}
28init_usb=run args_all args_usb
29get_fdt_usb=load usb ${bootpart} ${fdtaddr} ${bootdir}/${name_fdt}
30get_overlay_usb=
31 fdt address ${fdtaddr};
32 fdt resize 0x100000;
33 for overlay in $name_overlays;
34 do;
35 load usb ${bootpart} ${dtboaddr} ${bootdir}/${overlay} && fdt apply
36 ${dtboaddr};
37 done;
38get_kern_usb=load usb ${bootpart} ${loadaddr}
39 ${bootdir}/${name_kern}
40get_fit_usb=load usb ${bootpart} ${addr_fit}
41 ${bootdir}/${name_fit}
42usbboot=setenv boot usb;
43 setenv bootpart 0:2;
44 usb start;
45 run findfdt;
46 run init_usb;
47 run get_kern_usb;
48 run get_fdt_usb;
49 run run_kern;