Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(750)

Unified Diff: src/scripts/build_image.sh

Issue 554056: Some changes to be able to build an armel-based rootfs. (Closed)
Patch Set: Removed blank line. Created 10 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/package_repo/package-list-prod.txt ('k') | src/scripts/customize_rootfs.sh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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:"
« no previous file with comments | « src/package_repo/package-list-prod.txt ('k') | src/scripts/customize_rootfs.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698