rootfsinstall: added -r option to specify boot resolution

This commit is contained in:
Silvan Calarco 2013-11-22 18:07:41 +01:00
parent 2a9f821f6b
commit ac5eb6b06c

View File

@ -22,6 +22,7 @@ function usage() {
echo "-h hostname : set given hostname"
echo "-k kernel : extract and use specified kernel file from ROOTFS/boot/ for boot"
echo "-p password : set given password for root user"
echo "-r mode : set given default video mode where applicable (e.g. -r 1920x1080-32@60)"
echo "-y : assume yes to all questions (script mode)"
echo
echo "Example: $0 /dev/sdb /tmp/openmamba-rootfs-light.arm.tar.xz"
@ -91,6 +92,13 @@ while [ "$1" ]; do
ROOTPASSWORD=$2
shift
;;
-r) [ "$2" ] || {
echo "Error: -r option requires a video mode as argument; aborting."
exit 1
}
VIDEOMODE=$2
shift
;;
-*) echo "Error: invalid option $1; aborting."
exit 1
;;
@ -284,10 +292,11 @@ framebuffer_ignore_alpha=1" > $BOOTMP/config.txt
[ "$SWHOME" -a "${SWHOME:0:4}" = "/tmp" ] && rm -rf $SWHOME
elif [ "$TARGETDEVICE" = "cubox" ]; then
[ "$VIDEO_MODE" ] || VIDEO_MODE=1920x1080-32@60"
mkdir -p $BOOTMP/boot
echo "Creating u-boot boot.scr..."
cat > $BOOTMP/boot/boot.txt << _EOF
setenv bootargs 'console=ttyS0,115200n8 vmalloc=384M root=/dev/mmcblk0p2 video=dovefb:lcd0:1920x1080-32@60-edid clcd.lcd0_enable=1 clcd.
setenv bootargs 'console=ttyS0,115200n8 vmalloc=384M root=/dev/mmcblk0p2 video=dovefb:lcd0:$VIDEO_MODE-edid clcd.lcd0_enable=1 clcd.
lcd1_enable=0'
echo ======== Loading kernel ========
ext2load mmc 0:1 0x00200000 /boot/uImage