rootfsinstall: completed bananapi support plus loop device installation support
This commit is contained in:
parent
fb24bac0a1
commit
b330e85946
@ -119,7 +119,7 @@ while [ "$1" ]; do
|
||||
done
|
||||
[ "$ROOTFSARCHIVE" ] || { usage; exit 1; }
|
||||
|
||||
if [ "${DRIVE:0:11}" = "/dev/mmcblk" ]; then
|
||||
if [ "${DRIVE:0:11}" = "/dev/mmcblk" -o "${DRIVE:0:9}" = "/dev/loop" ]; then
|
||||
PARTITION1=${DRIVE}p1
|
||||
PARTITION2=${DRIVE}p2
|
||||
else
|
||||
@ -178,6 +178,7 @@ sudo parted -s ${DRIVE} mktable msdos
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "ERROR: parted exited with error $? while creating partition table on ${DRIVE}; aborting."
|
||||
fi
|
||||
sync
|
||||
|
||||
if [ "$BOOTFSTYPE" ]; then
|
||||
# FAT partition
|
||||
@ -201,7 +202,6 @@ else
|
||||
echo "ERROR: parted exited with error $? while creating system partition on ${DRIVE}; aborting."
|
||||
fi
|
||||
fi
|
||||
sync
|
||||
|
||||
if [ "$BOOTFSTYPE" ]; then
|
||||
echo "Formatting $PARTITION1 ($BOOTFSTYPE) ..."
|
||||
@ -277,6 +277,16 @@ fi
|
||||
|
||||
if [ "$TARGETDEVICE" = "bpi" ]; then
|
||||
# TODO
|
||||
cp $ROOTMP/boot/Bananapi-script.bin $BOOTMP/
|
||||
IMAGE=`ls $ROOTMP/boot/uImage-*-sunxi | head -n 1`
|
||||
cp $IMAGE $BOOTMP/uImage-sunxi
|
||||
cat > $BOOTMP/uEnv.txt << _EOF
|
||||
bootargs=console=ttyS0,115200 console=tty0 sunxi_g2d_mem_reserve=0 sunxi_ve_mem_reserve=0 disp.screen0_output_mode=EDID:1280x720p50 hdmi.audio=EDID:0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
|
||||
aload_script=fatload mmc 0 0x43000000 Bananapi-script.bin;
|
||||
aload_kernel=fatload mmc 0 0x48000000 uImage-sunxi; bootm 0x48000000;
|
||||
uenvcmd=run aload_script aload_kernel
|
||||
_EOF
|
||||
dd if=$ROOTMP/boot/Bananapi/u-boot-sunxi-with-spl.bin of=${DRIVE} bs=1024 seek=8
|
||||
:
|
||||
elif [ "$TARGETDEVICE" = "rpi" ]; then
|
||||
# fetch and install firmware files if missing
|
||||
|
Loading…
Reference in New Issue
Block a user