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 <vbendeb@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/17907
This commit is contained in:
Vadim Bendebury 2012-03-12 19:16:33 -07:00 committed by Gerrit
parent 63989c25ec
commit 093ffc22d3

View File

@ -202,8 +202,15 @@ create_base_image() {
# Create EFI System Partition to boot stock EFI BIOS (but not # Create EFI System Partition to boot stock EFI BIOS (but not
# ChromeOS EFI BIOS). ARM uses this space to determine which # ChromeOS EFI BIOS). ARM uses this space to determine which
# partition is bootable. NOTE: The size argument for mkfs.vfat is # partition is bootable. NOTE: The size argument for mkfs.vfat is
# in 1024-byte blocks. We'll hard-code it to 16M for now. # in 1024-byte blocks. We'll hard-code it to 16M for now, unless
/usr/sbin/mkfs.vfat -C "${ESP_FS_IMG}" 16384 # 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 # Zero rootfs free space to make it more compressible so auto-update
# payloads become smaller # payloads become smaller