mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-11-24 02:05:01 +00:00
With version 1.0, the BIOS displays its screens using composited images, but
we still have to create a new bmp image for every HWID. Version 1.1 lets us
render the ASCII HWID string directly, so the BIOS screens don't need
modification just because the HWID changes.
In the yaml file, we just replace the hwid image with a magic string, like
so:
bmpblock: 1.1
[...]
screens:
en_remove:
- [ 0, 0, remove_bg]
- [256, 534, en_model_text]
- [314, 534, $HWID]
- [192, 479, url]
- [195, 453, en_remove_text]
This change modifies the bmpblk_utility to accept and generate both 1.0 and
1.1 versions. It also updates the supporting scripts (most of which aren't
needed anymore) and adds a new DEFAULT.yaml file which can be used as the
basis for all locales.
BUG=chrome-os-partner:3264
TEST=none (manual)
Change-Id: I012349393848393928282
Reviewed-on: http://gerrit.chromium.org/gerrit/378
Tested-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
38 lines
1.0 KiB
Python
Executable File
38 lines
1.0 KiB
Python
Executable File
#!/usr/bin/python -tt
|
|
# 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.
|
|
|
|
"""Quick-and-dirty viewer for bmpblock yaml files"""
|
|
import os
|
|
import sys
|
|
import wx
|
|
|
|
from lib import bmpblock
|
|
from lib import pixcontrol
|
|
from lib import pixdisplay
|
|
|
|
|
|
class MyApp(wx.App):
|
|
|
|
def OnInit(self):
|
|
progname = os.path.basename(sys.argv[0])
|
|
progdir = os.path.abspath(os.path.dirname(sys.argv[0]))
|
|
self._bmpblock = bmpblock.BmpBlock(os.path.join(progdir, 'lib'),
|
|
sys.argv[1])
|
|
self._mainframe = pixcontrol.Frame(self._bmpblock, progname)
|
|
self._mainframe.Show()
|
|
self.SetTopWindow(self._mainframe)
|
|
self._imgframe = pixdisplay.Frame(self._bmpblock, sys.argv[1])
|
|
self._imgframe.Show()
|
|
return True
|
|
|
|
def main():
|
|
if len(sys.argv) != 2:
|
|
print "You must specify a config.yaml file to view"
|
|
sys.exit(1)
|
|
MyApp(False).MainLoop()
|
|
|
|
if __name__ == '__main__':
|
|
main()
|