about summary refs log tree commit diff
path: root/mkimage.sh.in
diff options
context:
space:
mode:
authorJuan RP <xtraeme@gmail.com>2013-11-11 09:06:03 +0100
committerJuan RP <xtraeme@gmail.com>2013-11-11 09:06:03 +0100
commit2c846d9f4cf09a1943eeb7c04bc269d0c4fe9658 (patch)
tree5502b6a65430a771caee636e860b77379014c44b /mkimage.sh.in
parent81378ab3c6ae9f7cd5e910527c197d80ed66ebd4 (diff)
downloadhrmpf-2c846d9f4cf09a1943eeb7c04bc269d0c4fe9658.tar.gz
hrmpf-2c846d9f4cf09a1943eeb7c04bc269d0c4fe9658.tar.xz
hrmpf-2c846d9f4cf09a1943eeb7c04bc269d0c4fe9658.zip
mkimage: make sure to update rootfstype on /boot/cmdline.txt for Raspberry Pi.
Diffstat (limited to 'mkimage.sh.in')
-rw-r--r--mkimage.sh.in4
1 files changed, 4 insertions, 0 deletions
diff --git a/mkimage.sh.in b/mkimage.sh.in
index ce074d5..b3b8800 100644
--- a/mkimage.sh.in
+++ b/mkimage.sh.in
@@ -135,6 +135,10 @@ BOOT_UUID=$(blkid -o value -s UUID ${LOOPDEV}p1)
 ROOT_UUID=$(blkid -o value -s UUID ${LOOPDEV}p2)
 echo "UUID=$BOOT_UUID /boot $BOOT_FSTYPE defaults 0 0" >> ${ROOTFSDIR}/etc/fstab
 echo "UUID=$ROOT_UUID / $ROOT_FSTYPE defaults 0 1" >> ${ROOTFSDIR}/etc/fstab
+if [ -s ${ROOTFSDIR}/boot/cmdline.txt ]; then
+   sed -e "s,rootfstype=ext4,rootfstype=${ROOT_FSTYPE}," -i ${ROOTFSDIR}/boot/cmdline.txt
+fi
+
 umount ${ROOTFSDIR}/boot
 umount $ROOTFSDIR
 losetup -d $LOOPDEV