diff --git a/board/common/overlay-initramfs/init b/board/common/overlay-initramfs/init index d29c2408fe..4030b1a887 100755 --- a/board/common/overlay-initramfs/init +++ b/board/common/overlay-initramfs/init @@ -6,14 +6,20 @@ msg() { echo "* $1" } +msg "Waiting for sdcard" +sleep 2 + +msg "Mounting pseudo filesystems" +mount -t devtmpfs devtmpfs /dev +mount -t proc proc /proc + ROOT_DEV=$(cat /proc/cmdline | grep -oE 'root=[/a-z0-9]+' | cut -d '=' -f 2) -if [[ "$ROOT_DEV" =~ ^([/a-z0-9]+)(p[0-9])$ ]]; then # e.g. /dev/mmcblk0p2 - DISK_DEV=${BASH_REMATCH[1]} +if echo ${ROOT_DEV: -2} | grep -E 'p[0-9]' &>/dev/null; then # e.g. /dev/mmcblk0p2 + DISK_DEV=${ROOT_DEV:0:$((${#ROOT_DEV}-2))} BOOT_DEV=${DISK_DEV}p1 DATA_DEV=${DISK_DEV}p3 else # e.g. /dev/sdc2 - [[ "$ROOT_DEV" =~ ^([/a-z0-9]+)([0-9])$ ]] - DISK_DEV=${BASH_REMATCH[1]} + DISK_DEV=${ROOT_DEV:0:$((${#ROOT_DEV}-1))} BOOT_DEV=${DISK_DEV}1 DATA_DEV=${DISK_DEV}3 fi @@ -52,13 +58,6 @@ on_exit() { trap on_exit EXIT -msg "Waiting for sdcard" -sleep 2 - -msg "Mounting pseudo filesystems" -mount -t devtmpfs devtmpfs /dev -mount -t proc proc /proc - if [ -x /prepare_initramfs ]; then msg "Preparing initramfs" /prepare_initramfs diff --git a/board/common/overlay/sbin/fwupdate b/board/common/overlay/sbin/fwupdate index 196fec76b7..2f55c500ca 100755 --- a/board/common/overlay/sbin/fwupdate +++ b/board/common/overlay/sbin/fwupdate @@ -229,7 +229,7 @@ function flash_boot() { echo $pid > $FW_DIR/$DD_PID_FILE wait $pid - mount -o rw /boot + mount -T /etc/fstab.disk -o rw /boot # the /usr/libexec/fw-restore-boot-cfg script, if present, takes the old (backup) boot dir as argument # and should restore any /boot configuration that needs to be preserved across updates diff --git a/board/odroidc1/uInitrd b/board/odroidc1/uInitrd index f8901bf632..0a061f135d 100644 Binary files a/board/odroidc1/uInitrd and b/board/odroidc1/uInitrd differ diff --git a/board/odroidc2/uInitrd b/board/odroidc2/uInitrd new file mode 100644 index 0000000000..eea4ce8d50 Binary files /dev/null and b/board/odroidc2/uInitrd differ diff --git a/board/odroidxu4/uInitrd b/board/odroidxu4/uInitrd index 9594fd888c..1692af7d0c 100644 Binary files a/board/odroidxu4/uInitrd and b/board/odroidxu4/uInitrd differ diff --git a/board/raspberrypi/fwupdater.gz b/board/raspberrypi/fwupdater.gz index 81e7fa1990..cc1c05d595 100644 Binary files a/board/raspberrypi/fwupdater.gz and b/board/raspberrypi/fwupdater.gz differ diff --git a/board/raspberrypi2/fwupdater.gz b/board/raspberrypi2/fwupdater.gz index 81e7fa1990..cc1c05d595 100644 Binary files a/board/raspberrypi2/fwupdater.gz and b/board/raspberrypi2/fwupdater.gz differ diff --git a/board/raspberrypi3/fwupdater.gz b/board/raspberrypi3/fwupdater.gz index 81e7fa1990..cc1c05d595 100644 Binary files a/board/raspberrypi3/fwupdater.gz and b/board/raspberrypi3/fwupdater.gz differ