project-lakitu: increase partition sizes for ARM64 iamges

Increase kernel and ESP aprtition sizes to 32M and 64M respectively.

ARM64 kernel does not use compression so it's larger than x86 kernel.
Linux 5.10 no longer fits into a kernel partition, so to fix this -
increase sizes in disk layout. There are no backward compatibility
requirements since there were no public releases for COS/ARM and
there is no need to match x86 disk layout sizes.

BUG=b/173821368
TEST=presubmit
RELEASE_NOTE=None

Change-Id: Ia0f846a506f130e3e6d05da901b7ccce5be69447
Reviewed-on: https://cos-review.googlesource.com/c/cos/overlays/board-overlays/+/16031
Tested-by: Cusky Presubmit Bot <presubmit@cos-infra-prod.iam.gserviceaccount.com>
Reviewed-by: Robert Kolchmeyer <rkolchmeyer@google.com>
Reviewed-by: Roy Yang <royyang@google.com>
diff --git a/overlay-lakitu-arm64/scripts/disk_layout.json b/overlay-lakitu-arm64/scripts/disk_layout.json
new file mode 100644
index 0000000..08de85c
--- /dev/null
+++ b/overlay-lakitu-arm64/scripts/disk_layout.json
@@ -0,0 +1,65 @@
+{
+  "parent": "legacy_disk_layout.json",
+
+  "layouts": {
+  # The following number for size (4966) is determined such that the
+  # size of image with "base" disk layout is exactly 10GiB. GCE images
+  # are expected to be multiple of 1GiB. We choose 10GiB because it's
+  # the default boot disk size on GCE.
+  #
+  # For now, we determine the starting sector number of the stateful
+  # partition with cgpt (see below) on a built image. But ideally
+  # we should arrive at this number based on legacy_disk_layout.json.
+  #
+  # Partitions are expected to be aligned to 4096 block boundary,
+  # that is, 2 MiB.
+  #
+  # number of 512-byte sectors in 10GiB:    20,971,520
+  # stateful partition starting sector:      8,704,000 (cgpt show /dev/sda)
+  # stateful partition size in MiB:              5,990 (2MiB aligned)
+  # stateful partition size less 1GiB in MiB:    4,966
+  #
+  # NOTEs:
+  # image_type and disk_layout are different. Only disk_layout is used for controlling
+  # the size of partitions.
+  #
+  # Both base and test image will use usb disk_layout by default. To use base disk_layout,
+  # we need to specify `--disk_layout=base`. This is what COS builder used.
+  #
+  # Both base and test image's size will be 8GiB without specifying disk_layout.
+  # disk_layout is usb by default. The size of the image is the sum
+  # of ROOT-A(2GiB)+ROOT-B(2MiB)+Stateful Partition(~5GiB). ROOT-B's size is specified
+  # in the usb section of legacy_disk_layout.json
+  #
+  # Both base and test image's size will be 9GiB by COS builder, which will use base
+  # disk_layout. The size is sum of ROOT-A(2GiB)+ROOT-B(2GiB)+Stateful Parition(~5B).
+  #
+  # We never have a 10GiB size of image in practice. When create VM on GCE, the default
+  # image size is 10GiB.
+  "common": [
+      {
+        "num": 2,
+        "size": "32 MiB"
+      },
+      {
+        "num": 4,
+        "size": "32 MiB"
+      },
+      {
+        "num": 12,
+        "size": "64 MiB"
+      },
+      {
+        # STATE
+        "num": 1,
+        "size": "4966 MiB",
+        "fs_options": {
+          # A consequence of this option is that some file system
+          # structures are initialized lazily when resizing,
+          # resulting in much faster resize2fs invocations.
+          "ext4": "-O metadata_csum"
+        }
+      }
+    ]
+  }
+}