Revert "[boards] Add image size limits for partitions" This reverts commit 5d80824359b21e87926ed3d9961641753519c743. Reason for revert: Causing bazel_consistency failures Failure Link: https://luci-milo.appspot.com/ui/p/turquoise/builders/global.ci/core.x64-asan-bazel_consistency/b8679447094405889249/infra Original change's description: > [boards] Add image size limits for partitions > > Define partition size limits for public boards (default, x64, arm64, > qemu-arm64, riscv64). > > This adds size configurations (in bytes for GN and KiB for Bazel) > for ZBI, VBMeta, and FVM/Fxfs partitions to allow partition size > checking to be performed during product assembly. > > Bug: 427471252 > Test: Verified partition size checking is active by running a custom > fuchsia_product_bundle assembly size report test. > > Change-Id: I9e607df5cd1be64a35b2fa0371e70d98f73fd5c9 > Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/1643715 > Reviewed-by: Aidan Wolter <awolter@google.com> > Commit-Queue: Ida Isugi <isugiidap@google.com> > Reviewed-by: David Pursell <dpursell@google.com> Bug: 427471252 No-Presubmit: true No-Tree-Checks: true No-Try: true Change-Id: I6706eedb975965df9b21e0fd9338cd02da21870b Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/1646715 Exempt: android-build-ayeaye@system.gserviceaccount.com <android-build-ayeaye@system.gserviceaccount.com> Reviewed-by: Aidan Wolter <awolter@google.com> Commit-Queue: Aidan Wolter <awolter@google.com>
diff --git a/boards/partitions/BUILD.gn b/boards/partitions/BUILD.gn index a9df318..c20e025 100644 --- a/boards/partitions/BUILD.gn +++ b/boards/partitions/BUILD.gn
@@ -22,22 +22,9 @@ fvm = "fvm" } -# Baseline partition sizes that represent the default/minimum sizes -# required to support booting Fuchsia on standard emulator/virtual -# targets. generated_partitions_config("default") { hw_revision = "" forward_variables_from(_standard_names, "*") - - zbi_a_size = 33554432 # 32 MiB - zbi_b_size = 33554432 # 32 MiB - zbi_r_size = 33554432 # 32 MiB - - vbmeta_a_size = 65536 # 64 KiB - vbmeta_b_size = 65536 # 64 KiB - vbmeta_r_size = 65536 # 64 KiB - - fvm_size = 17179869184 # 16 GiB } if (target_cpu == "x64") { @@ -50,14 +37,6 @@ testonly = true forward_variables_from(_standard_names, "*") - zbi_a_size = 134217728 # 128 MiB - zbi_b_size = 134217728 # 128 MiB - zbi_r_size = 205520896 # 196 MiB - - vbmeta_a_size = 65536 # 64 KiB - vbmeta_b_size = 65536 # 64 KiB - vbmeta_r_size = 65536 # 64 KiB - # Gigaboot bootloader that is put to `bootloader` partition. # TODO(b/399522436): This should be moved to platform specific build files. bootloader_partitions = [ @@ -75,9 +54,6 @@ # supports either configuration. fvm = "fvm" fxfs = "fvm" - - fvm_size = 60129542144 # 56 GiB - fxfs_size = 60129542144 # 56 GiB } } @@ -94,14 +70,6 @@ testonly = true forward_variables_from(_standard_names, "*") - zbi_a_size = 33554432 # 32 MiB - zbi_b_size = 33554432 # 32 MiB - zbi_r_size = 33554432 # 32 MiB - - vbmeta_a_size = 65536 # 64 KiB - vbmeta_b_size = 65536 # 64 KiB - vbmeta_r_size = 65536 # 64 KiB - # Gigaboot bootloader that is put to legacy `fuchsia-esp` partition # TODO(b/399522436): This should be moved to platform specific build files. bootloader_partitions = [ @@ -113,14 +81,11 @@ ] deps = [ "//src/firmware/gigaboot/cpp:fuchsia" ] hw_revision = "arm64" - - fvm_size = 17179869184 # 16 GiB } generated_partitions_config("qemu-arm64") { hw_revision = "" zbi_r = "zircon_r" - zbi_r_size = 33554432 # 32 MiB } } @@ -133,7 +98,6 @@ generated_partitions_config("riscv64") { hw_revision = "riscv64" zbi_r = "zircon_r" - zbi_r_size = 33554432 # 32 MiB } not_needed([ "_standard_names" ])
diff --git a/build/bazel/assembly/partitions_configurations/BUILD.bazel b/build/bazel/assembly/partitions_configurations/BUILD.bazel index b4c0c91e..9f14d9e 100644 --- a/build/bazel/assembly/partitions_configurations/BUILD.bazel +++ b/build/bazel/assembly/partitions_configurations/BUILD.bazel
@@ -13,16 +13,9 @@ package(default_visibility = ["//visibility:public"]) -_KIB = 1 - -_MIB = 1024 * _KIB - -_GIB = 1024 * _MIB - fuchsia_partition( name = "zircon_a", partition_name = "zircon_a", - size_kib = 32 * _MIB, slot = SLOT.A, type = PARTITION_TYPE.ZBI, ) @@ -30,7 +23,6 @@ fuchsia_partition( name = "zircon_b", partition_name = "zircon_b", - size_kib = 32 * _MIB, slot = SLOT.B, type = PARTITION_TYPE.ZBI, ) @@ -38,7 +30,6 @@ fuchsia_partition( name = "zircon_r", partition_name = "zircon_r", - size_kib = 32 * _MIB, slot = SLOT.R, type = PARTITION_TYPE.ZBI, ) @@ -46,7 +37,6 @@ fuchsia_partition( name = "vbmeta_a", partition_name = "vbmeta_a", - size_kib = 64 * _KIB, slot = SLOT.A, type = PARTITION_TYPE.VBMETA, ) @@ -54,7 +44,6 @@ fuchsia_partition( name = "vbmeta_b", partition_name = "vbmeta_b", - size_kib = 64 * _KIB, slot = SLOT.B, type = PARTITION_TYPE.VBMETA, ) @@ -62,7 +51,6 @@ fuchsia_partition( name = "vbmeta_r", partition_name = "vbmeta_r", - size_kib = 64 * _KIB, slot = SLOT.R, type = PARTITION_TYPE.VBMETA, ) @@ -70,14 +58,12 @@ fuchsia_partition( name = "fvm", partition_name = "fvm", - size_kib = 16 * _GIB, type = PARTITION_TYPE.FVM, ) fuchsia_partition( name = "fxfs", partition_name = "fvm", - size_kib = 16 * _GIB, type = PARTITION_TYPE.FXFS, ) @@ -101,45 +87,6 @@ type = "", ) -# --- x64 Partition Targets --- -fuchsia_partition( - name = "x64_zircon_a", - partition_name = "zircon_a", - size_kib = 128 * _MIB, - slot = SLOT.A, - type = PARTITION_TYPE.ZBI, -) - -fuchsia_partition( - name = "x64_zircon_b", - partition_name = "zircon_b", - size_kib = 128 * _MIB, - slot = SLOT.B, - type = PARTITION_TYPE.ZBI, -) - -fuchsia_partition( - name = "x64_zircon_r", - partition_name = "zircon_r", - size_kib = 196 * _MIB, - slot = SLOT.R, - type = PARTITION_TYPE.ZBI, -) - -fuchsia_partition( - name = "x64_fvm", - partition_name = "fvm", - size_kib = 56 * _GIB, - type = PARTITION_TYPE.FVM, -) - -fuchsia_partition( - name = "x64_fxfs", - partition_name = "fvm", - size_kib = 56 * _GIB, - type = PARTITION_TYPE.FXFS, -) - fuchsia_partitions_configuration( name = "x64", bootloader_partitions = [ @@ -147,14 +94,14 @@ ], hardware_revision = "x64", partitions = [ - ":x64_zircon_a", - ":x64_zircon_b", - ":x64_zircon_r", + ":zircon_a", + ":zircon_b", + ":zircon_r", ":vbmeta_a", ":vbmeta_b", ":vbmeta_r", - ":x64_fvm", - ":x64_fxfs", + ":fvm", + ":fxfs", ], )