diff options
| author | Adrian Freihofer <adrian.freihofer@gmail.com> | 2023-05-15 17:26:20 +0200 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2023-06-16 13:01:43 -0400 |
| commit | d0c3d1b26d9971fe2be9a492832d4012936b9b54 (patch) | |
| tree | 366593ec8d784181beebd74219f0e7602b083c1c | |
| parent | a9396d5333c833da39adeb1cb13370a95708ed8e (diff) | |
| download | meta-virtualization-d0c3d1b26d9971fe2be9a492832d4012936b9b54.tar.gz | |
busybox-initrd: auto pv from busybox
Not hardcoding the version of busybox from the core layer in this layer
is a small improvement for maintenance.
But the main motivation is to support the following layer combination
without getting a parse error from bitbake:
- poky LTS, branch = kirkstone
- meta-lts-mixins, branch = kirkstone/go
- meta-lts-mixins, branch = kirkstone/rust
- meta-virtualization, branch = master
Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
| -rw-r--r-- | recipes-core/busybox/busybox-initrd.bb (renamed from recipes-core/busybox/busybox-initrd_1.36.0.bb) | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/recipes-core/busybox/busybox-initrd_1.36.0.bb b/recipes-core/busybox/busybox-initrd.bb index 6108e9af..513ed135 100644 --- a/recipes-core/busybox/busybox-initrd_1.36.0.bb +++ b/recipes-core/busybox/busybox-initrd.bb | |||
| @@ -1,5 +1,19 @@ | |||
| 1 | FILESEXTRAPATHS:prepend := "${THISDIR}/busybox-initrd:${COREBASE}/meta/recipes-core/busybox/busybox:${COREBASE}/meta/recipes-core/busybox/files:" | 1 | FILESEXTRAPATHS:prepend := "${THISDIR}/busybox-initrd:${COREBASE}/meta/recipes-core/busybox/busybox:${COREBASE}/meta/recipes-core/busybox/files:" |
| 2 | 2 | ||
| 3 | def get_busybox_pv(d): | ||
| 4 | import re | ||
| 5 | corebase = d.getVar('COREBASE') | ||
| 6 | bb_dir = os.path.join(corebase, 'meta', 'recipes-core', 'busybox') | ||
| 7 | if os.path.isdir(bb_dir): | ||
| 8 | re_bb_name = re.compile(r"busybox_([0-9.]*)\.bb") | ||
| 9 | for bb_file in os.listdir(bb_dir): | ||
| 10 | result = re_bb_name.match(bb_file) | ||
| 11 | if result: | ||
| 12 | return result.group(1) | ||
| 13 | bb.fatal("Cannot find busybox recipe in %s" % bb_dir) | ||
| 14 | |||
| 15 | PV := "${@get_busybox_pv(d)}" | ||
| 16 | |||
| 3 | require recipes-core/busybox/busybox_${PV}.bb | 17 | require recipes-core/busybox/busybox_${PV}.bb |
| 4 | 18 | ||
| 5 | SRC_URI += "file://init.cfg \ | 19 | SRC_URI += "file://init.cfg \ |
