Skip to content

Commit 5f68211

Browse files
committed
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.
1 parent 0d1ab99 commit 5f68211

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

mkimage.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,10 @@ sed -i "${ROOTFS}/etc/ssh/sshd_config" -e 's|^#\(PermitRootLogin\) .*|\1 yes|g'
255255
# can be found.
256256
info_msg "Configuring image for platform $PLATFORM"
257257
case "$PLATFORM" in
258+
rpi*)
259+
# use PARTUUID to allow for non-mmc boot without configuration
260+
sed -i "s/root=[^ ]*/root=PARTUUID=${ROOT_PARTUUID}/" "${ROOTFS}/boot/cmdline.txt"
261+
;;
258262
rock64*)
259263
rk33xx_flash_uboot "${ROOTFS}/usr/lib/rock64-uboot" "$LOOPDEV"
260264
# populate the extlinux.conf file

0 commit comments

Comments
 (0)