summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuncan Laurie <dlaurie@chromium.org>2012-08-14 10:32:51 -0700
committerDuncan Laurie <dlaurie@chromium.org>2012-08-14 10:49:40 -0700
commit87817e48addc34f25049d847981ecc61f9c986b1 (patch)
tree4be24873d2477ee1691401c50340ad4399517365
parent95f5422c72a56783942c460547a46dade3a6ac26 (diff)
downloadvboot-87817e48addc34f25049d847981ecc61f9c986b1.tar.gz
Revert "Increase max number of bitmaps to composite to 16 per screen."
This reverts commit 22a145cb4421633e30addc6f415fd85c26a0f5a6. Missing changes mean this cherry-pick is out of order. BUG=none TEST=none Change-Id: I7bf1159a079a118e505241b77be73582c75eb3f7 Reviewed-on: https://gerrit.chromium.org/gerrit/30233 Reviewed-by: Duncan Laurie <dlaurie@chromium.org> Tested-by: Duncan Laurie <dlaurie@chromium.org>
-rw-r--r--firmware/include/bmpblk_header.h6
-rw-r--r--scripts/newbitmaps/README6
-rw-r--r--scripts/newbitmaps/default_source/bmpblock.binbin134718 -> 0 bytes
-rw-r--r--scripts/newbitmaps/default_source/config.yaml2
-rwxr-xr-xscripts/newbitmaps/images/make_default_yaml2
-rw-r--r--utility/bmpblk_utility.cc15
6 files changed, 19 insertions, 12 deletions
diff --git a/firmware/include/bmpblk_header.h b/firmware/include/bmpblk_header.h
index 06ddaa8f..c99f0fe3 100644
--- a/firmware/include/bmpblk_header.h
+++ b/firmware/include/bmpblk_header.h
@@ -53,10 +53,10 @@ __pragma(pack(push, 1)) /* Support packing for MSVC. */
#define BMPBLOCK_SIGNATURE "$BMP"
#define BMPBLOCK_SIGNATURE_SIZE (4)
-#define BMPBLOCK_MAJOR_VERSION (0x0002)
-#define BMPBLOCK_MINOR_VERSION (0x0000)
+#define BMPBLOCK_MAJOR_VERSION (0x0001)
+#define BMPBLOCK_MINOR_VERSION (0x0002)
-#define MAX_IMAGE_IN_LAYOUT (16)
+#define MAX_IMAGE_IN_LAYOUT (8)
/* BMPBLOCK header, describing how many screen layouts and image infos */
typedef struct BmpBlockHeader {
diff --git a/scripts/newbitmaps/README b/scripts/newbitmaps/README
index 1720063d..5bc2d6fd 100644
--- a/scripts/newbitmaps/README
+++ b/scripts/newbitmaps/README
@@ -74,12 +74,6 @@ The old v1.1 bmpblock will be accepted by the vboot wrapper, but a $HWID
screen without a corresponding font should be silently ignored.
-Version 2.0. Used by BIOS with complex composition (Kiev, Link, Snow, etc.)
-
-The max number of components in one screen has increased from 8 to 16, makes
-bitmap block structure incompatible with previous versions.
-
-
--------------------------------------------
Instructions for manually rebuilding things:
diff --git a/scripts/newbitmaps/default_source/bmpblock.bin b/scripts/newbitmaps/default_source/bmpblock.bin
deleted file mode 100644
index 3785fb00..00000000
--- a/scripts/newbitmaps/default_source/bmpblock.bin
+++ /dev/null
Binary files differ
diff --git a/scripts/newbitmaps/default_source/config.yaml b/scripts/newbitmaps/default_source/config.yaml
index ae03aaba..134839fd 100644
--- a/scripts/newbitmaps/default_source/config.yaml
+++ b/scripts/newbitmaps/default_source/config.yaml
@@ -3,7 +3,7 @@
# original sources are lost in the mists of time, so most of this is simply
# unpacked from the binary.
-bmpblock: 2.0
+bmpblock: 1.2
compression: 2
images:
$HWID: FONTS.bmp # 0x0 4092/58196 tag=1 fmt=2
diff --git a/scripts/newbitmaps/images/make_default_yaml b/scripts/newbitmaps/images/make_default_yaml
index 2ff1b7b9..186bfcee 100755
--- a/scripts/newbitmaps/images/make_default_yaml
+++ b/scripts/newbitmaps/images/make_default_yaml
@@ -139,7 +139,7 @@ for hwid_bmp in hwid_unknown.bmp; do
# List the images. The major difference is the HWID.
cat >"$yaml_file" <<'EOF1'
-bmpblock: 2.0
+bmpblock: 1.2
compression: 1
diff --git a/utility/bmpblk_utility.cc b/utility/bmpblk_utility.cc
index 386d2d44..2846746f 100644
--- a/utility/bmpblk_utility.cc
+++ b/utility/bmpblk_utility.cc
@@ -189,7 +189,20 @@ namespace vboot_reference {
error("Syntax error in parsing bmpblock.\n");
}
string gotversion = (char*)event.data.scalar.value;
- if (gotversion != "2.0") {
+ if (gotversion == "1.2") {
+ render_hwid_ = true;
+ support_font_ = true;
+ } else if (gotversion == "1.1") {
+ minor_version_ = 1;
+ render_hwid_ = true;
+ support_font_ = false;
+ fprintf(stderr, "WARNING: using old format: %s\n", gotversion.c_str());
+ } else if (gotversion == "1.0") {
+ minor_version_ = 0;
+ render_hwid_ = false;
+ support_font_ = false;
+ fprintf(stderr, "WARNING: using old format: %s\n", gotversion.c_str());
+ } else {
error("Unsupported version specified in config file (%s)\n",
gotversion.c_str());
}