From 093ffc22d37cd04b8e7921910b767bec09a7be6c Mon Sep 17 00:00:00 2001 From: Vadim Bendebury Date: Mon, 12 Mar 2012 19:16:33 -0700 Subject: [PATCH] Increase factory shim EFI partition size With recent changes (transitioning to 64 bit x86 kernels and the 3.2 kernel) the factory install image EFI partition gets overflown, resulting in build failures. This change makes sure that factory shim image gets allocated twice the room for the EFI partition (32M). BUG=chromium-os:27639 TEST=manual run the following commands while in chroot: cd ~/trunk/src/scripts ./build_image --board=lumpy ./build_image --board=lumpy --replace --symlink=factory_shim --build_attempt=3 factory_install cd ~/trunk/src/build/images/lumpy/factory_shim ./unpack_partitions.sh factory_install_shim.bin ls -l part12 cd ~/trunk/src/build/images/lumpy/latest ./unpack_partitions.sh chromiumos_image.bin ls -l part12 . observe that in factory shim case the part_12 partition size is 33554432 bytes, and in the regular image case the part_12 partition size is 16777216 . try using the factory_shim USB stick in recovery mode, observe the system come up (did not have a server set up, so the full install process was not verified). Change-Id: Ibe001ec37c752dca90ec30ae056a67610e39a8fb Signed-off-by: Vadim Bendebury Reviewed-on: https://gerrit.chromium.org/gerrit/17907 --- build_library/base_image_util.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/build_library/base_image_util.sh b/build_library/base_image_util.sh index 5f3922064b..1d9e515507 100755 --- a/build_library/base_image_util.sh +++ b/build_library/base_image_util.sh @@ -202,8 +202,15 @@ create_base_image() { # Create EFI System Partition to boot stock EFI BIOS (but not # ChromeOS EFI BIOS). ARM uses this space to determine which # partition is bootable. NOTE: The size argument for mkfs.vfat is - # in 1024-byte blocks. We'll hard-code it to 16M for now. - /usr/sbin/mkfs.vfat -C "${ESP_FS_IMG}" 16384 + # in 1024-byte blocks. We'll hard-code it to 16M for now, unless + # we are building a factory shim, in which case a larger room is + # needed to allow two kernel blobs (each including initramfs) in + # one EFI partition. + if should_build_image ${CHROMEOS_FACTORY_INSTALL_SHIM_NAME}; then + /usr/sbin/mkfs.vfat -C "${ESP_FS_IMG}" 32768 + else + /usr/sbin/mkfs.vfat -C "${ESP_FS_IMG}" 16384 + fi # Zero rootfs free space to make it more compressible so auto-update # payloads become smaller