summaryrefslogtreecommitdiff
path: root/board/liebherr/btt/btt.env
blob: aaf0b8415d189c6d632491dd5462633ae85f8c77 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
bootmode=update
bootpri=mmc_mmc
bootsec=sf_swu
consdev=ttyAMA0
baudrate=115200
dtbfile=imx28-btt3-1.dtb
rootdev=/dev/mmcblk0p2
netdev=eth0
swufile=swupdate-image-btt3-upd.itb
sf_kernel_offset=0xA0000
sf_swu_size=0xF40000
ethact=FEC
arch=btt3
lwe_env=
	if dhcp ${loadaddr} ${hostname}/${lwe_uenv} ; then
	source ${loadaddr};
	fi
lwe_uenv=env_uboot_btt3.bin
do_update_mmc=
	if mmc rescan ; then
	mmc dev 0 ${update_mmc_part} ;
	if dhcp ${hostname}/${update_filename} ; then
	setexpr fw_sz ${filesize} / 0x200 ;
	setexpr fw_sz ${fw_sz} + 1 ;
	mmc write ${loadaddr} ${update_offset} ${fw_sz} ;
	fi ;
	fi
do_update_sf=
	if sf probe ; then
	if dhcp ${hostname}/${update_filename} ; then
	sf erase ${update_offset} +${filesize} ;
	sf write ${loadaddr} ${update_offset} ${filesize} ;
	fi ;
	fi
factory_reset=
	if sf probe ; then
	run update_swu ;
	setenv bootmode update ;
	saveenv ;
	fi
update_spl_filename=u-boot.sb
update_spl=
	setenv update_filename ${update_spl_filename} ;
	setenv update_offset 0 ;
	run do_update_sf
update_uboot_filename=u-boot.img
update_uboot=
	setenv update_filename ${update_uboot_filename} ;
	setenv update_offset 0x10000 ;
	run do_update_sf ;
	setenv update_mmc_part 1 ;
	setenv update_offset 0 ;
	run do_update_mmc ;
	setenv update_mmc_part 2 ;
	run do_update_mmc
update_kernel_filename=uImage
update_kernel=
	setenv update_mmc_part 1 ;
	setenv update_filename ${update_kernel_filename} ;
	setenv update_offset 0x800 ;
	run do_update_mmc ;
	setenv update_filename ${dtbfile} ;
	setenv update_offset 0x400 ;
	run do_update_mmc
update_swu=
	setenv update_filename ${swufile} ;
	setenv update_offset ${sf_kernel_offset} ;
	run do_update_sf
addcons=
	setenv bootargs ${bootargs}
	console=${consdev},${baudrate}
addip=
	setenv bootargs ${bootargs}
	ip=${ipaddr}:${serverip}:${gatewayip}:
		${netmask}:${hostname}:${netdev}:off
addmisc=
	setenv bootargs ${bootargs} ${miscargs}
addargs=run addcons addmisc
mmcload=
	mmc rescan ;
	mmc dev 0 1 ;
	mmc read ${loadaddr} 0x800 0x2000 ;
	mmc read ${dtbaddr} 0x400 0x80
netload=
	dhcp ${loadaddr} ${hostname}/${bootfile} ;
	tftp ${dtbaddr} ${hostname}/${dtbfile}
usbload=
	usb start ;
	load usb 0:1 ${loadaddr} ${bootfile}
miscargs=panic=1
mmcargs=setenv bootargs root=${rootdev} rw rootwait
nfsargs=
	setenv bootargs root=/dev/nfs rw
		nfsroot=${serverip}:${rootpath},v3,tcp
mmc_mmc=
	if run mmcload mmcargs addargs ; then
	bootm ${loadaddr} - ${dtbaddr} ;
	fi
mmc_nfs=
	if run mmcload nfsargs addip addargs ; then
	bootm ${loadaddr} - ${dtbaddr} ;
	fi
sf_mmc=
	if run sfload mmcargs addargs ; then
	bootm ${loadaddr} - ${dtbaddr} ;
	fi
sf_swu=
	if sf probe ; then
	sf read ${loadaddr} ${sf_kernel_offset} ${sf_swu_size} ;
	setenv bootargs root=/dev/ram0 rw ;
	run addargs ;
	bootm ${loadaddr}#conf-imx28-${arch}-${board_som_rev}.dtb ;
	fi
net_mmc=
	if run netload mmcargs addargs ; then
	bootm ${loadaddr} - ${dtbaddr} ;
	fi
net_nfs=
	if run netload nfsargs addip addargs ; then
	bootm ${loadaddr} - ${dtbaddr} ;
	fi
prebootcmd=
	if test ${envsaved} != y ; then ;
	setenv envsaved y ;
	saveenv ;
	fi ;
	if test ${bootmode} = normal ; then
	setenv bootdelay 0 ;
	setenv bootpri mmc_mmc ;
	elif test ${bootmode} = devel ; then
	setenv bootdelay 3 ;
	setenv bootpri net_mmc ;
	else
	if test ${bootmode} != update ; then
	echo Warning: unknown bootmode ${bootmode} ;
	fi ;
	setenv bootdelay 1 ;
	setenv bootpri sf_swu ;
	fi