rootfsinstall: leave 1MB+ of free space before first partition to support BananaPi u-boot installation

This commit is contained in:
Silvan Calarco 2014-10-17 10:09:27 +02:00
parent 01617aa73b
commit 7b55fdddd5

View File

@ -126,12 +126,12 @@ fi
case $TARGETDEVICE in
rpi) BOOTFSTYPE=fat32
BOOTFSSIZE=40M
BOOTFSSIZE=22M
[ "$USEKERNEL" ] || USEKERNEL=zImage-3.6.11-rpi
KERNELDEST="@BOOT@/kernel.img"
;;
cubox) BOOTFSTYPE=ext3
BOOTFSSIZE=20M
BOOTFSSIZE=22M
[ "$USEKERNEL" ] || USEKERNEL=uImage-3.6.9-cubox
KERNELDEST="@BOOT@/boot/uImage"
;;
@ -170,7 +170,7 @@ fi
if [ "$BOOTFSTYPE" ]; then
# FAT partition
sudo parted -s -a cyl -- ${DRIVE} mkpart primary $BOOTFSTYPE 0 $BOOTFSSIZE
sudo parted -s -a cyl -- ${DRIVE} mkpart primary $BOOTFSTYPE 1049k $BOOTFSSIZE
if [ "$?" != "0" ]; then
echo "ERROR: parted exited with error $? while creating boot partition on ${DRIVE}; aborting."
fi
@ -181,7 +181,7 @@ if [ "$BOOTFSTYPE" ]; then
fi
else
# rootfs partition
sudo parted -s -a cyl -- ${DRIVE} mkpart primary $SYSTEMFSTYPE 0 -1
sudo parted -s -a cyl -- ${DRIVE} mkpart primary $SYSTEMFSTYPE 1049k -1
if [ "$?" != "0" ]; then
echo "ERROR: parted exited with error $? while creating system partition on ${DRIVE}; aborting."
fi