[oe-commits] [openembedded-core] 01/01: wic: allow multiple /boot partitions with different content
git at git.openembedded.org
git at git.openembedded.org
Mon Sep 18 10:08:58 UTC 2017
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository openembedded-core.
commit fedd9f0797d271af90d501ac07554ff0a0e38ddc
Author: Enrico Scholz <enrico.scholz at ensc.de>
AuthorDate: Fri Sep 8 19:33:02 2017 +0200
wic: allow multiple /boot partitions with different content
It can be useful to have multiple partitions with '--source bootimg-partition'
but different content.
E.g. for TI AM335x, one boot partition can contain an first stage
bootloader ("MLO"), while the real bootloader and kernel plus devicetree
are in another one.
Patch allows to specify multiple IMAGE_BOOT_FILES with optional "_label-XXX"
or "_uuid-XXX" overrides.
E.g. with this patch, a .wks file with
| part --source bootimg-partition ... --label=mlo --active
| part --source bootimg-partition ... --label=boot0
| part --source bootimg-partition ... --label=boot1
and a recipe with
| IMAGE_BOOT_FILES_label-mlo = "\
| MLO-${MACHINE}.img;MLO \
| "
|
| IMAGE_BOOT_FILES_label-boot0 = "\
| u-boot-${MACHINE}.img;u-boot.img \
| zImage \
| "
|
| IMAGE_BOOT_FILES_label-boot1 = "${IMAGE_BOOT_FILES_label-boot0}"
|
| WICVARS += " \
| IMAGE_BOOT_FILES_label-mlo \
| IMAGE_BOOT_FILES_label-boot0 \
| IMAGE_BOOT_FILES_label-boot1 \
| "
is possible. It will create one partition with the MLO and two redundant
ones with the uboot + kernel.
(From OE-Core rev: f6b14cae845e6e8b8c9c2e28af14064addfc1aed)
Signed-off-by: Enrico Scholz <enrico.scholz at ensc.de>
Signed-off-by: Ross Burton <ross.burton at intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
scripts/lib/wic/plugins/source/bootimg-partition.py | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/scripts/lib/wic/plugins/source/bootimg-partition.py b/scripts/lib/wic/plugins/source/bootimg-partition.py
index ca074a3..67e5498 100644
--- a/scripts/lib/wic/plugins/source/bootimg-partition.py
+++ b/scripts/lib/wic/plugins/source/bootimg-partition.py
@@ -54,7 +54,7 @@ class BootimgPartitionPlugin(SourcePlugin):
- sets up a vfat partition
- copies all files listed in IMAGE_BOOT_FILES variable
"""
- hdddir = "%s/boot" % cr_workdir
+ hdddir = "%s/boot.%d" % (cr_workdir, part.lineno)
install_cmd = "install -d %s" % hdddir
exec_cmd(install_cmd)
@@ -65,10 +65,19 @@ class BootimgPartitionPlugin(SourcePlugin):
logger.debug('Kernel dir: %s', bootimg_dir)
- boot_files = get_bitbake_var("IMAGE_BOOT_FILES")
+ boot_files = None
+ for (fmt, id) in (("_uuid-%s", part.uuid), ("_label-%s", part.label), (None, None)):
+ if fmt:
+ var = fmt % id
+ else:
+ var = ""
+
+ boot_files = get_bitbake_var("IMAGE_BOOT_FILES" + var)
+ if boot_files is not None:
+ break
- if not boot_files:
- raise WicError('No boot files defined, IMAGE_BOOT_FILES unset')
+ if boot_files is None:
+ raise WicError('No boot files defined, IMAGE_BOOT_FILES unset for entry #%d' % part.lineno)
logger.debug('Boot files: %s', boot_files)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list