diff options
Diffstat (limited to 'scripts/contrib/mkefidisk.sh')
-rwxr-xr-x | scripts/contrib/mkefidisk.sh | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/scripts/contrib/mkefidisk.sh b/scripts/contrib/mkefidisk.sh index 9275ecf17c..f8c08dd204 100755 --- a/scripts/contrib/mkefidisk.sh +++ b/scripts/contrib/mkefidisk.sh | |||
@@ -132,9 +132,7 @@ ROOTFS_START=$((BOOT_SIZE)) | |||
132 | ROOTFS_END=$((ROOTFS_START+ROOTFS_SIZE)) | 132 | ROOTFS_END=$((ROOTFS_START+ROOTFS_SIZE)) |
133 | SWAP_START=$((ROOTFS_END)) | 133 | SWAP_START=$((ROOTFS_END)) |
134 | 134 | ||
135 | # MMC devices are special in a couple of ways | 135 | # MMC devices use a partition prefix character 'p' |
136 | # 1) they use a partition prefix character 'p' | ||
137 | # 2) they are detected asynchronously (need ROOTWAIT) | ||
138 | PART_PREFIX="" | 136 | PART_PREFIX="" |
139 | if [ ! "${DEVICE#/dev/mmcblk}" = "${DEVICE}" ]; then | 137 | if [ ! "${DEVICE#/dev/mmcblk}" = "${DEVICE}" ]; then |
140 | PART_PREFIX="p" | 138 | PART_PREFIX="p" |
@@ -143,11 +141,9 @@ BOOTFS=$DEVICE${PART_PREFIX}1 | |||
143 | ROOTFS=$DEVICE${PART_PREFIX}2 | 141 | ROOTFS=$DEVICE${PART_PREFIX}2 |
144 | SWAP=$DEVICE${PART_PREFIX}3 | 142 | SWAP=$DEVICE${PART_PREFIX}3 |
145 | 143 | ||
146 | ROOTWAIT="" | ||
147 | TARGET_PART_PREFIX="" | 144 | TARGET_PART_PREFIX="" |
148 | if [ ! "${TARGET_DEVICE#/dev/mmcblk}" = "${TARGET_DEVICE}" ]; then | 145 | if [ ! "${TARGET_DEVICE#/dev/mmcblk}" = "${TARGET_DEVICE}" ]; then |
149 | TARGET_PART_PREFIX="p" | 146 | TARGET_PART_PREFIX="p" |
150 | ROOTWAIT="rootwait" | ||
151 | fi | 147 | fi |
152 | TARGET_ROOTFS=$TARGET_DEVICE${TARGET_PART_PREFIX}2 | 148 | TARGET_ROOTFS=$TARGET_DEVICE${TARGET_PART_PREFIX}2 |
153 | TARGET_SWAP=$TARGET_DEVICE${TARGET_PART_PREFIX}3 | 149 | TARGET_SWAP=$TARGET_DEVICE${TARGET_PART_PREFIX}3 |
@@ -250,10 +246,14 @@ sed -i "/menuentry 'install'/,/^}/d" $GRUBCFG | |||
250 | sed -i "/initrd /d" $GRUBCFG | 246 | sed -i "/initrd /d" $GRUBCFG |
251 | # Delete any LABEL= strings | 247 | # Delete any LABEL= strings |
252 | sed -i "s/ LABEL=[^ ]*/ /" $GRUBCFG | 248 | sed -i "s/ LABEL=[^ ]*/ /" $GRUBCFG |
253 | # Replace the ramdisk root (if any) with the install device and include other | 249 | # Remove any existing root= kernel parameters and: |
254 | # kernel parameters | 250 | # o Add a root= parameter with the target rootfs |
251 | # o Specify ro so fsck can be run during boot | ||
252 | # o Specify rootwait in case the target media is an asyncronous block device | ||
253 | # such as MMC or USB disks | ||
254 | # o Specify "quiet" to minimize boot time when using slow serial consoles | ||
255 | sed -i "s@ root=[^ ]*@ @" $GRUBCFG | 255 | sed -i "s@ root=[^ ]*@ @" $GRUBCFG |
256 | sed -i "s@vmlinuz @vmlinuz root=$TARGET_ROOTFS ro $ROOTWAIT quiet @" $GRUBCFG | 256 | sed -i "s@vmlinuz @vmlinuz root=$TARGET_ROOTFS ro rootwait quiet @" $GRUBCFG |
257 | 257 | ||
258 | # Provide a startup.nsh script for older firmware with non-standard boot | 258 | # Provide a startup.nsh script for older firmware with non-standard boot |
259 | # directories and paths. | 259 | # directories and paths. |