cros_bundle_firmware: Pack SeaBIOS into rw-legacy section
Instead of making SeaBIOS the coreboot payload, we need to
pack it into the rw-legacy section of the fmap, so it can
be started by pressing CTRL-L at the dev mode screen.
CQ-DEPEND=CL:35130 CL:35131 CL:35134 CL:35135
BUG=chrome-os-partner:6108
TEST=emerge-link chromeos-bootimage, see SeaBIOS CBFS is
packed into the rw-legacy section
BRANCH=link
Change-Id: I8a14cac854318c83d770f49eb9fb2ca226a6e8aa
Reviewed-on: https://gerrit.chromium.org/gerrit/35136
Commit-Ready: Stefan Reinauer <reinauer@chromium.org>
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
Tested-by: Stefan Reinauer <reinauer@chromium.org>
diff --git a/host/lib/bundle_firmware.py b/host/lib/bundle_firmware.py
index 6f37c51..b2ca3b6 100644
--- a/host/lib/bundle_firmware.py
+++ b/host/lib/bundle_firmware.py
@@ -203,6 +203,8 @@
self.coreboot_fname = os.path.join(build_root, 'coreboot.rom')
if not self.skeleton_fname:
self.skeleton_fname = os.path.join(build_root, 'coreboot.rom')
+ if not self.seabios_fname:
+ self.seabios_fname = 'seabios.cbfs'
if not self.ecrw_fname:
self.ecrw_fname = os.path.join(build_root, 'ec.RW.bin')
if not self.ecro_fname:
@@ -566,7 +568,7 @@
return bootstub, signed_postload
- def _CreateCorebootStub(self, uboot, coreboot, seabios):
+ def _CreateCorebootStub(self, uboot, coreboot):
"""Create a coreboot boot stub.
Args:
@@ -589,13 +591,7 @@
if not os.path.exists(self._tools.Filename(uboot_elf)):
uboot_elf = uboot.replace('.bin', '.elf')
shutil.copyfile(self._tools.Filename(coreboot), bootstub)
- if seabios:
- self._tools.Run('cbfstool', [bootstub, 'add-payload', seabios,
- 'fallback/payload', 'lzma'])
- self._tools.Run('cbfstool', [bootstub, 'add-payload', uboot_elf,
- 'img/U-Boot', 'lzma'])
- else:
- self._tools.Run('cbfstool', [bootstub, 'add-payload', uboot_elf,
+ self._tools.Run('cbfstool', [bootstub, 'add-payload', uboot_elf,
'fallback/payload', 'lzma'])
# Don't add the fdt yet since it is not in final form
@@ -753,9 +749,11 @@
"""
if blob_type == 'coreboot':
coreboot = self._CreateCorebootStub(self.uboot_fname,
- self.coreboot_fname, self.seabios_fname)
+ self.coreboot_fname)
pack.AddProperty('coreboot', coreboot)
pack.AddProperty('image', coreboot)
+ elif blob_type == 'legacy':
+ pack.AddProperty('legacy', self.seabios_fname)
elif blob_type == 'signed':
bootstub, signed = self._CreateBootStub(self.uboot_fname, fdt,
self.postload_fname)