blob: c3960be38e32f663589f82a102d331c51dfa378e [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
7 setenv name_fdt k3-am642-evm.dtb; fi;
8 if test $board_name = am64x_skevm; then
9 setenv name_fdt k3-am642-sk.dtb; fi;
10 if test $name_fdt = undefined; then
11 echo WARNING: Could not determine device tree to use; fi;
12name_kern=Image
13console=ttyS2,115200n8
14args_all=setenv optargs earlycon=ns16550a,mmio32,0x02800000 ${mtdparts}
15run_kern=booti ${loadaddr} ${rd_spec} ${fdtaddr}
16
17boot=mmc
18mmcdev=1
19bootpart=1:2
20bootdir=/boot
21rd_spec=-
22init_mmc=run args_all args_mmc
23get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${name_fdt}
24get_overlay_mmc=
25 fdt address ${fdtaddr};
26 fdt resize 0x100000;
27 for overlay in $name_overlays;
28 do;
29 load mmc ${bootpart} ${dtboaddr} ${bootdir}/${overlay} &&
30 fdt apply ${dtboaddr};
31 done;
32get_kern_mmc=load mmc ${bootpart} ${loadaddr}
33 ${bootdir}/${name_kern}
34get_fit_mmc=load mmc ${bootpart} ${addr_fit}
35 ${bootdir}/${name_fit}
36partitions=name=rootfs,start=0,size=-,uuid=${uuid_gpt_rootfs}
37
38args_usb=run finduuid;setenv bootargs console=${console}
39 ${optargs}
40 root=PARTUUID=${uuid} rw
41 rootfstype=${mmcrootfstype}
42init_usb=run args_all args_usb
43get_fdt_usb=load usb ${bootpart} ${fdtaddr} ${bootdir}/${name_fdt}
44get_overlay_usb=
45 fdt address ${fdtaddr};
46 fdt resize 0x100000;
47 for overlay in $name_overlays;
48 do;
49 load usb ${bootpart} ${dtboaddr} ${bootdir}/${overlay} && fdt apply
50 ${dtboaddr};
51 done;
52get_kern_usb=load usb ${bootpart} ${loadaddr}
53 ${bootdir}/${name_kern}
54get_fit_usb=load usb ${bootpart} ${addr_fit}
55 ${bootdir}/${name_fit}
56usbboot=setenv boot usb;
57 setenv bootpart 0:2;
58 usb start;
59 run findfdt;
60 run init_usb;
61 run get_kern_usb;
62 run get_fdt_usb;
63 run run_kern;