rootfsinstall: fixes for cubox target
This commit is contained in:
parent
738d9ad084
commit
503fadd774
@ -10,12 +10,12 @@ SYSTEMFSTYPE=ext4
|
|||||||
TARGET_ARCH=arm
|
TARGET_ARCH=arm
|
||||||
|
|
||||||
function usage() {
|
function usage() {
|
||||||
echo "Usage: $0 device rootfs-archive [-rpi|-cubox] [-a archive] [-c command] [-fs fstype] [-k kernel] [-p password] [-y]"
|
echo "Usage: $0 device rootfs-archive [-bpi|-cubox|-rpi] [-a archive] [-c command] [-fs fstype] [-k kernel] [-p password] [-y]"
|
||||||
echo
|
echo
|
||||||
echo "Target platform (optional):"
|
echo "Target platform (optional):"
|
||||||
echo "-bpi : make a BananaPi SD with boot partition"
|
echo "-bpi : make a BananaPi SD with boot partition"
|
||||||
echo "-rpi : make a RaspberryPi SD with boot partition"
|
|
||||||
echo "-cubox : make a Cubox SD with boot partition"
|
echo "-cubox : make a Cubox SD with boot partition"
|
||||||
|
echo "-rpi : make a RaspberryPi SD with boot partition"
|
||||||
echo
|
echo
|
||||||
echo "Options:"
|
echo "Options:"
|
||||||
echo "-a archive : additional archive to unpack in rootfs root"
|
echo "-a archive : additional archive to unpack in rootfs root"
|
||||||
@ -159,8 +159,8 @@ case $TARGETDEVICE in
|
|||||||
BOOTFSSIZE=20M
|
BOOTFSSIZE=20M
|
||||||
BOOTFSSTART=0
|
BOOTFSSTART=0
|
||||||
[ "$USEKERNEL" ] || USEKERNEL=uImage-3.6.9-cubox
|
[ "$USEKERNEL" ] || USEKERNEL=uImage-3.6.9-cubox
|
||||||
KERNELDEST="@BOOT@/boot/uImage"
|
KERNELDEST="@BOOT@/uImage"
|
||||||
INSTALLPACKAGES="kernel-cubox kernel-cubox-modules $INSTALLPACKAGES"
|
INSTALLPACKAGES="kernel-cubox kernel-cubox-modules xf86-video-dove $INSTALLPACKAGES"
|
||||||
;;
|
;;
|
||||||
*) BOOTFSTYPE=
|
*) BOOTFSTYPE=
|
||||||
if [ "$USEKERNEL" ]; then
|
if [ "$USEKERNEL" ]; then
|
||||||
@ -412,20 +412,26 @@ framebuffer_ignore_alpha=1" > $BOOTMP/config.txt
|
|||||||
[ "$SWHOME" -a "${SWHOME:0:4}" = "/tmp" ] && rm -rf $SWHOME
|
[ "$SWHOME" -a "${SWHOME:0:4}" = "/tmp" ] && rm -rf $SWHOME
|
||||||
|
|
||||||
elif [ "$TARGETDEVICE" = "cubox" ]; then
|
elif [ "$TARGETDEVICE" = "cubox" ]; then
|
||||||
[ "$VIDEO_MODE" ] || VIDEO_MODE="1920x1080-32@60"
|
if [ -e $ROOTMP/boot/uImage-*-cubox ]; then
|
||||||
mkdir -p $BOOTMP/boot
|
IMAGE=`ls $ROOTMP/boot/uImage-*-cubox | head -n 1`
|
||||||
echo "Creating u-boot boot.scr..."
|
cp $IMAGE* $BOOTMP/
|
||||||
cat > $BOOTMP/boot/boot.txt << _EOF
|
ln -s ${IMAGE/*\/}-boot.scr $BOOTMP/boot.scr
|
||||||
|
else
|
||||||
|
[ "$VIDEO_MODE" ] || VIDEO_MODE="1920x1080-32@60"
|
||||||
|
mkdir -p $BOOTMP
|
||||||
|
echo "Creating u-boot boot.scr..."
|
||||||
|
cat > $BOOTMP/boot.txt << _EOF
|
||||||
setenv bootargs 'console=ttyS0,115200n8 vmalloc=384M root=/dev/mmcblk0p2 video=dovefb:lcd0:$VIDEO_MODE-edid clcd.lcd0_enable=1 clcd.lcd1_enable=0 rootwait'
|
setenv bootargs 'console=ttyS0,115200n8 vmalloc=384M root=/dev/mmcblk0p2 video=dovefb:lcd0:$VIDEO_MODE-edid clcd.lcd0_enable=1 clcd.lcd1_enable=0 rootwait'
|
||||||
echo ======== Loading kernel ========
|
echo ======== Loading kernel ========
|
||||||
ext2load mmc 0:1 0x00200000 /boot/uImage
|
ext2load mmc 0:1 0x00200000 /uImage
|
||||||
echo ======== Booting kernel ========
|
echo ======== Booting kernel ========
|
||||||
bootm
|
bootm
|
||||||
_EOF
|
_EOF
|
||||||
mkimage -A arm -O linux -T script -C none -n "u-boot commands" -d $BOOTMP/boot/boot.txt $BOOTMP/boot/boot.scr || {
|
mkimage -A arm -O linux -T script -C none -n "u-boot commands" -d $BOOTMP/boot.txt $BOOTMP/boot.scr || {
|
||||||
echo "ERROR: mkimage: error creating boot.scr; aborting."
|
echo "ERROR: mkimage: error creating boot.scr; aborting."
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
KERNELDEST=`echo $KERNELDEST | sed "s|@BOOT@|$BOOTMP|g"`
|
KERNELDEST=`echo $KERNELDEST | sed "s|@BOOT@|$BOOTMP|g"`
|
||||||
|
Loading…
Reference in New Issue
Block a user