|
@@ -83,6 +83,49 @@ EOF
|
83
|
83
|
cp /usr/lib/linux-image-*-armmp/* /boot/dtbs
|
84
|
84
|
}
|
85
|
85
|
|
|
86
|
+beaglebone_wireless_setup_boot() {
|
|
87
|
+ # Setup uEnv.txt
|
|
88
|
+ if grep -q btrfs /etc/fstab ; then
|
|
89
|
+ fstype=btrfs
|
|
90
|
+ else
|
|
91
|
+ fstype=ext4
|
|
92
|
+ fi
|
|
93
|
+ kernelVersion=$(ls /usr/lib/*/am335x-boneblack-wireless.dtb | head -1 | cut -d/ -f4)
|
|
94
|
+ version=$(echo $kernelVersion | sed 's/linux-image-\(.*\)/\1/')
|
|
95
|
+ initRd=initrd.img-$version
|
|
96
|
+ vmlinuz=vmlinuz-$version
|
|
97
|
+
|
|
98
|
+ cat >> /boot/uEnv.txt <<EOF
|
|
99
|
+mmcroot=/dev/mmcblk0p2 ro
|
|
100
|
+mmcrootfstype=$fstype rootwait fixrtc
|
|
101
|
+mmcrootflags=subvol=@
|
|
102
|
+
|
|
103
|
+console=ttyO0,115200n8
|
|
104
|
+
|
|
105
|
+kernel_file=$vmlinuz
|
|
106
|
+initrd_file=$initRd
|
|
107
|
+
|
|
108
|
+loadaddr=0x82000000
|
|
109
|
+initrd_addr=0x88080000
|
|
110
|
+fdtaddr=0x88000000
|
|
111
|
+
|
|
112
|
+initrd_high=0xffffffff
|
|
113
|
+fdt_high=0xffffffff
|
|
114
|
+
|
|
115
|
+loadkernel=load mmc \${mmcdev}:\${mmcpart} \${loadaddr} \${kernel_file}
|
|
116
|
+loadinitrd=load mmc \${mmcdev}:\${mmcpart} \${initrd_addr} \${initrd_file}; setenv initrd_size \${filesize}
|
|
117
|
+loadfdt=load mmc \${mmcdev}:\${mmcpart} \${fdtaddr} /dtbs/\${fdtfile}
|
|
118
|
+
|
|
119
|
+loadfiles=run loadkernel; run loadinitrd; run loadfdt
|
|
120
|
+mmcargs=setenv bootargs console=tty0 console=\${console} root=\${mmcroot} rootfstype=\${mmcrootfstype} rootflags=\${mmcrootflags}
|
|
121
|
+
|
|
122
|
+uenvcmd=run loadfiles; run mmcargs; bootz \${loadaddr} \${initrd_addr}:\${initrd_size} \${fdtaddr}
|
|
123
|
+EOF
|
|
124
|
+
|
|
125
|
+ mkdir -p /boot/dtbs
|
|
126
|
+ cp /usr/lib/linux-image-*-armmp/* /boot/dtbs
|
|
127
|
+}
|
|
128
|
+
|
86
|
129
|
beaglebone_flash() {
|
87
|
130
|
# allow flash-kernel to work without valid /proc contents
|
88
|
131
|
# ** this doesn't *really* work, since there are too many checks
|
|
@@ -191,7 +234,6 @@ EOF
|
191
|
234
|
}
|
192
|
235
|
|
193
|
236
|
function generic_beaglebone_steup {
|
194
|
|
- beaglebone_setup_boot
|
195
|
237
|
beaglebone_flash
|
196
|
238
|
beaglebone_repack_kernel
|
197
|
239
|
enable_serial_console ttyO0
|
|
@@ -199,9 +241,11 @@ function generic_beaglebone_steup {
|
199
|
241
|
|
200
|
242
|
case "$MACHINE" in
|
201
|
243
|
beaglebone)
|
|
244
|
+ beaglebone_setup_boot
|
202
|
245
|
generic_beaglebone_steup
|
203
|
246
|
;;
|
204
|
247
|
beaglebonewifi)
|
|
248
|
+ beaglebone_wireless_setup_boot
|
205
|
249
|
generic_beaglebone_steup
|
206
|
250
|
;;
|
207
|
251
|
cubietruck)
|