blob: efd736b99be4556598b49547ad6943b7b26d58ca [file] [log] [blame]
Nishanth Menonefee0702023-08-25 13:02:54 -05001#include <env/ti/ti_common.env>
Simon Glassc4840952023-07-30 21:01:45 -06002#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
Roger Quadrosed5fbaf2023-10-05 16:06:42 +030018boot_targets=mmc1 mmc0 usb pxe dhcp
Nikhil M Jain18efa422023-03-30 14:24:09 +053019boot=mmc
20mmcdev=1
21bootpart=1:2
22bootdir=/boot
23rd_spec=-
Nikhil M Jain18efa422023-03-30 14:24:09 +053024
25args_usb=run finduuid;setenv bootargs console=${console}
26 ${optargs}
27 root=PARTUUID=${uuid} rw
28 rootfstype=${mmcrootfstype}
29init_usb=run args_all args_usb
30get_fdt_usb=load usb ${bootpart} ${fdtaddr} ${bootdir}/${name_fdt}
31get_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;
39get_kern_usb=load usb ${bootpart} ${loadaddr}
40 ${bootdir}/${name_kern}
41get_fit_usb=load usb ${bootpart} ${addr_fit}
42 ${bootdir}/${name_fit}
43usbboot=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;