summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorDaisuke Nojiri <dnojiri@chromium.org>2016-08-10 16:36:24 -0700
committerchrome-bot <chrome-bot@chromium.org>2019-05-07 17:23:01 -0700
commitad546b47f698ef1bd4ec26cbd157334f61b50958 (patch)
tree38c8782412dbfbef29fcaa879ea061b60a7fdd4e /firmware
parentdde7e4c51831d542a52f166fa3fa2634b5b9b615 (diff)
downloadvboot-ad546b47f698ef1bd4ec26cbd157334f61b50958.tar.gz
Remove code for displaying screen from GBB
This patch removes the code displaying vboot screens using bitmap and layout data stored in GBB. bmpblk_utility, and futility support for BmpBlock is also removed. BUG=chromium:622501,chrome-os-partner:54619,b:124141368 BRANCH=none CQ-DEPEND=CL:373123 TEST=Verified screens on eve && emerge-eve chromeos-bootimage && make runtests Change-Id: I1a8dd8ff0162965e81df121d5a87ea64310a0854 Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/367882 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Joel Kitching <kitching@chromium.org> Reviewed-by: Joel Kitching <kitching@chromium.org>
Diffstat (limited to 'firmware')
-rw-r--r--firmware/include/bmpblk_header.h149
-rw-r--r--firmware/lib/include/bmpblk_font.h63
-rw-r--r--firmware/lib/include/vboot_display.h2
-rw-r--r--firmware/lib/vboot_display.c1
4 files changed, 0 insertions, 215 deletions
diff --git a/firmware/include/bmpblk_header.h b/firmware/include/bmpblk_header.h
deleted file mode 100644
index fec309d8..00000000
--- a/firmware/include/bmpblk_header.h
+++ /dev/null
@@ -1,149 +0,0 @@
-/* Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- *
- * Data structure definitions for firmware screen block (BMPBLOCK).
- *
- * The BmpBlock structure looks like:
- * +-----------------------------------------+
- * | BmpBlock Header |
- * +-----------------------------------------+
- * | ScreenLayout[0] | \
- * +-----------------------------------------+ |
- * | ScreenLayout[1] | |
- * +-----------------------------------------+ Localization[0]
- * | ... | |
- * +-----------------------------------------+ |
- * | ScreenLayout[number_of_screenlayouts-1] | /
- * +-----------------------------------------+
- * | ScreenLayout[0] | \
- * +-----------------------------------------+ Localization[1]
- * | ... | /
- * +-----------------------------------------+ ...
- * | ScreenLayout[0] | \
- * +-----------------------------------------+ Localization[
- * | ... | / number_of_localizations-1]
- * +-----------------------------------------+
- * | ImageInfo[0] |
- * +-----------------------------------------+
- * | Image Content |
- * +-----------------------------------------+
- * | ImageInfo[2] | ImageInfo is 4-byte aligned.
- * +-----------------------------------------+
- * | Image Content |
- * +-----------------------------------------+
- * | ... |
- * +-----------------------------------------+
- * | ImageInfo[number_fo_images-1] |
- * +-----------------------------------------+
- * | Image Content |
- * +-----------------------------------------+
- * | List of locale names |
- * +-----------------------------------------+
- */
-#ifndef VBOOT_REFERENCE_BMPBLK_HEADER_H_
-#define VBOOT_REFERENCE_BMPBLK_HEADER_H_
-#include <stdint.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#define BMPBLOCK_SIGNATURE "$BMP"
-#define BMPBLOCK_SIGNATURE_SIZE (4)
-
-#define BMPBLOCK_MAJOR_VERSION (0x0002)
-#define BMPBLOCK_MINOR_VERSION (0x0000)
-
-#define MAX_IMAGE_IN_LAYOUT (16)
-
-/* BMPBLOCK header, describing how many screen layouts and image infos */
-typedef struct BmpBlockHeader {
- /* BMPBLOCK_SIGNATURE $BMP */
- uint8_t signature[BMPBLOCK_SIGNATURE_SIZE];
- uint16_t major_version; /* see BMPBLOCK_MAJOR_VER */
- uint16_t minor_version; /* see BMPBLOCK_MINOR_VER */
- uint32_t number_of_localizations; /* Number of localizations */
- /* Number of screen layouts in each localization */
- uint32_t number_of_screenlayouts;
- uint32_t number_of_imageinfos; /* Number of image infos */
- /* Offset of locale-translation string */
- uint32_t locale_string_offset;
- uint32_t reserved[2];
-} __attribute__((packed)) BmpBlockHeader;
-
-/* Screen layout, describing how to stack multiple images on screen */
-typedef struct ScreenLayout {
- /*
- * Images contained in the screen. Will be rendered from 0 to
- * (number_of_images-1).
- */
- struct {
- /* (X,Y) offset of image to be rendered */
- uint32_t x;
- uint32_t y;
- /* Offset of image info from start of BMPBLOCK; 0=end it. */
- uint32_t image_info_offset;
- } images[MAX_IMAGE_IN_LAYOUT];
-} __attribute__((packed)) ScreenLayout;
-
-/* Constants for screen index */
-typedef enum ScreenIndex {
- SCREEN_DEVELOPER_WARNING = 0,
- SCREEN_RECOVERY_REMOVE,
- SCREEN_RECOVERY_NO_GOOD,
- SCREEN_RECOVERY_INSERT,
- SCREEN_RECOVERY_TO_DEV,
- SCREEN_DEVELOPER_TO_NORM,
- SCREEN_WAIT,
- SCREEN_TO_NORM_CONFIRMED,
- SCREEN_OS_BROKEN,
- MAX_VALID_SCREEN_INDEX,
- SCREEN_BLANK = ~0UL,
-} ScreenIndex;
-
-/* Image info, describing the information of the image block */
-typedef struct ImageInfo {
- uint32_t tag; /* Tag it as a special image, like HWID */
- uint32_t width; /* Width of the image */
- uint32_t height; /* Height of the image */
- uint32_t format; /* File format of the image */
- uint32_t compression; /* Compression method for the image file */
- uint32_t original_size; /* Size of the original uncompressed image */
- /*
- * Size of the compressed image; if image is not compressed, this will
- * be the same as the original size.
- */
- uint32_t compressed_size;
- uint32_t reserved;
- /* NOTE: The actual image content (if any) follows immediately. */
-} __attribute__((packed)) ImageInfo;
-
-/* Constants for ImageInfo.tag */
-typedef enum ImageTag {
- TAG_NONE = 0,
- TAG_HWID,
- TAG_HWID_RTOL, /* "right-to-left", ie, right-justified HWID */
-} ImageTag;
-
-/* Constants for ImageInfo.format */
-typedef enum ImageFormat {
- FORMAT_INVALID = 0,
- FORMAT_BMP,
- FORMAT_FONT,
-} ImageFormat;
-
-/*
- * These magic image names can be used in the .yaml file to indicate that the
- * ASCII HWID should be displayed. For RENDER_HWID, the image coordinates
- * specify upper-left corner of the HWID string. For RENDER_HWID_RTOL, they
- * indicate the upper-right corner (handy for right-to-left languages).
- */
-#define RENDER_HWID "$HWID"
-#define RENDER_HWID_RTOL "$HWID.rtol"
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* VBOOT_REFERENCE_BMPBLK_HEADER_H_ */
diff --git a/firmware/lib/include/bmpblk_font.h b/firmware/lib/include/bmpblk_font.h
deleted file mode 100644
index 24f908ea..00000000
--- a/firmware/lib/include/bmpblk_font.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- *
- * This describes the internal format used to pack a set of character glpyhs so
- * we can render strings by drawing one character at a time.
- *
- * The format is this:
- *
- * +-------------------------+
- * | FontArrayHeader |
- * +-------------------------+
- * | FontArrayEntryHeader[0] |
- * +-------------------------+
- * | raw image data[0] |
- * +-------------------------+
- * | FontArrayEntryHeader[1] |
- * +-------------------------+
- * | raw image data[1] |
- * +-------------------------+
- * | FontArrayEntryHeader[2] |
- * +-------------------------+
- * | raw image data[2] |
- * +-------------------------+
- * ...
- * +-------------------------+
- * | FontArrayEntryHeader[n] |
- * +-------------------------+
- * | raw image data[n] |
- * +-------------------------+
- *
- * The FontArrayHeader describes how many characters will be encoded.
- * Each character encoding consists of a FontArrayEntryHeader followed
- * immediately by the raw image data for that character.
- */
-
-#ifndef VBOOT_REFERENCE_BMPBLK_FONT_H_
-#define VBOOT_REFERENCE_BMPBLK_FONT_H_
-
-#include "bmpblk_header.h"
-
-#define FONT_SIGNATURE "FONT"
-#define FONT_SIGNATURE_SIZE 4
-
-typedef struct FontArrayHeader {
- uint8_t signature[FONT_SIGNATURE_SIZE];
- uint32_t num_entries; /* Number of chars encoded here. */
-} __attribute__((packed)) FontArrayHeader;
-
-typedef struct FontArrayEntryHeader {
- uint32_t ascii; /* What to show. Could even be UTF? */
- ImageInfo info; /* Describes the bitmap. */
-
- /*
- * The image to use follows immediately, NOT compressed. It's
- * uncompressed because each glyph is only a few hundred bytes, but
- * they have much in common (colormaps, for example). When we add the
- * whole font blob to the bmpblk, it will be compressed as a single
- * item there.
- */
-} __attribute__((packed)) FontArrayEntryHeader;
-
-#endif /* VBOOT_REFERENCE_BMPBLK_FONT_H_ */
diff --git a/firmware/lib/include/vboot_display.h b/firmware/lib/include/vboot_display.h
index 99e49f1a..ed259a0c 100644
--- a/firmware/lib/include/vboot_display.h
+++ b/firmware/lib/include/vboot_display.h
@@ -8,8 +8,6 @@
#ifndef VBOOT_REFERENCE_VBOOT_DISPLAY_H_
#define VBOOT_REFERENCE_VBOOT_DISPLAY_H_
-struct vb2_context;
-
VbError_t VbDisplayScreen(struct vb2_context *ctx, uint32_t screen, int force,
const VbScreenData *data);
VbError_t VbDisplayMenu(struct vb2_context *ctx,
diff --git a/firmware/lib/vboot_display.c b/firmware/lib/vboot_display.c
index c4b4f87a..c43becec 100644
--- a/firmware/lib/vboot_display.c
+++ b/firmware/lib/vboot_display.c
@@ -12,7 +12,6 @@
#include "2misc.h"
#include "2nvstorage.h"
#include "2sha.h"
-#include "bmpblk_font.h"
#include "gbb_access.h"
#include "gbb_header.h"
#include "utility.h"