blob: 4d27f16e8ca977a7aae3b0a557d3bfafb3323d4e [file] [log] [blame]
Nikhil M Jain18efa422023-03-30 14:24:09 +05301#include <environment/ti/ti_armv7_common.env>
2#include <environment/ti/mmc.env>
3#include <environment/ti/k3_dfu.env>
4
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=-
23init_mmc=run args_all args_mmc
24get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${name_fdt}
25get_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;
33get_kern_mmc=load mmc ${bootpart} ${loadaddr}
34 ${bootdir}/${name_kern}
35get_fit_mmc=load mmc ${bootpart} ${addr_fit}
36 ${bootdir}/${name_fit}
37partitions=name=rootfs,start=0,size=-,uuid=${uuid_gpt_rootfs}
38
39args_usb=run finduuid;setenv bootargs console=${console}
40 ${optargs}
41 root=PARTUUID=${uuid} rw
42 rootfstype=${mmcrootfstype}
43init_usb=run args_all args_usb
44get_fdt_usb=load usb ${bootpart} ${fdtaddr} ${bootdir}/${name_fdt}
45get_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;
53get_kern_usb=load usb ${bootpart} ${loadaddr}
54 ${bootdir}/${name_kern}
55get_fit_usb=load usb ${bootpart} ${addr_fit}
56 ${bootdir}/${name_fit}
57usbboot=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;