Index: src/scripts/build_image.sh |
diff --git a/src/scripts/build_image.sh b/src/scripts/build_image.sh |
index 6c6f9bc2be87c3a04766e088a68e0d1763826c64..982c6035e8fcce255e682e901fcc7f99fb3111c4 100755 |
--- a/src/scripts/build_image.sh |
+++ b/src/scripts/build_image.sh |
@@ -142,15 +142,16 @@ fi |
# -- Turn root file system into bootable image -- |
-# Setup extlinux configuration. |
-# TODO: For some reason the /dev/disk/by-uuid is not being generated by udev |
-# in the initramfs. When we figure that out, switch to root=UUID=$UUID. |
-cat <<EOF | sudo dd of="$ROOT_FS_DIR"/boot/extlinux.conf |
+if [ "$FLAGS_arch" = "x86" ]; then |
+ # Setup extlinux configuration. |
+ # TODO: For some reason the /dev/disk/by-uuid is not being generated by udev |
+ # in the initramfs. When we figure that out, switch to root=UUID=$UUID. |
+ cat <<EOF | sudo dd of="$ROOT_FS_DIR"/boot/extlinux.conf |
DEFAULT chromeos-usb |
PROMPT 0 |
TIMEOUT 0 |
-label chromeos-usb |
+ label chromeos-usb |
menu label chromeos-usb |
kernel vmlinuz |
append quiet console=tty2 initrd=initrd.img init=/sbin/init boot=local rootwait root=LABEL=$DISK_LABEL ro noresume noswap i915.modeset=1 loglevel=1 |
@@ -164,22 +165,28 @@ EOF |
# Make partition bootable and label it. |
sudo "$SCRIPTS_DIR/extlinux.sh" -z --install "${ROOT_FS_DIR}/boot" |
+fi # --arch=x86 |
+ |
cleanup_rootfs_loop |
+if [ "$FLAGS_arch" = "x86" ]; then |
+ |
# Create a master boot record. |
# Start with the syslinux master boot record. We need to zero-pad to |
# fill out a 512-byte sector size. |
-SYSLINUX_MBR="/usr/lib/syslinux/mbr.bin" |
-dd if="$SYSLINUX_MBR" of="$MBR_IMG" bs=512 count=1 conv=sync |
-# Create a partition table in the MBR. |
-NUM_SECTORS=$((`stat --format="%s" "$ROOT_FS_IMG"` / 512)) |
-sudo sfdisk -H64 -S32 -uS -f "$MBR_IMG" <<EOF |
+ SYSLINUX_MBR="/usr/lib/syslinux/mbr.bin" |
+ dd if="$SYSLINUX_MBR" of="$MBR_IMG" bs=512 count=1 conv=sync |
+ # Create a partition table in the MBR. |
+ NUM_SECTORS=$((`stat --format="%s" "$ROOT_FS_IMG"` / 512)) |
+ sudo sfdisk -H64 -S32 -uS -f "$MBR_IMG" <<EOF |
,$NUM_SECTORS,L,-, |
,$NUM_SECTORS,S,-, |
,$NUM_SECTORS,L,*, |
; |
EOF |
+fi # --arch=x86 |
+ |
OUTSIDE_OUTPUT_DIR="${EXTERNAL_TRUNK_PATH}/src/build/images/${IMAGE_SUBDIR}" |
echo "Done. Image created in ${OUTPUT_DIR}" |
echo "To copy to USB keyfob, outside the chroot, do something like:" |