Selaa lähdekoodia

mkimage: use PARTUUID for root on rpi* images

This makes it easier to set up an RPi SBC image for non-MMC boot by
ensuring that the right root partition is chosen. If the enumerated
(sdX-style) name changes, boot can fail.
classabbyamp 1 vuosi sitten
vanhempi
sitoutus
5f68211394
1 muutettua tiedostoa jossa 4 lisäystä ja 0 poistoa
  1. 4 0
      mkimage.sh

+ 4 - 0
mkimage.sh

@@ -255,6 +255,10 @@ sed -i "${ROOTFS}/etc/ssh/sshd_config" -e 's|^#\(PermitRootLogin\) .*|\1 yes|g'
 # can be found.
 info_msg "Configuring image for platform $PLATFORM"
 case "$PLATFORM" in
+rpi*)
+	# use PARTUUID to allow for non-mmc boot without configuration
+	sed -i "s/root=[^ ]*/root=PARTUUID=${ROOT_PARTUUID}/" "${ROOTFS}/boot/cmdline.txt"
+	;;
 rock64*)
     rk33xx_flash_uboot "${ROOTFS}/usr/lib/rock64-uboot" "$LOOPDEV"
     # populate the extlinux.conf file