forked from koenkooi/validation-scripts
-
Notifications
You must be signed in to change notification settings - Fork 24
/
mkxmbootscr
executable file
·48 lines (39 loc) · 1.85 KB
/
mkxmbootscr
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
#!/bin/bash
TMPFILE=/tmp/$(basename $0).$$.cmd
for tool in mkimage; do
if ! type $tool >/dev/null 2>&1; then
echo "ERROR: \"$tool\" not found."
echo " Try 'opkg install u-boot-mkimage'"
exit 2
fi
done
function do_mkimage {
echo Building script \""$1\"" - $2
mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n "$1" -d $TMPFILE $2
}
cat <<EOF > $TMPFILE
setenv bootargs 'init=/bin/busybox sh console=tty0 console=ttyS2,115200n8 mpurate=600 nohz=off vram=16M omapfb.mode=dvi:640x480MR-16@60 omapdss.def_disp=dvi omapfb.vram=0:8M,1:4M,2:4M root=/dev/mmcblk0p2 rw rootfstype=ext3 rootwait mem=99M@0x80000000 mem=384M@0x88000000'
fatload mmc 0 0x82000000 uImage
bootm 0x82000000
EOF
do_mkimage "Shell only (VGA)" shell.scr
cat <<EOF > $TMPFILE
setenv bootargs 'console=tty0 console=ttyS2,115200n8 mpurate=600 nohz=off vram=16M omapfb.mode=dvi:1024x768MR-24@60 omapdss.def_disp=dvi omapfb.vram=0:8M,1:4M,2:4M root=/dev/mmcblk0p2 rw rootfstype=ext3 rootwait mem=99M@0x80000000 mem=384M@0x88000000'
fatload mmc 0 0x82000000 uImage
bootm 0x82000000
EOF
do_mkimage "Default (1024x768)" boot.scr
cat <<EOF > $TMPFILE
setenv bootargs 'console=tty0 console=ttyS2,115200n8 mpurate=600 nohz=off vram=16M omapfb.mode=dvi:hd720 omapdss.def_disp=dvi omapfb.vram=0:8M,1:4M,2:4M root=/dev/mmcblk0p2 rw rootfstype=ext3 rootwait mem=99M@0x80000000 mem=384M@0x88000000'
fatload mmc 0 0x82000000 uImage
bootm 0x82000000
EOF
do_mkimage "Default (720p)" boot-hd.scr
cat <<EOF > $TMPFILE
setenv bootargs 'console=tty0 console=ttyS2,115200n8 mpurate=1000 nohz=off vram=16M omapfb.mode=dvi:640x480MR-16@60 omapdss.def_disp=dvi omapfb.vram=0:8M,1:4M,2:4M root=/dev/ram0 rw rootfstype=ext2 initrd=0x81600000,32M ramdisk_size=32768 mem=99M@0x80000000 mem=384M@0x88000000'
fatload mmc 0 0x80200000 uImage
fatload mmc 0 0x81600000 ramdisk.gz
bootm 0x80200000
EOF
do_mkimage "Ramdisk" boot-ram.scr
rm $TMPFILE