Use the correct fonts for BIOS screens.

We should have been using Droid Sans, not Helvetica, and some of the
non-Roman locales need special handling to render clearly and correctly. We
also get better results if we avoid scaling after rendering the text.

Added scripts/newbitmaps/Makefile to regenerate it all, updated the READMEs.
Since Hung-Te figured out how to use pango-view to render the UTF-8
reliably, we don't need to keep all the pre-rendered locale images anymore
either.

This provides the x86 bmpblock for Stumpy PVT. We may need some more
tweaking for Lumpy and/or ARM.

BUG=chrome-os-partner:6595
TEST=manual

Put the new screens into the bios:

  gbb_utility -s --flags=0 -b bmpblock_x86.bin OLDBIOS NEWBIOS
  flashrom -w NEWBIOS

Then reboot and look at the BIOS screens. The lettering is much clearer.

Change-Id: Icb07bc6d131920730f41348c7de9151e42cc9518
Reviewed-on: https://gerrit.chromium.org/gerrit/11007
Tested-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
This commit is contained in:
Bill Richardson
2011-11-01 14:18:29 -07:00
parent fbc4b7d8fd
commit f1282d321f
223 changed files with 121 additions and 79 deletions

View File

@@ -0,0 +1,49 @@
# Copyright (c) 2011 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 will regenerate the BIOS bitmap images for both x86 and arm. You
# shouldn't need to do this, though.
# These are all the known locales, sorted more-or-less geograpically
ALL_LOCALES=en es_419 pt_BR en_GB fr es pt_PT ca it de \
el nl da no sv fi et lv lt ru pl cs sk hu sl sr hr bg ro \
uk tr iw ar fa hi th vi id fil zh_CN zh_TW ko ja
# Here are the launch locales for Stumpy/Lumpy (issue 6595), same ordering.
DEFAULT_LOCALES=en es_419 pt_BR en_GB fr es it de nl da no sv ko ja
default: outside_chroot fonts x86 arm clean
outside_chroot:
@if [ -e /etc/debian_chroot ]; then \
echo "ImageMagick is too complex to build inside the chroot."; \
echo "You must be outside the chroot to do this"; \
echo "(and you probably shouldn't be doing it anyway)."; \
exit 1; \
fi
fonts:
cd fonts && ./make_ascii_bmps.py
bmpblk_font --outfile images/hwid_fonts.bin fonts/outdir/*
x86:
$(MAKE) -C strings/localized_text PT=15
cd strings/localized_text && tar cf temp.tar */*.bmp
mkdir -p images/out_$@/localized_images
cd images/out_$@/localized_images && \
tar xf ../../../strings/localized_text/temp.tar
$(MAKE) -C images $@ DEFAULT_LOCALES="$(DEFAULT_LOCALES)"
cp -f images/out_$@/bmpblock.bin bmpblock_$@.bin
arm:
@echo "FIXME: ARM bitmaps are not yet autogenerated"
clean:
rm -rf fonts/outdir strings/localized_text/*/*.bmp \
strings/localized_text/temp.tar \
images/localized_images \
images/out_x86 images/out_arm
.PHONY: outside_chroot fonts x86 arm

View File

@@ -49,7 +49,7 @@ last-displayed locale is stored in nvram, so it's sticky across reboots. The
factory process sets the default locale to the appropriate region.
Version 1.2. Used by any BIOS that uses "vboot_api.h"
Version 1.2. Used by any BIOS that uses "vboot_api.h" (ARM, Stumpy, etc.)
The "vboot wrapper" is a refactoring of the vboot_reference library to
isolate our verified boot stuff from the underlying BIOS. Among other
@@ -78,6 +78,7 @@ screen without a corresponding font should be silently ignored.
--------------------------------------------
Instructions for manually rebuilding things:
We do most of the image manipulation using ImageMagick, which is much easier
and simpler to do OUTSIDE of the chroot. So the first step is to just build
vboot_reference outside of the chroot.
@@ -86,47 +87,26 @@ vboot_reference outside of the chroot.
make
You'll probably need to install several additional packages to make this
work. In addition, scripts/newbitmaps/bitmap_viewer is a python script that
may require some packages of its own. Test it by changing to the
scripts/newbitmaps/images directory and running
../bitmap_viewer DEFAULT.yaml
On Ubuntu you may find you need libtspi-dev, uuid-dev, imagemagick,
python-yaml, and python-wxgtk2.8, among others.
work. On Ubuntu you may find you need libtspi-dev, uuid-dev, and
imagemagick. If you want to use scripts/newbitmaps/bitmap_viewer, you may
need python-yaml and python-wxgtk2.8.
Once you've built vboot_reference you'll find the executables in
./build/utility/ (and ./build/cgpt/cgpt, if you want it). Put these
somewhere in your $PATH.
Now you should be able to just run "make" and everything will be
regenerated:
Create the font file:
cd scripts/newbitmaps
make
cd scripts/newbitmaps/fonts
./make_ascii_bmps.py
bmpblk_font --outfile ../images/hwid_fonts.bin outdir/*
Create and examine the localized images:
For x86:
cd scripts/newbitmaps/images
make x86
cd out_x86
../../bitmap_viewer DEFAULT.yaml
bmpblock_utility -c DEFAULT.yaml bmpblock.bin
For arm:
cd scripts/newbitmaps/images
make arm
cd out_arm
../../bitmap_viewer DEFAULT.yaml
bmpblock_utility -c DEFAULT.yaml bmpblock.bin
This should generate both x86 and ARM versions of the BIOS bmpblock file,
although ARM may not be 100% correct just yet.
Now use the gbb_utility to modify your BIOS to contain this new set of
You can use the gbb_utility to modify your BIOS to contain this new set of
bitmaps:
gbb_utility -s -b PATH/TO/YOUR/bmpblock.bin OLDBIOS.bin NEWBIOS.bin

Binary file not shown.

View File

@@ -12,10 +12,13 @@
TARGETS=x86 arm
# These are all the known locales, sorted more-or-less geograpically. We
# generally don't have room in the BIOS for all of them at once.
DEFAULT_LOCALES=en es_419 pt_BR en_GB fr es pt_PT ca it de \
el nl da no sv fi et lv lt ru pl cs sk hu sl sr hr bg ro \
uk tr iw ar fa hi th vi id fil zh_CN zh_TW ko ja
BASE_IMAGES=Devmode.bmp Insert.bmp Remove.bmp Yuck.bmp
OTHER_IMAGES=Url.bmp hwid_unknown.bmp
FONTS=hwid_fonts.bin
@@ -49,9 +52,6 @@ _arm_scale=59%x78%
x86::
# create output directories
mkdir -p "out_$@"
for i in localized_images/*; do \
mkdir -p "out_$@/$$i"; \
done
# copy stuff we need
cp "${FONTS}" "out_$@"
# scale the background pictures exactly...
@@ -61,8 +61,7 @@ x86::
"BMP3:out_$@/$$i" || \
exit 1; \
done
# scale the localized string images using percentages...
@for i in ${OTHER_IMAGES} localized_images/*/*.bmp; do \
@for i in ${OTHER_IMAGES}; do \
echo " out_$@/$$i" && \
convert $$i -scale '${_x86_scale}' ${_x86_opts} \
"BMP3:out_$@/$$i" || \

View File

@@ -1,3 +0,0 @@
These are the official images from which the BIOS bitmaps are derived. If
changes are needed, send these graphical images to the localization experts
for review. Rendering UTF text into the correct images is not 100% reliable.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Some files were not shown because too many files have changed in this diff Show More