futility/file_type_bios: Remove old FlashMap area names
Old names are not in use for very long time, so remove them.
BUG=b:197114807
TEST=cros-workon-volteer start vboot_reference && \
FW_NAME=voxel emerge-volteer vboot_reference coreboot
chromeos-bootimage
TEST=sudo FEATURES=test emerge vboot_reference
BRANCH=none
Signed-off-by: Jakub Czapiga <jacz@semihalf.com>
Change-Id: I07916b82a721481c982b291e228df0772e0fc2a2
Disallow-Recycled-Builds: test-failures
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3575323
Auto-Submit: Jakub Czapiga <czapiga@google.com>
Commit-Queue: Jakub Czapiga <czapiga@google.com>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: Jakub Czapiga <czapiga@google.com>
diff --git a/futility/cmd_sign.c b/futility/cmd_sign.c
index be8b634..a08238e 100644
--- a/futility/cmd_sign.c
+++ b/futility/cmd_sign.c
@@ -938,7 +938,6 @@
* may want to read it instead. */
break;
case FILE_TYPE_BIOS_IMAGE:
- case FILE_TYPE_OLD_BIOS_IMAGE:
errorcnt += no_opt_if(!sign_option.signprivate, "signprivate");
errorcnt += no_opt_if(!sign_option.keyblock, "keyblock");
errorcnt += no_opt_if(!sign_option.kernel_subkey, "kernelkey");
diff --git a/futility/file_type.inc b/futility/file_type.inc
index 0d3acc9..7a32f9b 100644
--- a/futility/file_type.inc
+++ b/futility/file_type.inc
@@ -19,10 +19,6 @@
R_(ft_recognize_bios_image),
S_(ft_show_bios),
S_(ft_sign_bios))
-FILE_TYPE(OLD_BIOS_IMAGE, "oldbios", "Cr-48 Chrome OS BIOS image",
- R_(ft_recognize_bios_image),
- S_(ft_show_bios),
- S_(ft_sign_bios))
FILE_TYPE(GBB, "gbb", "GBB",
R_(ft_recognize_gbb),
S_(ft_show_gbb),
diff --git a/futility/file_type_bios.c b/futility/file_type_bios.c
index fe0b223..6427201 100644
--- a/futility/file_type_bios.c
+++ b/futility/file_type_bios.c
@@ -27,16 +27,6 @@
_Static_assert(ARRAY_SIZE(fmap_name) == NUM_BIOS_COMPONENTS,
"Size of fmap_name[] should match NUM_BIOS_COMPONENTS");
-static const char * const fmap_oldname[] = {
- "GBB Area", /* BIOS_FMAP_GBB */
- "Firmware A Data", /* BIOS_FMAP_FW_MAIN_A */
- "Firmware B Data", /* BIOS_FMAP_FW_MAIN_B */
- "Firmware A Key", /* BIOS_FMAP_VBLOCK_A */
- "Firmware B Key", /* BIOS_FMAP_VBLOCK_B */
-};
-_Static_assert(ARRAY_SIZE(fmap_oldname) == NUM_BIOS_COMPONENTS,
- "Size of fmap_oldname[] should match NUM_BIOS_COMPONENTS");
-
static void fmap_limit_area(FmapAreaHeader *ah, uint32_t len)
{
uint32_t sum = ah->area_offset + ah->area_size;
@@ -191,8 +181,7 @@
fmap = fmap_find(buf, len);
for (c = 0; c < NUM_BIOS_COMPONENTS; c++) {
/* We know one of these will work, too */
- if (fmap_find_by_name(buf, len, fmap, fmap_name[c], &ah) ||
- fmap_find_by_name(buf, len, fmap, fmap_oldname[c], &ah)) {
+ if (fmap_find_by_name(buf, len, fmap, fmap_name[c], &ah)) {
/* But the file might be truncated */
fmap_limit_area(ah, len);
/* The name is not necessarily null-terminated */
@@ -454,8 +443,7 @@
fmap = fmap_find(buf, len);
for (c = 0; c < NUM_BIOS_COMPONENTS; c++) {
/* We know one of these will work, too */
- if (fmap_find_by_name(buf, len, fmap, fmap_name[c], &ah) ||
- fmap_find_by_name(buf, len, fmap, fmap_oldname[c], &ah)) {
+ if (fmap_find_by_name(buf, len, fmap, fmap_name[c], &ah)) {
/* But the file might be truncated */
fmap_limit_area(ah, len);
/* The name is not necessarily null-terminated */
@@ -499,11 +487,5 @@
if (c == NUM_BIOS_COMPONENTS)
return FILE_TYPE_BIOS_IMAGE;
- for (c = 0; c < NUM_BIOS_COMPONENTS; c++)
- if (!fmap_find_by_name(buf, len, fmap, fmap_oldname[c], 0))
- break;
- if (c == NUM_BIOS_COMPONENTS)
- return FILE_TYPE_OLD_BIOS_IMAGE;
-
return FILE_TYPE_UNKNOWN;
}
diff --git a/tests/futility/data/README b/tests/futility/data/README
index 6723f3d..57038c3 100644
--- a/tests/futility/data/README
+++ b/tests/futility/data/README
@@ -1,6 +1,5 @@
These are officially signed BIOS images from existing Chromebooks.
- bios_mario_mp.bin uses old names for the FMAP areas
bios_zgb_mp.bin RW firmware A and B are different
bios_link_mp.bin uses the RO_NORMAL flag to skip RW firmware validation
bios_peppy_mp.bin doesn't do any of those things
diff --git a/tests/futility/data/bios_mario_mp.bin b/tests/futility/data/bios_mario_mp.bin
deleted file mode 100644
index 8a6e8c5..0000000
--- a/tests/futility/data/bios_mario_mp.bin
+++ /dev/null
Binary files differ
diff --git a/tests/futility/expect_output/show.tests_futility_data_bios_mario_mp.bin b/tests/futility/expect_output/show.tests_futility_data_bios_mario_mp.bin
deleted file mode 100644
index 6039855..0000000
--- a/tests/futility/expect_output/show.tests_futility_data_bios_mario_mp.bin
+++ /dev/null
@@ -1,63 +0,0 @@
-BIOS: tests/futility/data/bios_mario_mp.bin
-GBB header: GBB Area
- Version: 1.0
- Flags: 0x00000000
- Regions: offset size
- hwid 0x00000080 0x00000100
- bmpvf 0x00001180 0x0003de80
- rootkey 0x00000180 0x00001000
- recovery_key 0x0003f000 0x00001000
- Size: 0x00040000 / 0x00040000
-GBB content:
- HWID: {9D799111-A88A-439E-9E1F-FBBB41B00A9A}
- digest: <none>
- Root Key:
- Vboot API: 1.0
- Algorithm: 11 RSA8192 SHA512
- Key Version: 1
- Key sha1sum: 541f467a7d8747f55ae9087ee4e34155f5ee3cd7
- Recovery Key:
- Vboot API: 1.0
- Algorithm: 11 RSA8192 SHA512
- Key Version: 1
- Key sha1sum: 5d0d163b824cab5ae4f23fb2cc012e2a4124f4fe
-Firmware body: Firmware A Data
- Offset: 0x00040000
- Size: 0x000d0000
-Firmware body: Firmware B Data
- Offset: 0x00120000
- Size: 0x000d0000
-Keyblock: Firmware A Key
- Signature: valid
- Size: 0x8b8
- Flags: 7 !DEV DEV !REC
- Data key algorithm: 8 RSA4096 SHA512
- Data key version: 1
- Data key sha1sum: cd72cfb929765f82baba0a01ed937a73f502f6c5
-Firmware Preamble:
- Size: 2164
- Header version: 2.1
- Firmware version: 1
- Kernel key algorithm: 8 RSA4096 SHA512
- Kernel key version: 1
- Kernel key sha1sum: e39e019cb5df3e874f443721540cb261a88c58ef
- Firmware body size: 851968
- Preamble flags: 0
-Body verification succeeded.
-Keyblock: Firmware B Key
- Signature: valid
- Size: 0x8b8
- Flags: 7 !DEV DEV !REC
- Data key algorithm: 8 RSA4096 SHA512
- Data key version: 1
- Data key sha1sum: cd72cfb929765f82baba0a01ed937a73f502f6c5
-Firmware Preamble:
- Size: 2164
- Header version: 2.1
- Firmware version: 1
- Kernel key algorithm: 8 RSA4096 SHA512
- Kernel key version: 1
- Kernel key sha1sum: e39e019cb5df3e874f443721540cb261a88c58ef
- Firmware body size: 851968
- Preamble flags: 0
-Body verification succeeded.
diff --git a/tests/futility/test_file_types.c b/tests/futility/test_file_types.c
index 3f88872..d53760c 100644
--- a/tests/futility/test_file_types.c
+++ b/tests/futility/test_file_types.c
@@ -27,7 +27,6 @@
{FILE_TYPE_FW_PREAMBLE, "tests/futility/data/fw_vblock.bin"},
{FILE_TYPE_GBB, "tests/futility/data/fw_gbb.bin"},
{FILE_TYPE_BIOS_IMAGE, "tests/futility/data/bios_zgb_mp.bin"},
- {FILE_TYPE_OLD_BIOS_IMAGE, "tests/futility/data/bios_mario_mp.bin"},
{FILE_TYPE_KERN_PREAMBLE, "tests/futility/data/kern_preamble.bin"},
{FILE_TYPE_RAW_FIRMWARE, }, /* need a test for this */
{FILE_TYPE_RAW_KERNEL, }, /* need a test for this */
diff --git a/tests/futility/test_file_types.sh b/tests/futility/test_file_types.sh
index 4b7a9fb..93c6391 100755
--- a/tests/futility/test_file_types.sh
+++ b/tests/futility/test_file_types.sh
@@ -33,7 +33,6 @@
test_case "fw_pre" "tests/futility/data/fw_vblock.bin"
test_case "gbb" "tests/futility/data/fw_gbb.bin"
test_case "bios" "tests/futility/data/bios_zgb_mp.bin"
-test_case "oldbios" "tests/futility/data/bios_mario_mp.bin"
test_case "kernel" "tests/futility/data/kern_preamble.bin"
# We don't have a way to identify these (yet?)
# test_case "RAW_FIRMWARE"
diff --git a/tests/futility/test_show_contents.sh b/tests/futility/test_show_contents.sh
index e040362..1533ba4 100755
--- a/tests/futility/test_show_contents.sh
+++ b/tests/futility/test_show_contents.sh
@@ -17,7 +17,6 @@
tests/futility/data/fw_vblock.bin
tests/futility/data/fw_gbb.bin
tests/futility/data/bios_zgb_mp.bin
- tests/futility/data/bios_mario_mp.bin
tests/futility/data/kern_preamble.bin
tests/futility/data/sample.vbpubk2
tests/futility/data/sample.vbprik2
diff --git a/tests/futility/test_sign_firmware.sh b/tests/futility/test_sign_firmware.sh
index fa5529c..8e303e3 100755
--- a/tests/futility/test_sign_firmware.sh
+++ b/tests/futility/test_sign_firmware.sh
@@ -16,7 +16,6 @@
# script does not change the root or recovery keys in the GBB.
INFILES="
${SCRIPT_DIR}/futility/data/bios_link_mp.bin
-${SCRIPT_DIR}/futility/data/bios_mario_mp.bin
${SCRIPT_DIR}/futility/data/bios_peppy_mp.bin
"