diff options
25 files changed, 675 insertions, 58 deletions
diff --git a/meta/classes-recipe/image_types_wic.bbclass b/meta/classes-recipe/image_types_wic.bbclass index 6180874a4c..675aa97513 100644 --- a/meta/classes-recipe/image_types_wic.bbclass +++ b/meta/classes-recipe/image_types_wic.bbclass | |||
@@ -17,6 +17,7 @@ WICVARS ?= "\ | |||
17 | IMAGE_BOOT_FILES \ | 17 | IMAGE_BOOT_FILES \ |
18 | IMAGE_CLASSES \ | 18 | IMAGE_CLASSES \ |
19 | IMAGE_EFI_BOOT_FILES \ | 19 | IMAGE_EFI_BOOT_FILES \ |
20 | IMAGE_EXTRA_PARTITION_FILES \ | ||
20 | IMAGE_LINK_NAME \ | 21 | IMAGE_LINK_NAME \ |
21 | IMAGE_ROOTFS \ | 22 | IMAGE_ROOTFS \ |
22 | IMGDEPLOYDIR \ | 23 | IMGDEPLOYDIR \ |
diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc index b48c53ef11..0e5150895f 100644 --- a/meta/conf/distro/include/maintainers.inc +++ b/meta/conf/distro/include/maintainers.inc | |||
@@ -481,7 +481,7 @@ RECIPE_MAINTAINER:pn-linux-yocto-rt = "Bruce Ashfield <bruce.ashfield@gmail.com> | |||
481 | RECIPE_MAINTAINER:pn-linux-yocto-tiny = "Bruce Ashfield <bruce.ashfield@gmail.com>" | 481 | RECIPE_MAINTAINER:pn-linux-yocto-tiny = "Bruce Ashfield <bruce.ashfield@gmail.com>" |
482 | RECIPE_MAINTAINER:pn-lld = "Khem Raj <raj.khem@gmail.com>" | 482 | RECIPE_MAINTAINER:pn-lld = "Khem Raj <raj.khem@gmail.com>" |
483 | RECIPE_MAINTAINER:pn-lldb = "Khem Raj <raj.khem@gmail.com>" | 483 | RECIPE_MAINTAINER:pn-lldb = "Khem Raj <raj.khem@gmail.com>" |
484 | RECIPE_MAINTAINER:pn-llvm-project-source-21.1.1 = "Khem Raj <raj.khem@gmail.com>" | 484 | RECIPE_MAINTAINER:pn-llvm-project-source-21.1.2 = "Khem Raj <raj.khem@gmail.com>" |
485 | RECIPE_MAINTAINER:pn-llvm-tblgen-native = "Khem Raj <raj.khem@gmail.com>" | 485 | RECIPE_MAINTAINER:pn-llvm-tblgen-native = "Khem Raj <raj.khem@gmail.com>" |
486 | RECIPE_MAINTAINER:pn-logrotate = "Yi Zhao <yi.zhao@windriver.com>" | 486 | RECIPE_MAINTAINER:pn-logrotate = "Yi Zhao <yi.zhao@windriver.com>" |
487 | RECIPE_MAINTAINER:pn-log4cplus = "Unassigned <unassigned@yoctoproject.org>" | 487 | RECIPE_MAINTAINER:pn-log4cplus = "Unassigned <unassigned@yoctoproject.org>" |
diff --git a/meta/conf/machine/include/arm/arch-armv8-7a.inc b/meta/conf/machine/include/arm/arch-armv8-7a.inc new file mode 100644 index 0000000000..6039baca35 --- /dev/null +++ b/meta/conf/machine/include/arm/arch-armv8-7a.inc | |||
@@ -0,0 +1,14 @@ | |||
1 | DEFAULTTUNE ?= "armv8-7a" | ||
2 | |||
3 | TUNEVALID[armv8-7a] = "Enable instructions for ARMv8.7-a" | ||
4 | TUNE_CCARGS_MARCH .= "${@bb.utils.contains('TUNE_FEATURES', 'armv8-7a', ' -march=armv8.7-a', '', d)}" | ||
5 | MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'armv8-7a', 'armv8-7a:', '', d)}" | ||
6 | |||
7 | require conf/machine/include/arm/arch-armv8a.inc | ||
8 | |||
9 | # Little Endian base configs | ||
10 | AVAILTUNES += "armv8-7a" | ||
11 | ARMPKGARCH:tune-armv8-7a ?= "armv8-7a" | ||
12 | TUNE_FEATURES:tune-armv8-7a = "aarch64 armv8-7a" | ||
13 | PACKAGE_EXTRA_ARCHS:tune-armv8-7a = "${PACKAGE_EXTRA_ARCHS:tune-armv8a} armv8-7a" | ||
14 | BASE_LIB:tune-armv8-7a = "lib64" | ||
diff --git a/meta/conf/machine/include/arm/arch-armv8-8a.inc b/meta/conf/machine/include/arm/arch-armv8-8a.inc new file mode 100644 index 0000000000..5694330a1d --- /dev/null +++ b/meta/conf/machine/include/arm/arch-armv8-8a.inc | |||
@@ -0,0 +1,14 @@ | |||
1 | DEFAULTTUNE ?= "armv8-8a" | ||
2 | |||
3 | TUNEVALID[armv8-8a] = "Enable instructions for ARMv8.8-a" | ||
4 | TUNE_CCARGS_MARCH .= "${@bb.utils.contains('TUNE_FEATURES', 'armv8-8a', ' -march=armv8.8-a', '', d)}" | ||
5 | MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'armv8-8a', 'armv8-8a:', '', d)}" | ||
6 | |||
7 | require conf/machine/include/arm/arch-armv8a.inc | ||
8 | |||
9 | # Little Endian base configs | ||
10 | AVAILTUNES += "armv8-8a" | ||
11 | ARMPKGARCH:tune-armv8-8a ?= "armv8-8a" | ||
12 | TUNE_FEATURES:tune-armv8-8a = "aarch64 armv8-8a" | ||
13 | PACKAGE_EXTRA_ARCHS:tune-armv8-8a = "${PACKAGE_EXTRA_ARCHS:tune-armv8a} armv8-8a" | ||
14 | BASE_LIB:tune-armv8-8a = "lib64" | ||
diff --git a/meta/conf/machine/include/arm/arch-armv9-1a.inc b/meta/conf/machine/include/arm/arch-armv9-1a.inc new file mode 100644 index 0000000000..f9e6dce77c --- /dev/null +++ b/meta/conf/machine/include/arm/arch-armv9-1a.inc | |||
@@ -0,0 +1,13 @@ | |||
1 | DEFAULTTUNE ?= "armv9-1a" | ||
2 | |||
3 | TUNEVALID[armv9-1a] = "Enable instructions for ARMv9.1-a" | ||
4 | TUNE_CCARGS_MARCH .= "${@bb.utils.contains('TUNE_FEATURES', 'armv9-1a', ' -march=armv9.1-a', '', d)}" | ||
5 | MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'armv9-1a', 'armv9-1a:', '', d)}" | ||
6 | |||
7 | require conf/machine/include/arm/arch-armv9a.inc | ||
8 | |||
9 | AVAILTUNES += "armv9-1a" | ||
10 | ARMPKGARCH:tune-armv9-1a ?= "armv9-1a" | ||
11 | TUNE_FEATURES:tune-armv9-1a = "aarch64 armv9-1a" | ||
12 | PACKAGE_EXTRA_ARCHS:tune-armv9-1a = "${PACKAGE_EXTRA_ARCHS:tune-armv9a} armv9-1a" | ||
13 | BASE_LIB:tune-armv9-1a = "lib64" | ||
diff --git a/meta/conf/machine/include/arm/arch-armv9-2a.inc b/meta/conf/machine/include/arm/arch-armv9-2a.inc new file mode 100644 index 0000000000..4b5cf3ed15 --- /dev/null +++ b/meta/conf/machine/include/arm/arch-armv9-2a.inc | |||
@@ -0,0 +1,13 @@ | |||
1 | DEFAULTTUNE ?= "armv9-2a" | ||
2 | |||
3 | TUNEVALID[armv9-2a] = "Enable instructions for ARMv9.2-a" | ||
4 | TUNE_CCARGS_MARCH .= "${@bb.utils.contains('TUNE_FEATURES', 'armv9-2a', ' -march=armv9.2-a', '', d)}" | ||
5 | MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'armv9-2a', 'armv9-2a:', '', d)}" | ||
6 | |||
7 | require conf/machine/include/arm/arch-armv9a.inc | ||
8 | |||
9 | AVAILTUNES += "armv9-2a" | ||
10 | ARMPKGARCH:tune-armv9-2a ?= "armv9-2a" | ||
11 | TUNE_FEATURES:tune-armv9-2a = "aarch64 armv9-2a" | ||
12 | PACKAGE_EXTRA_ARCHS:tune-armv9-2a = "${PACKAGE_EXTRA_ARCHS:tune-armv9a} armv9-2a" | ||
13 | BASE_LIB:tune-armv9-2a = "lib64" | ||
diff --git a/meta/conf/machine/include/arm/arch-armv9-3a.inc b/meta/conf/machine/include/arm/arch-armv9-3a.inc new file mode 100644 index 0000000000..c345f1532c --- /dev/null +++ b/meta/conf/machine/include/arm/arch-armv9-3a.inc | |||
@@ -0,0 +1,13 @@ | |||
1 | DEFAULTTUNE ?= "armv9-3a" | ||
2 | |||
3 | TUNEVALID[armv9-3a] = "Enable instructions for ARMv9.3-a" | ||
4 | TUNE_CCARGS_MARCH .= "${@bb.utils.contains('TUNE_FEATURES', 'armv9-3a', ' -march=armv9.3-a', '', d)}" | ||
5 | MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'armv9-3a', 'armv9-3a:', '', d)}" | ||
6 | |||
7 | require conf/machine/include/arm/arch-armv9a.inc | ||
8 | |||
9 | AVAILTUNES += "armv9-3a" | ||
10 | ARMPKGARCH:tune-armv9-3a ?= "armv9-3a" | ||
11 | TUNE_FEATURES:tune-armv9-3a = "aarch64 armv9-3a" | ||
12 | PACKAGE_EXTRA_ARCHS:tune-armv9-3a = "${PACKAGE_EXTRA_ARCHS:tune-armv9a} armv9-3a" | ||
13 | BASE_LIB:tune-armv9-3a = "lib64" | ||
diff --git a/meta/lib/bbconfigbuild/configfragments.py b/meta/lib/bbconfigbuild/configfragments.py index fce3301bac..34c6a3b4bc 100644 --- a/meta/lib/bbconfigbuild/configfragments.py +++ b/meta/lib/bbconfigbuild/configfragments.py | |||
@@ -104,8 +104,11 @@ class ConfigFragmentsPlugin(LayerPlugin): | |||
104 | return True | 104 | return True |
105 | return False | 105 | return False |
106 | 106 | ||
107 | def fragment_prefix(self, fragmentname): | ||
108 | return fragmentname.split("/",1)[0] | ||
109 | |||
107 | def builtin_fragment_exists(self, fragmentname): | 110 | def builtin_fragment_exists(self, fragmentname): |
108 | fragment_prefix = fragmentname.split("/",1)[0] | 111 | fragment_prefix = self.fragment_prefix(fragmentname) |
109 | fragment_prefix_defs = set([f.split(':')[0] for f in self.tinfoil.config_data.getVar('OE_FRAGMENTS_BUILTIN').split()]) | 112 | fragment_prefix_defs = set([f.split(':')[0] for f in self.tinfoil.config_data.getVar('OE_FRAGMENTS_BUILTIN').split()]) |
110 | return fragment_prefix in fragment_prefix_defs | 113 | return fragment_prefix in fragment_prefix_defs |
111 | 114 | ||
@@ -128,6 +131,8 @@ class ConfigFragmentsPlugin(LayerPlugin): | |||
128 | if f in enabled_fragments: | 131 | if f in enabled_fragments: |
129 | print("Fragment {} already included in {}".format(f, args.confpath)) | 132 | print("Fragment {} already included in {}".format(f, args.confpath)) |
130 | else: | 133 | else: |
134 | # first filter out all built-in fragments with the same prefix as the one that is being enabled | ||
135 | enabled_fragments = [fragment for fragment in enabled_fragments if not(self.builtin_fragment_exists(fragment) and self.fragment_prefix(fragment) == self.fragment_prefix(f))] | ||
131 | enabled_fragments.append(f) | 136 | enabled_fragments.append(f) |
132 | return " ".join(enabled_fragments), None, 0, True | 137 | return " ".join(enabled_fragments), None, 0, True |
133 | 138 | ||
diff --git a/meta/lib/oeqa/selftest/cases/bblayers.py b/meta/lib/oeqa/selftest/cases/bblayers.py index d82c5aaf37..08bc1d1e44 100644 --- a/meta/lib/oeqa/selftest/cases/bblayers.py +++ b/meta/lib/oeqa/selftest/cases/bblayers.py | |||
@@ -157,7 +157,10 @@ class BitbakeLayers(OESelftestTestCase): | |||
157 | with open(jsonfile) as f: | 157 | with open(jsonfile) as f: |
158 | data = json.load(f) | 158 | data = json.load(f) |
159 | for s in data['sources']: | 159 | for s in data['sources']: |
160 | data['sources'][s]['git-remote']['rev'] = '5200799866b92259e855051112520006e1aaaac0' | 160 | if s == 'meta-yocto': |
161 | data['sources'][s]['git-remote']['rev'] = '913bd8ba4dd1d5d2a38261bde985b64a36e36281' | ||
162 | else: | ||
163 | data['sources'][s]['git-remote']['rev'] = '744a2277844ec9a384a9ca7dae2a634d5a0d3590' | ||
161 | with open(jsonfile, 'w') as f: | 164 | with open(jsonfile, 'w') as f: |
162 | json.dump(data, f) | 165 | json.dump(data, f) |
163 | 166 | ||
@@ -281,11 +284,11 @@ class BitbakeConfigBuild(OESelftestTestCase): | |||
281 | 2. Verify that SELFTEST_BUILTIN_FRAGMENT_VARIABLE is set after setting | 284 | 2. Verify that SELFTEST_BUILTIN_FRAGMENT_VARIABLE is set after setting |
282 | the fragment. | 285 | the fragment. |
283 | 3. Verify that SELFTEST_BUILTIN_FRAGMENT_VARIABLE is set after setting | 286 | 3. Verify that SELFTEST_BUILTIN_FRAGMENT_VARIABLE is set after setting |
284 | the fragment with another value that overrides the first one. | 287 | the fragment with another value that replaces the first one. |
285 | 4. Verify that SELFTEST_BUILTIN_FRAGMENT_VARIABLE is set to the previous | 288 | 4. Repeat steps 2 and 3 to verify that going back and forth between values |
286 | value after removing the second assignment (from step 3). | 289 | works. |
287 | 5. Verify that SELFTEST_BUILTIN_FRAGMENT_VARIABLE is not set after | 290 | 5. Verify that SELFTEST_BUILTIN_FRAGMENT_VARIABLE is not set after |
288 | removing the original assignment. | 291 | removing the final assignment. |
289 | """ | 292 | """ |
290 | self.assertEqual(get_bb_var('SELFTEST_BUILTIN_FRAGMENT_VARIABLE'), None) | 293 | self.assertEqual(get_bb_var('SELFTEST_BUILTIN_FRAGMENT_VARIABLE'), None) |
291 | 294 | ||
@@ -295,10 +298,13 @@ class BitbakeConfigBuild(OESelftestTestCase): | |||
295 | runCmd('bitbake-config-build enable-fragment selftest-fragment/someothervalue') | 298 | runCmd('bitbake-config-build enable-fragment selftest-fragment/someothervalue') |
296 | self.assertEqual(get_bb_var('SELFTEST_BUILTIN_FRAGMENT_VARIABLE'), 'someothervalue') | 299 | self.assertEqual(get_bb_var('SELFTEST_BUILTIN_FRAGMENT_VARIABLE'), 'someothervalue') |
297 | 300 | ||
298 | runCmd('bitbake-config-build disable-fragment selftest-fragment/someothervalue') | 301 | runCmd('bitbake-config-build enable-fragment selftest-fragment/somevalue') |
299 | self.assertEqual(get_bb_var('SELFTEST_BUILTIN_FRAGMENT_VARIABLE'), 'somevalue') | 302 | self.assertEqual(get_bb_var('SELFTEST_BUILTIN_FRAGMENT_VARIABLE'), 'somevalue') |
300 | 303 | ||
301 | runCmd('bitbake-config-build disable-fragment selftest-fragment/somevalue') | 304 | runCmd('bitbake-config-build enable-fragment selftest-fragment/someothervalue') |
305 | self.assertEqual(get_bb_var('SELFTEST_BUILTIN_FRAGMENT_VARIABLE'), 'someothervalue') | ||
306 | |||
307 | runCmd('bitbake-config-build disable-fragment selftest-fragment/someothervalue') | ||
302 | self.assertEqual(get_bb_var('SELFTEST_BUILTIN_FRAGMENT_VARIABLE'), None) | 308 | self.assertEqual(get_bb_var('SELFTEST_BUILTIN_FRAGMENT_VARIABLE'), None) |
303 | 309 | ||
304 | def test_show_fragment(self): | 310 | def test_show_fragment(self): |
diff --git a/meta/lib/oeqa/selftest/cases/wic.py b/meta/lib/oeqa/selftest/cases/wic.py index b1c318bd4e..bb4ac23ebf 100644 --- a/meta/lib/oeqa/selftest/cases/wic.py +++ b/meta/lib/oeqa/selftest/cases/wic.py | |||
@@ -18,6 +18,7 @@ from glob import glob | |||
18 | from shutil import rmtree, copy | 18 | from shutil import rmtree, copy |
19 | from tempfile import NamedTemporaryFile | 19 | from tempfile import NamedTemporaryFile |
20 | from tempfile import TemporaryDirectory | 20 | from tempfile import TemporaryDirectory |
21 | from textwrap import dedent | ||
21 | 22 | ||
22 | from oeqa.selftest.case import OESelftestTestCase | 23 | from oeqa.selftest.case import OESelftestTestCase |
23 | from oeqa.core.decorator import OETestTag | 24 | from oeqa.core.decorator import OETestTag |
@@ -1021,7 +1022,7 @@ class Wic2(WicTestCase): | |||
1021 | wicvars = wicvars.difference(('DEPLOY_DIR_IMAGE', 'IMAGE_BOOT_FILES', | 1022 | wicvars = wicvars.difference(('DEPLOY_DIR_IMAGE', 'IMAGE_BOOT_FILES', |
1022 | 'INITRD', 'INITRD_LIVE', 'ISODIR','INITRAMFS_IMAGE', | 1023 | 'INITRD', 'INITRD_LIVE', 'ISODIR','INITRAMFS_IMAGE', |
1023 | 'INITRAMFS_IMAGE_BUNDLE', 'INITRAMFS_LINK_NAME', | 1024 | 'INITRAMFS_IMAGE_BUNDLE', 'INITRAMFS_LINK_NAME', |
1024 | 'APPEND', 'IMAGE_EFI_BOOT_FILES')) | 1025 | 'APPEND', 'IMAGE_EFI_BOOT_FILES', 'IMAGE_EXTRA_PARTITION_FILES')) |
1025 | with open(path) as envfile: | 1026 | with open(path) as envfile: |
1026 | content = dict(line.split("=", 1) for line in envfile) | 1027 | content = dict(line.split("=", 1) for line in envfile) |
1027 | # test if variables used by wic present in the .env file | 1028 | # test if variables used by wic present in the .env file |
@@ -1329,41 +1330,47 @@ run_wic_cmd() { | |||
1329 | def test_extra_partition_space(self): | 1330 | def test_extra_partition_space(self): |
1330 | native_sysroot = get_bb_var("RECIPE_SYSROOT_NATIVE", "wic-tools") | 1331 | native_sysroot = get_bb_var("RECIPE_SYSROOT_NATIVE", "wic-tools") |
1331 | 1332 | ||
1332 | with NamedTemporaryFile("w", suffix=".wks") as tempf: | 1333 | oldpath = os.environ['PATH'] |
1333 | tempf.write("bootloader --ptable gpt\n" \ | 1334 | os.environ['PATH'] = get_bb_var("PATH", "wic-tools") |
1334 | "part --ondisk hda --size 10M --extra-partition-space 10M --fstype=ext4\n" \ | ||
1335 | "part --ondisk hda --fixed-size 20M --extra-partition-space 10M --fstype=ext4\n" \ | ||
1336 | "part --source rootfs --ondisk hda --extra-partition-space 10M --fstype=ext4\n" \ | ||
1337 | "part --source rootfs --ondisk hda --fixed-size 200M --extra-partition-space 10M --fstype=ext4\n") | ||
1338 | tempf.flush() | ||
1339 | |||
1340 | _, wicimg = self._get_wic(tempf.name) | ||
1341 | |||
1342 | res = runCmd("parted -m %s unit b p" % wicimg, | ||
1343 | native_sysroot=native_sysroot, stderr=subprocess.PIPE) | ||
1344 | |||
1345 | # parse parted output which looks like this: | ||
1346 | # BYT;\n | ||
1347 | # /var/tmp/wic/build/tmpfwvjjkf_-201611101222-hda.direct:200MiB:file:512:512:msdos::;\n | ||
1348 | # 1:0.00MiB:200MiB:200MiB:ext4::;\n | ||
1349 | partlns = res.output.splitlines()[2:] | ||
1350 | |||
1351 | self.assertEqual(4, len(partlns)) | ||
1352 | 1335 | ||
1353 | # Test for each partitions that the extra part space exists | 1336 | try: |
1354 | for part in range(0, len(partlns)): | 1337 | with NamedTemporaryFile("w", suffix=".wks") as tempf: |
1355 | part_file = os.path.join(self.resultdir, "selftest_img.part%d" % (part + 1)) | 1338 | tempf.write("bootloader --ptable gpt\n" \ |
1356 | partln = partlns[part].split(":") | 1339 | "part --ondisk hda --size 10M --extra-partition-space 10M --fstype=ext4\n" \ |
1357 | self.assertEqual(7, len(partln)) | 1340 | "part --ondisk hda --fixed-size 20M --extra-partition-space 10M --fstype=ext4\n" \ |
1358 | self.assertRegex(partln[3], r'^[0-9]+B$') | 1341 | "part --source rootfs --ondisk hda --extra-partition-space 10M --fstype=ext4\n" \ |
1359 | part_size = int(partln[3].rstrip("B")) | 1342 | "part --source rootfs --ondisk hda --fixed-size 200M --extra-partition-space 10M --fstype=ext4\n") |
1360 | start = int(partln[1].rstrip("B")) / 512 | 1343 | tempf.flush() |
1361 | length = part_size / 512 | 1344 | |
1362 | runCmd("dd if=%s of=%s skip=%d count=%d" % | 1345 | _, wicimg = self._get_wic(tempf.name) |
1363 | (wicimg, part_file, start, length)) | 1346 | |
1364 | res = runCmd("dumpe2fs %s -h | grep \"^Block count\"" % part_file) | 1347 | res = runCmd("parted -m %s unit b p" % wicimg, |
1365 | fs_size = int(res.output.split(":")[1].strip()) * 1024 | 1348 | native_sysroot=native_sysroot, stderr=subprocess.PIPE) |
1366 | self.assertLessEqual(fs_size + 10485760, part_size, "part file: %s" % part_file) | 1349 | |
1350 | # parse parted output which looks like this: | ||
1351 | # BYT;\n | ||
1352 | # /var/tmp/wic/build/tmpfwvjjkf_-201611101222-hda.direct:200MiB:file:512:512:msdos::;\n | ||
1353 | # 1:0.00MiB:200MiB:200MiB:ext4::;\n | ||
1354 | partlns = res.output.splitlines()[2:] | ||
1355 | |||
1356 | self.assertEqual(4, len(partlns)) | ||
1357 | |||
1358 | # Test for each partitions that the extra part space exists | ||
1359 | for part in range(0, len(partlns)): | ||
1360 | part_file = os.path.join(self.resultdir, "selftest_img.part%d" % (part + 1)) | ||
1361 | partln = partlns[part].split(":") | ||
1362 | self.assertEqual(7, len(partln)) | ||
1363 | self.assertRegex(partln[3], r'^[0-9]+B$') | ||
1364 | part_size = int(partln[3].rstrip("B")) | ||
1365 | start = int(partln[1].rstrip("B")) / 512 | ||
1366 | length = part_size / 512 | ||
1367 | runCmd("dd if=%s of=%s skip=%d count=%d" % | ||
1368 | (wicimg, part_file, start, length)) | ||
1369 | res = runCmd("dumpe2fs %s -h | grep \"^Block count\"" % part_file) | ||
1370 | fs_size = int(res.output.split(":")[1].strip()) * 1024 | ||
1371 | self.assertLessEqual(fs_size + 10485760, part_size, "part file: %s" % part_file) | ||
1372 | finally: | ||
1373 | os.environ['PATH'] = oldpath | ||
1367 | 1374 | ||
1368 | # TODO this test could also work on aarch64 | 1375 | # TODO this test could also work on aarch64 |
1369 | @skipIfNotArch(['i586', 'i686', 'x86_64']) | 1376 | @skipIfNotArch(['i586', 'i686', 'x86_64']) |
@@ -1647,6 +1654,53 @@ INITRAMFS_IMAGE = "core-image-initramfs-boot" | |||
1647 | status, output = qemu.run_serial(cmd) | 1654 | status, output = qemu.run_serial(cmd) |
1648 | self.assertEqual(1, status, 'Failed to run command "%s": %s' % (cmd, output)) | 1655 | self.assertEqual(1, status, 'Failed to run command "%s": %s' % (cmd, output)) |
1649 | 1656 | ||
1657 | def test_extra_partition_plugin(self): | ||
1658 | """Test extra partition plugin""" | ||
1659 | config = dedent("""\ | ||
1660 | IMAGE_EXTRA_PARTITION_FILES_label-foo = "bar.conf;foo.conf" | ||
1661 | IMAGE_EXTRA_PARTITION_FILES_uuid-e7d0824e-cda3-4bed-9f54-9ef5312d105d = "bar.conf;foobar.conf" | ||
1662 | IMAGE_EXTRA_PARTITION_FILES = "foo/*" | ||
1663 | WICVARS:append = "\ | ||
1664 | IMAGE_EXTRA_PARTITION_FILES_label-foo \ | ||
1665 | IMAGE_EXTRA_PARTITION_FILES_uuid-e7d0824e-cda3-4bed-9f54-9ef5312d105d \ | ||
1666 | " | ||
1667 | """) | ||
1668 | self.append_config(config) | ||
1669 | |||
1670 | deploy_dir = get_bb_var('DEPLOY_DIR_IMAGE') | ||
1671 | |||
1672 | testfile = open(os.path.join(deploy_dir, "bar.conf"), "w") | ||
1673 | testfile.write("test") | ||
1674 | testfile.close() | ||
1675 | |||
1676 | os.mkdir(os.path.join(deploy_dir, "foo")) | ||
1677 | testfile = open(os.path.join(deploy_dir, "foo", "bar.conf"), "w") | ||
1678 | testfile.write("test") | ||
1679 | testfile.close() | ||
1680 | |||
1681 | oldpath = os.environ['PATH'] | ||
1682 | os.environ['PATH'] = get_bb_var("PATH", "wic-tools") | ||
1683 | |||
1684 | try: | ||
1685 | with NamedTemporaryFile("w", suffix=".wks") as wks: | ||
1686 | wks.writelines(['part / --source extra_partition --ondisk sda --fstype=ext4 --label foo --align 4 --size 5M\n', | ||
1687 | 'part / --source extra_partition --ondisk sda --fstype=ext4 --uuid e7d0824e-cda3-4bed-9f54-9ef5312d105d --align 4 --size 5M\n', | ||
1688 | 'part / --source extra_partition --ondisk sda --fstype=ext4 --label bar --align 4 --size 5M\n']) | ||
1689 | wks.flush() | ||
1690 | _, wicimg = self._get_wic(wks.name) | ||
1691 | |||
1692 | result = runCmd("wic ls %s | wc -l" % wicimg) | ||
1693 | self.assertEqual('4', result.output, msg="Expect 3 partitions, not %s" % result.output) | ||
1694 | |||
1695 | for part, file in enumerate(["foo.conf", "foobar.conf", "bar.conf"]): | ||
1696 | result = runCmd("wic ls %s:%d | grep -q \"%s\"" % (wicimg, part + 1, file)) | ||
1697 | self.assertEqual(0, result.status, msg="File '%s' not found in the partition #%d" % (file, part)) | ||
1698 | |||
1699 | self.remove_config(config) | ||
1700 | |||
1701 | finally: | ||
1702 | os.environ['PATH'] = oldpath | ||
1703 | |||
1650 | def test_fs_types(self): | 1704 | def test_fs_types(self): |
1651 | """Test filesystem types for empty and not empty partitions""" | 1705 | """Test filesystem types for empty and not empty partitions""" |
1652 | img = 'core-image-minimal' | 1706 | img = 'core-image-minimal' |
diff --git a/meta/recipes-core/busybox/busybox/CVE-2025-46394-01.patch b/meta/recipes-core/busybox/busybox/CVE-2025-46394-01.patch new file mode 100644 index 0000000000..c95cba3c33 --- /dev/null +++ b/meta/recipes-core/busybox/busybox/CVE-2025-46394-01.patch | |||
@@ -0,0 +1,57 @@ | |||
1 | From f5e1bf966b19ea1821f00a8c9ecd7774598689b4 Mon Sep 17 00:00:00 2001 | ||
2 | From: Denys Vlasenko <vda.linux@googlemail.com> | ||
3 | Date: Wed, 24 Sep 2025 03:28:47 +0200 | ||
4 | Subject: [PATCH] archival/libarchive: sanitize filenames on output (prevent | ||
5 | control sequence attacks | ||
6 | |||
7 | This fixes CVE-2025-46394 (terminal escape sequence injection) | ||
8 | |||
9 | Original credit: Ian.Norton at entrust.com | ||
10 | |||
11 | function old new delta | ||
12 | header_list 9 15 +6 | ||
13 | header_verbose_list 239 244 +5 | ||
14 | ------------------------------------------------------------------------------ | ||
15 | (add/remove: 0/0 grow/shrink: 2/0 up/down: 11/0) Total: 11 bytes | ||
16 | |||
17 | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> | ||
18 | |||
19 | CVE: CVE-2025-46394 | ||
20 | Upstream-Status: Backport [https://git.busybox.net/busybox/commit/?id=f5e1bf966b19ea1821f00a8c9ecd7774598689b4] | ||
21 | Signed-off-by: Peter Marko <peter.marko@siemens.com> | ||
22 | --- | ||
23 | archival/libarchive/header_list.c | 2 +- | ||
24 | archival/libarchive/header_verbose_list.c | 4 ++-- | ||
25 | 2 files changed, 3 insertions(+), 3 deletions(-) | ||
26 | |||
27 | diff --git a/archival/libarchive/header_list.c b/archival/libarchive/header_list.c | ||
28 | index 0621aa406..9490b3635 100644 | ||
29 | --- a/archival/libarchive/header_list.c | ||
30 | +++ b/archival/libarchive/header_list.c | ||
31 | @@ -8,5 +8,5 @@ | ||
32 | void FAST_FUNC header_list(const file_header_t *file_header) | ||
33 | { | ||
34 | //TODO: cpio -vp DIR should output "DIR/NAME", not just "NAME" */ | ||
35 | - puts(file_header->name); | ||
36 | + puts(printable_string(file_header->name)); | ||
37 | } | ||
38 | diff --git a/archival/libarchive/header_verbose_list.c b/archival/libarchive/header_verbose_list.c | ||
39 | index a575a08a0..e7a09430d 100644 | ||
40 | --- a/archival/libarchive/header_verbose_list.c | ||
41 | +++ b/archival/libarchive/header_verbose_list.c | ||
42 | @@ -57,13 +57,13 @@ void FAST_FUNC header_verbose_list(const file_header_t *file_header) | ||
43 | ptm->tm_hour, | ||
44 | ptm->tm_min, | ||
45 | ptm->tm_sec, | ||
46 | - file_header->name); | ||
47 | + printable_string(file_header->name)); | ||
48 | |||
49 | #endif /* FEATURE_TAR_UNAME_GNAME */ | ||
50 | |||
51 | /* NB: GNU tar shows "->" for symlinks and "link to" for hardlinks */ | ||
52 | if (file_header->link_target) { | ||
53 | - printf(" -> %s", file_header->link_target); | ||
54 | + printf(" -> %s", printable_string(file_header->link_target)); | ||
55 | } | ||
56 | bb_putchar('\n'); | ||
57 | } | ||
diff --git a/meta/recipes-core/busybox/busybox/CVE-2025-46394-02.patch b/meta/recipes-core/busybox/busybox/CVE-2025-46394-02.patch new file mode 100644 index 0000000000..ec17b9285a --- /dev/null +++ b/meta/recipes-core/busybox/busybox/CVE-2025-46394-02.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | From 7378db981d87b4a2264e14d60340a7fb5c67ae59 Mon Sep 17 00:00:00 2001 | ||
2 | From: Peter Marko <peter.marko@siemens.com> | ||
3 | Date: Fri, 3 Oct 2025 16:12:56 +0200 | ||
4 | Subject: [PATCH] testsuite/tar.tests: fix test after CVE-2025-46394 | ||
5 | |||
6 | tar now sanitizes output and this test needs to expect that. | ||
7 | |||
8 | Signed-off-by: Peter Marko <peter.marko@siemens.com> | ||
9 | |||
10 | CVE: CVE-2025-46394 | ||
11 | Upstream-Status: Submitted [https://lists.busybox.net/pipermail/busybox/2025-October/091743.html] | ||
12 | Signed-off-by: Peter Marko <peter.marko@siemens.com> | ||
13 | --- | ||
14 | testsuite/tar.tests | 4 ++-- | ||
15 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
16 | |||
17 | diff --git a/testsuite/tar.tests b/testsuite/tar.tests | ||
18 | index 0f2e89112..48fc38114 100755 | ||
19 | --- a/testsuite/tar.tests | ||
20 | +++ b/testsuite/tar.tests | ||
21 | @@ -325,9 +325,9 @@ unset LANG | ||
22 | rm -rf etc usr | ||
23 | ' "\ | ||
24 | etc/ssl/certs/3b2716e5.0 | ||
25 | -etc/ssl/certs/EBG_Elektronik_Sertifika_Hizmet_Sağlayıcısı.pem | ||
26 | +etc/ssl/certs/EBG_Elektronik_Sertifika_Hizmet_Sa??lay??c??s??.pem | ||
27 | etc/ssl/certs/f80cc7f6.0 | ||
28 | -usr/share/ca-certificates/mozilla/EBG_Elektronik_Sertifika_Hizmet_Sağlayıcısı.crt | ||
29 | +usr/share/ca-certificates/mozilla/EBG_Elektronik_Sertifika_Hizmet_Sa??lay??c??s??.crt | ||
30 | 0 | ||
31 | etc/ssl/certs/3b2716e5.0 -> EBG_Elektronik_Sertifika_Hizmet_Sağlayıcısı.pem | ||
32 | etc/ssl/certs/EBG_Elektronik_Sertifika_Hizmet_Sağlayıcısı.pem -> /usr/share/ca-certificates/mozilla/EBG_Elektronik_Sertifika_Hizmet_Sağlayıcısı.crt | ||
diff --git a/meta/recipes-core/busybox/busybox_1.37.0.bb b/meta/recipes-core/busybox/busybox_1.37.0.bb index bec25348b8..9e6a7b7b4c 100644 --- a/meta/recipes-core/busybox/busybox_1.37.0.bb +++ b/meta/recipes-core/busybox/busybox_1.37.0.bb | |||
@@ -56,6 +56,8 @@ SRC_URI = "https://busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \ | |||
56 | file://0001-archival-disallow-path-traversals-CVE-2023-39810.patch \ | 56 | file://0001-archival-disallow-path-traversals-CVE-2023-39810.patch \ |
57 | file://0001-hwclock-Check-for-SYS_settimeofday-before-calling-sy.patch \ | 57 | file://0001-hwclock-Check-for-SYS_settimeofday-before-calling-sy.patch \ |
58 | file://0001-busybox-Add-awk-gsub-erroneous-word-start-match-test.patch \ | 58 | file://0001-busybox-Add-awk-gsub-erroneous-word-start-match-test.patch \ |
59 | file://CVE-2025-46394-01.patch \ | ||
60 | file://CVE-2025-46394-02.patch \ | ||
59 | " | 61 | " |
60 | SRC_URI:append:libc-musl = " file://musl.cfg" | 62 | SRC_URI:append:libc-musl = " file://musl.cfg" |
61 | SRC_URI:append:x86-64 = " file://sha_accel.cfg" | 63 | SRC_URI:append:x86-64 = " file://sha_accel.cfg" |
diff --git a/meta/recipes-core/udev/udev-extraconf/mount.sh b/meta/recipes-core/udev/udev-extraconf/mount.sh index 0cbae48729..4827779e2f 100644 --- a/meta/recipes-core/udev/udev-extraconf/mount.sh +++ b/meta/recipes-core/udev/udev-extraconf/mount.sh | |||
@@ -178,7 +178,7 @@ rm_dir() { | |||
178 | 178 | ||
179 | get_label_name() { | 179 | get_label_name() { |
180 | # Get the LABEL or PARTLABEL | 180 | # Get the LABEL or PARTLABEL |
181 | LABEL=`/sbin/blkid | grep "$1:" | grep -o 'LABEL=".*"' | cut -d '"' -f2` | 181 | LABEL=`/sbin/blkid "$1" | grep -o 'LABEL=".*"' | cut -d '"' -f2 | sed 's,/,_,g'` |
182 | # If the $DEVNAME has a LABEL or a PARTLABEL | 182 | # If the $DEVNAME has a LABEL or a PARTLABEL |
183 | if [ -n "$LABEL" ]; then | 183 | if [ -n "$LABEL" ]; then |
184 | # Set the mount location dir name to LABEL appended | 184 | # Set the mount location dir name to LABEL appended |
diff --git a/meta/recipes-devtools/clang/common-clang.inc b/meta/recipes-devtools/clang/common-clang.inc index bf3a63914a..ca3a3a08b4 100644 --- a/meta/recipes-devtools/clang/common-clang.inc +++ b/meta/recipes-devtools/clang/common-clang.inc | |||
@@ -5,7 +5,7 @@ LLVM_HTTP ?= "https://github.com/llvm" | |||
5 | 5 | ||
6 | MAJOR_VER = "21" | 6 | MAJOR_VER = "21" |
7 | MINOR_VER = "1" | 7 | MINOR_VER = "1" |
8 | PATCH_VER = "1" | 8 | PATCH_VER = "2" |
9 | # could be 'rcX' or 'git' or empty ( for release ) | 9 | # could be 'rcX' or 'git' or empty ( for release ) |
10 | VER_SUFFIX = "" | 10 | VER_SUFFIX = "" |
11 | 11 | ||
diff --git a/meta/recipes-devtools/clang/common.inc b/meta/recipes-devtools/clang/common.inc index b8f7d41089..d7f069d253 100644 --- a/meta/recipes-devtools/clang/common.inc +++ b/meta/recipes-devtools/clang/common.inc | |||
@@ -17,7 +17,7 @@ BASEURI ?= "${LLVM_HTTP}/llvm-project/releases/download/llvmorg-${PV}${VER_SUFFI | |||
17 | UPSTREAM_CHECK_URI = "${LLVM_HTTP}/llvm-project/releases/" | 17 | UPSTREAM_CHECK_URI = "${LLVM_HTTP}/llvm-project/releases/" |
18 | UPSTREAM_CHECK_REGEX = "releases/tag/llvmorg-?(?P<pver>\d+(\.\d+)+)" | 18 | UPSTREAM_CHECK_REGEX = "releases/tag/llvmorg-?(?P<pver>\d+(\.\d+)+)" |
19 | SOURCEDIR ?= "llvm-project-${PV}${VER_SUFFIX}.src" | 19 | SOURCEDIR ?= "llvm-project-${PV}${VER_SUFFIX}.src" |
20 | SRC_URI[sha256sum] = "8863980e14484a72a9b7d2c80500e1749054d74f08f8c5102fd540a3c5ac9f8a" | 20 | SRC_URI[sha256sum] = "1a417d1c8faf8d93e73fec1cbb76d393ed3218974c2283c7bac9672d3d47c54b" |
21 | 21 | ||
22 | SRC_URI = "\ | 22 | SRC_URI = "\ |
23 | ${BASEURI} \ | 23 | ${BASEURI} \ |
diff --git a/meta/recipes-devtools/go/go-1.25.0.inc b/meta/recipes-devtools/go/go-1.25.0.inc index f562fbb34b..1558b4623d 100644 --- a/meta/recipes-devtools/go/go-1.25.0.inc +++ b/meta/recipes-devtools/go/go-1.25.0.inc | |||
@@ -16,5 +16,6 @@ SRC_URI += "\ | |||
16 | file://0009-go-Filter-build-paths-on-staticly-linked-arches.patch \ | 16 | file://0009-go-Filter-build-paths-on-staticly-linked-arches.patch \ |
17 | file://0010-cmd-go-clear-GOROOT-for-func-ldShared-when-trimpath-.patch \ | 17 | file://0010-cmd-go-clear-GOROOT-for-func-ldShared-when-trimpath-.patch \ |
18 | file://0011-cmd-link-stop-forcing-binutils-gold-dependency-on-aa.patch \ | 18 | file://0011-cmd-link-stop-forcing-binutils-gold-dependency-on-aa.patch \ |
19 | file://0001-runtime-when-using-cgo-on-386-call-C-sigaction-funct.patch \ | ||
19 | " | 20 | " |
20 | SRC_URI[main.sha256sum] = "4bd01e91297207bfa450ea40d4d5a93b1b531a5e438473b2a06e18e077227225" | 21 | SRC_URI[main.sha256sum] = "4bd01e91297207bfa450ea40d4d5a93b1b531a5e438473b2a06e18e077227225" |
diff --git a/meta/recipes-devtools/go/go/0001-runtime-when-using-cgo-on-386-call-C-sigaction-funct.patch b/meta/recipes-devtools/go/go/0001-runtime-when-using-cgo-on-386-call-C-sigaction-funct.patch new file mode 100644 index 0000000000..33e3b033a1 --- /dev/null +++ b/meta/recipes-devtools/go/go/0001-runtime-when-using-cgo-on-386-call-C-sigaction-funct.patch | |||
@@ -0,0 +1,248 @@ | |||
1 | From c5737dc21bbac9fbefc35ac9313e66291d66b382 Mon Sep 17 00:00:00 2001 | ||
2 | From: Ian Lance Taylor <iant@golang.org> | ||
3 | Date: Fri, 5 Sep 2025 22:24:37 -0700 | ||
4 | Subject: [PATCH] runtime: when using cgo on 386, call C sigaction function | ||
5 | |||
6 | On 386 the C sigaction function assumes that the caller does not set | ||
7 | the SA_RESTORER flag. It does not copy the C sa_restorer field to | ||
8 | the kernel sa_restorer field. The effect is that the kernel sees | ||
9 | the SA_RESTORER flag but a NULL sa_restorer field, and the program | ||
10 | crashes when returning from a signal handler. | ||
11 | |||
12 | On the other hand, the C sigaction function will return the SA_RESTORER | ||
13 | flag and the sa_restorer field stored in the kernel. | ||
14 | |||
15 | This means that if the Go runtime installs a signal handler, | ||
16 | with SA_RESTORER as is required when calling the kernel, | ||
17 | and the Go program calls C code that calls the C sigaction function | ||
18 | to query the current signal handler, that C code will get a result | ||
19 | that it can't pass back to sigaction. | ||
20 | |||
21 | This CL fixes the problem by using the C sigaction function | ||
22 | for 386 programs that use cgo. This reuses the functionality | ||
23 | used on amd64 and other GOARCHs to support the race detector. | ||
24 | |||
25 | See #75253, or runtime/testdata/testprogcgo/eintr.go, for sample | ||
26 | code that used to fail on 386. No new test case is required, | ||
27 | we just remove the skip we used to have for eintr.go. | ||
28 | |||
29 | Fixes #75253 | ||
30 | |||
31 | Change-Id: I803059b1fb9e09e9fbb43f68eccb6a59a92c2991 | ||
32 | Reviewed-on: https://go-review.googlesource.com/c/go/+/701375 | ||
33 | LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> | ||
34 | Reviewed-by: Cherry Mui <cherryyz@google.com> | ||
35 | Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> | ||
36 | Auto-Submit: Ian Lance Taylor <iant@golang.org> | ||
37 | Upstream-Status: Backport [https://github.com/golang/go/commit/c5737dc21bbac9fbefc35ac9313e66291d66b382] | ||
38 | Signed-off-by: Randolph Sapp <rs@ti.com> | ||
39 | --- | ||
40 | src/runtime/cgo/gcc_sigaction.c | 8 ++++---- | ||
41 | src/runtime/cgo/sigaction.go | 2 +- | ||
42 | src/runtime/cgo_sigaction.go | 6 +++++- | ||
43 | src/runtime/crash_cgo_test.go | 11 ----------- | ||
44 | src/runtime/os_freebsd.go | 6 ++++++ | ||
45 | src/runtime/os_linux.go | 18 +++++++++++++++++- | ||
46 | src/runtime/sigaction.go | 2 +- | ||
47 | src/runtime/sys_linux_386.s | 19 +++++++++++++++++++ | ||
48 | 8 files changed, 53 insertions(+), 19 deletions(-) | ||
49 | |||
50 | diff --git a/src/runtime/cgo/gcc_sigaction.c b/src/runtime/cgo/gcc_sigaction.c | ||
51 | index 7cbef7db11..ad48a88dc1 100644 | ||
52 | --- a/src/runtime/cgo/gcc_sigaction.c | ||
53 | +++ b/src/runtime/cgo/gcc_sigaction.c | ||
54 | @@ -2,7 +2,7 @@ | ||
55 | // Use of this source code is governed by a BSD-style | ||
56 | // license that can be found in the LICENSE file. | ||
57 | |||
58 | -//go:build linux && (amd64 || arm64 || loong64 || ppc64le) | ||
59 | +//go:build linux && (386 || amd64 || arm64 || loong64 || ppc64le) | ||
60 | |||
61 | #include <errno.h> | ||
62 | #include <stddef.h> | ||
63 | @@ -17,7 +17,7 @@ | ||
64 | // to and from struct sigaction — are specific to ${goos}/${goarch}. | ||
65 | typedef struct { | ||
66 | uintptr_t handler; | ||
67 | - uint64_t flags; | ||
68 | + unsigned long flags; | ||
69 | #ifdef __loongarch__ | ||
70 | uint64_t mask; | ||
71 | uintptr_t restorer; | ||
72 | @@ -57,7 +57,7 @@ x_cgo_sigaction(intptr_t signum, const go_sigaction_t *goact, go_sigaction_t *ol | ||
73 | sigaddset(&act.sa_mask, (int)(i+1)); | ||
74 | } | ||
75 | } | ||
76 | - act.sa_flags = (int)(goact->flags & ~(uint64_t)SA_RESTORER); | ||
77 | + act.sa_flags = (int)(goact->flags & ~(unsigned long)SA_RESTORER); | ||
78 | } | ||
79 | |||
80 | ret = sigaction((int)signum, goact ? &act : NULL, oldgoact ? &oldact : NULL); | ||
81 | @@ -79,7 +79,7 @@ x_cgo_sigaction(intptr_t signum, const go_sigaction_t *goact, go_sigaction_t *ol | ||
82 | oldgoact->mask |= (uint64_t)(1)<<i; | ||
83 | } | ||
84 | } | ||
85 | - oldgoact->flags = (uint64_t)oldact.sa_flags; | ||
86 | + oldgoact->flags = (unsigned long)oldact.sa_flags; | ||
87 | } | ||
88 | |||
89 | _cgo_tsan_release(); | ||
90 | diff --git a/src/runtime/cgo/sigaction.go b/src/runtime/cgo/sigaction.go | ||
91 | index dc3f5fd255..90034bad32 100644 | ||
92 | --- a/src/runtime/cgo/sigaction.go | ||
93 | +++ b/src/runtime/cgo/sigaction.go | ||
94 | @@ -2,7 +2,7 @@ | ||
95 | // Use of this source code is governed by a BSD-style | ||
96 | // license that can be found in the LICENSE file. | ||
97 | |||
98 | -//go:build (linux && (amd64 || arm64 || loong64 || ppc64le)) || (freebsd && amd64) | ||
99 | +//go:build (linux && (386 || amd64 || arm64 || loong64 || ppc64le)) || (freebsd && amd64) | ||
100 | |||
101 | package cgo | ||
102 | |||
103 | diff --git a/src/runtime/cgo_sigaction.go b/src/runtime/cgo_sigaction.go | ||
104 | index 5c644587f0..f725dbef4d 100644 | ||
105 | --- a/src/runtime/cgo_sigaction.go | ||
106 | +++ b/src/runtime/cgo_sigaction.go | ||
107 | @@ -3,8 +3,10 @@ | ||
108 | // license that can be found in the LICENSE file. | ||
109 | |||
110 | // Support for sanitizers. See runtime/cgo/sigaction.go. | ||
111 | +// Also used on linux/386 to clear the SA_RESTORER flag | ||
112 | +// when using cgo; see issue #75253. | ||
113 | |||
114 | -//go:build (linux && (amd64 || arm64 || loong64 || ppc64le)) || (freebsd && amd64) | ||
115 | +//go:build (linux && (386 || amd64 || arm64 || loong64 || ppc64le)) || (freebsd && amd64) | ||
116 | |||
117 | package runtime | ||
118 | |||
119 | @@ -42,6 +44,8 @@ func sigaction(sig uint32, new, old *sigactiont) { | ||
120 | |||
121 | var ret int32 | ||
122 | |||
123 | + fixSigactionForCgo(new) | ||
124 | + | ||
125 | var g *g | ||
126 | if mainStarted { | ||
127 | g = getg() | ||
128 | diff --git a/src/runtime/crash_cgo_test.go b/src/runtime/crash_cgo_test.go | ||
129 | index c5d7303261..b77ff8dafd 100644 | ||
130 | --- a/src/runtime/crash_cgo_test.go | ||
131 | +++ b/src/runtime/crash_cgo_test.go | ||
132 | @@ -842,17 +842,6 @@ func TestEINTR(t *testing.T) { | ||
133 | switch runtime.GOOS { | ||
134 | case "plan9", "windows": | ||
135 | t.Skipf("no EINTR on %s", runtime.GOOS) | ||
136 | - case "linux": | ||
137 | - if runtime.GOARCH == "386" { | ||
138 | - // On linux-386 the Go signal handler sets | ||
139 | - // a restorer function that is not preserved | ||
140 | - // by the C sigaction call in the test, | ||
141 | - // causing the signal handler to crash when | ||
142 | - // returning the normal code. The test is not | ||
143 | - // architecture-specific, so just skip on 386 | ||
144 | - // rather than doing a complicated workaround. | ||
145 | - t.Skip("skipping on linux-386; C sigaction does not preserve Go restorer") | ||
146 | - } | ||
147 | } | ||
148 | if runtime.GOOS == "freebsd" && race.Enabled { | ||
149 | t.Skipf("race + cgo freebsd not supported. See https://go.dev/issue/73788.") | ||
150 | diff --git a/src/runtime/os_freebsd.go b/src/runtime/os_freebsd.go | ||
151 | index ab859cfb47..68d895b95d 100644 | ||
152 | --- a/src/runtime/os_freebsd.go | ||
153 | +++ b/src/runtime/os_freebsd.go | ||
154 | @@ -457,6 +457,12 @@ func sysSigaction(sig uint32, new, old *sigactiont) { | ||
155 | } | ||
156 | } | ||
157 | |||
158 | +// fixSigactionForCgo is needed for Linux. | ||
159 | +// | ||
160 | +//go:nosplit | ||
161 | +func fixSigactionForCgo(new *sigactiont) { | ||
162 | +} | ||
163 | + | ||
164 | // asmSigaction is implemented in assembly. | ||
165 | // | ||
166 | //go:noescape | ||
167 | diff --git a/src/runtime/os_linux.go b/src/runtime/os_linux.go | ||
168 | index c9d25a5be8..f9fe1b5f33 100644 | ||
169 | --- a/src/runtime/os_linux.go | ||
170 | +++ b/src/runtime/os_linux.go | ||
171 | @@ -486,7 +486,8 @@ func setsig(i uint32, fn uintptr) { | ||
172 | sigfillset(&sa.sa_mask) | ||
173 | // Although Linux manpage says "sa_restorer element is obsolete and | ||
174 | // should not be used". x86_64 kernel requires it. Only use it on | ||
175 | - // x86. | ||
176 | + // x86. Note that on 386 this is cleared when using the C sigaction | ||
177 | + // function via cgo; see fixSigactionForCgo. | ||
178 | if GOARCH == "386" || GOARCH == "amd64" { | ||
179 | sa.sa_restorer = abi.FuncPCABI0(sigreturn__sigaction) | ||
180 | } | ||
181 | @@ -562,6 +563,21 @@ func sysSigaction(sig uint32, new, old *sigactiont) { | ||
182 | //go:noescape | ||
183 | func rt_sigaction(sig uintptr, new, old *sigactiont, size uintptr) int32 | ||
184 | |||
185 | +// fixSigactionForCgo is called when we are using cgo to call the | ||
186 | +// C sigaction function. On 386 the C function does not expect the | ||
187 | +// SA_RESTORER flag to be set, and in some cases will fail if it is set: | ||
188 | +// it will pass the SA_RESTORER flag to the kernel without passing | ||
189 | +// the sa_restorer field. Since the C function will handle SA_RESTORER | ||
190 | +// for us, we need not pass it. See issue #75253. | ||
191 | +// | ||
192 | +//go:nosplit | ||
193 | +func fixSigactionForCgo(new *sigactiont) { | ||
194 | + if GOARCH == "386" && new != nil { | ||
195 | + new.sa_flags &^= _SA_RESTORER | ||
196 | + new.sa_restorer = 0 | ||
197 | + } | ||
198 | +} | ||
199 | + | ||
200 | func getpid() int | ||
201 | func tgkill(tgid, tid, sig int) | ||
202 | |||
203 | diff --git a/src/runtime/sigaction.go b/src/runtime/sigaction.go | ||
204 | index 2027ae80bf..1a99f7f3ec 100644 | ||
205 | --- a/src/runtime/sigaction.go | ||
206 | +++ b/src/runtime/sigaction.go | ||
207 | @@ -2,7 +2,7 @@ | ||
208 | // Use of this source code is governed by a BSD-style | ||
209 | // license that can be found in the LICENSE file. | ||
210 | |||
211 | -//go:build (linux && !amd64 && !arm64 && !loong64 && !ppc64le) || (freebsd && !amd64) | ||
212 | +//go:build (linux && !386 && !amd64 && !arm64 && !loong64 && !ppc64le) || (freebsd && !amd64) | ||
213 | |||
214 | package runtime | ||
215 | |||
216 | diff --git a/src/runtime/sys_linux_386.s b/src/runtime/sys_linux_386.s | ||
217 | index d53be243fe..8e832687e0 100644 | ||
218 | --- a/src/runtime/sys_linux_386.s | ||
219 | +++ b/src/runtime/sys_linux_386.s | ||
220 | @@ -410,6 +410,25 @@ TEXT runtime·rt_sigaction(SB),NOSPLIT,$0 | ||
221 | MOVL AX, ret+16(FP) | ||
222 | RET | ||
223 | |||
224 | +// Call the function stored in _cgo_sigaction using the GCC calling convention. | ||
225 | +TEXT runtime·callCgoSigaction(SB),NOSPLIT,$0-16 | ||
226 | + MOVL _cgo_sigaction(SB), AX | ||
227 | + MOVL sig+0(FP), BX | ||
228 | + MOVL new+4(FP), CX | ||
229 | + MOVL old+8(FP), DX | ||
230 | + MOVL SP, SI // align stack to call C function | ||
231 | + SUBL $32, SP | ||
232 | + ANDL $~15, SP | ||
233 | + MOVL BX, 0(SP) | ||
234 | + MOVL CX, 4(SP) | ||
235 | + MOVL DX, 8(SP) | ||
236 | + MOVL SI, 12(SP) | ||
237 | + CALL AX | ||
238 | + MOVL 12(SP), BX | ||
239 | + MOVL BX, SP | ||
240 | + MOVL AX, ret+12(FP) | ||
241 | + RET | ||
242 | + | ||
243 | TEXT runtime·sigfwd(SB),NOSPLIT,$12-16 | ||
244 | MOVL fn+0(FP), AX | ||
245 | MOVL sig+4(FP), BX | ||
246 | -- | ||
247 | 2.51.0 | ||
248 | |||
diff --git a/meta/recipes-devtools/python/python3-lxml_6.0.1.bb b/meta/recipes-devtools/python/python3-lxml_6.0.2.bb index 5d76641675..876fda93b6 100644 --- a/meta/recipes-devtools/python/python3-lxml_6.0.1.bb +++ b/meta/recipes-devtools/python/python3-lxml_6.0.2.bb | |||
@@ -18,7 +18,7 @@ LIC_FILES_CHKSUM = "file://LICENSES.txt;md5=e4c045ebad958ead4b48008f70838403 \ | |||
18 | 18 | ||
19 | DEPENDS += "libxml2 libxslt" | 19 | DEPENDS += "libxml2 libxslt" |
20 | 20 | ||
21 | SRC_URI[sha256sum] = "2b3a882ebf27dd026df3801a87cf49ff791336e0f94b0fad195db77e01240690" | 21 | SRC_URI[sha256sum] = "cd79f3367bd74b317dda655dc8fcfa304d9eb6e4fb06b7168c5cf27f96e0cd62" |
22 | 22 | ||
23 | SRC_URI += "${PYPI_SRC_URI}" | 23 | SRC_URI += "${PYPI_SRC_URI}" |
24 | inherit pkgconfig pypi setuptools3 | 24 | inherit pkgconfig pypi setuptools3 |
diff --git a/meta/recipes-graphics/mesa/mesa-demos_9.0.0.bb b/meta/recipes-graphics/mesa/mesa-demos_9.0.0.bb index a9e84039d2..0bc8519e90 100644 --- a/meta/recipes-graphics/mesa/mesa-demos_9.0.0.bb +++ b/meta/recipes-graphics/mesa/mesa-demos_9.0.0.bb | |||
@@ -20,6 +20,10 @@ REQUIRED_DISTRO_FEATURES = "opengl x11" | |||
20 | 20 | ||
21 | EXTRA_OEMESON = "-Dwith-system-data-files=true" | 21 | EXTRA_OEMESON = "-Dwith-system-data-files=true" |
22 | 22 | ||
23 | PACKAGE_BEFORE_PN = "${PN}-info" | ||
24 | RDEPENDS:${PN} += " ${PN}-info" | ||
25 | FILES:${PN}-info = "${bindir}/*info" | ||
26 | |||
23 | # Note: wayland is not included as the feature requires libdecor recipe, | 27 | # Note: wayland is not included as the feature requires libdecor recipe, |
24 | # which is not currently in core | 28 | # which is not currently in core |
25 | PACKAGECONFIG ?= "drm egl gles1 gles2 \ | 29 | PACKAGECONFIG ?= "drm egl gles1 gles2 \ |
diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc index c3751f3414..7046deeb2b 100644 --- a/meta/recipes-graphics/mesa/mesa.inc +++ b/meta/recipes-graphics/mesa/mesa.inc | |||
@@ -19,8 +19,8 @@ SRC_URI = "https://archive.mesa3d.org/mesa-${PV}.tar.xz \ | |||
19 | file://0001-freedreno-don-t-encode-build-path-into-binaries.patch \ | 19 | file://0001-freedreno-don-t-encode-build-path-into-binaries.patch \ |
20 | " | 20 | " |
21 | 21 | ||
22 | SRC_URI[sha256sum] = "f2d6b28562f1d6cb9c17ee8e58eeade7aa5faf927ae71065eadb41e17f92b4f8" | 22 | SRC_URI[sha256sum] = "a370b4c549cbfbe646b319e34d73edb50ed883978f5e95133f282f0eae39ab52" |
23 | PV = "25.2.3" | 23 | PV = "25.2.4" |
24 | 24 | ||
25 | UPSTREAM_CHECK_GITTAGREGEX = "mesa-(?P<pver>\d+(\.\d+)+)" | 25 | UPSTREAM_CHECK_GITTAGREGEX = "mesa-(?P<pver>\d+(\.\d+)+)" |
26 | 26 | ||
diff --git a/meta/recipes-graphics/spir/spirv-llvm-translator_21.1.0.bb b/meta/recipes-graphics/spir/spirv-llvm-translator_21.1.1.bb index 13a93f3c5e..503e7df644 100644 --- a/meta/recipes-graphics/spir/spirv-llvm-translator_21.1.0.bb +++ b/meta/recipes-graphics/spir/spirv-llvm-translator_21.1.1.bb | |||
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=47e311aa9caedd1b3abf098bd7814d1d" | |||
6 | 6 | ||
7 | # pattern: llvm_branch_200, currently there are no minor releases, so, no llvm_branch_201 | 7 | # pattern: llvm_branch_200, currently there are no minor releases, so, no llvm_branch_201 |
8 | SPIRV_BRANCH = "llvm_release_${@oe.utils.trim_version('${PV}', 1).replace('.', '')}0" | 8 | SPIRV_BRANCH = "llvm_release_${@oe.utils.trim_version('${PV}', 1).replace('.', '')}0" |
9 | SRCREV = "acb023b63a4bafd53d0ba6a1a452b1f0e5671458" | 9 | SRCREV = "29758b55816c14abb3e4142d42aca7a95bf46710" |
10 | SRC_URI = " \ | 10 | SRC_URI = " \ |
11 | git://github.com/KhronosGroup/SPIRV-LLVM-Translator;protocol=https;tag=v${PV};branch=${SPIRV_BRANCH} \ | 11 | git://github.com/KhronosGroup/SPIRV-LLVM-Translator;protocol=https;tag=v${PV};branch=${SPIRV_BRANCH} \ |
12 | " | 12 | " |
diff --git a/meta/recipes-kernel/linux-firmware/linux-firmware_20250917.bb b/meta/recipes-kernel/linux-firmware/linux-firmware_20250917.bb index e69e51024f..f8d8decfe5 100644 --- a/meta/recipes-kernel/linux-firmware/linux-firmware_20250917.bb +++ b/meta/recipes-kernel/linux-firmware/linux-firmware_20250917.bb | |||
@@ -2353,7 +2353,10 @@ python populate_packages:prepend () { | |||
2353 | 2353 | ||
2354 | # Firmware files are generally not ran on the CPU, so they can be | 2354 | # Firmware files are generally not ran on the CPU, so they can be |
2355 | # allarch despite being architecture specific | 2355 | # allarch despite being architecture specific |
2356 | INSANE_SKIP = "arch" | 2356 | INSANE_SKIP += "arch" |
2357 | |||
2358 | # They can also be ELF files, but obviously won't have the linkage we expect | ||
2359 | INSANE_SKIP += "ldflags" | ||
2357 | 2360 | ||
2358 | # Don't warn about already stripped files | 2361 | # Don't warn about already stripped files |
2359 | INSANE_SKIP:${PN} = "already-stripped" | 2362 | INSANE_SKIP:${PN} = "already-stripped" |
diff --git a/scripts/lib/devtool/ide_sdk.py b/scripts/lib/devtool/ide_sdk.py index 931408fa74..d9b54f7991 100755 --- a/scripts/lib/devtool/ide_sdk.py +++ b/scripts/lib/devtool/ide_sdk.py | |||
@@ -286,6 +286,7 @@ class RecipeModified: | |||
286 | self.b = None | 286 | self.b = None |
287 | self.base_libdir = None | 287 | self.base_libdir = None |
288 | self.bblayers = None | 288 | self.bblayers = None |
289 | self.bitbakepath = None | ||
289 | self.bpn = None | 290 | self.bpn = None |
290 | self.d = None | 291 | self.d = None |
291 | self.debug_build = None | 292 | self.debug_build = None |
@@ -297,6 +298,7 @@ class RecipeModified: | |||
297 | self.package_debug_split_style = None | 298 | self.package_debug_split_style = None |
298 | self.path = None | 299 | self.path = None |
299 | self.pn = None | 300 | self.pn = None |
301 | self.recipe_id = None | ||
300 | self.recipe_sysroot = None | 302 | self.recipe_sysroot = None |
301 | self.recipe_sysroot_native = None | 303 | self.recipe_sysroot_native = None |
302 | self.staging_incdir = None | 304 | self.staging_incdir = None |
@@ -305,7 +307,6 @@ class RecipeModified: | |||
305 | self.target_dbgsrc_dir = None | 307 | self.target_dbgsrc_dir = None |
306 | self.topdir = None | 308 | self.topdir = None |
307 | self.workdir = None | 309 | self.workdir = None |
308 | self.recipe_id = None | ||
309 | # replicate bitbake build environment | 310 | # replicate bitbake build environment |
310 | self.exported_vars = None | 311 | self.exported_vars = None |
311 | self.cmd_compile = None | 312 | self.cmd_compile = None |
@@ -346,6 +347,7 @@ class RecipeModified: | |||
346 | self.b = recipe_d.getVar('B') | 347 | self.b = recipe_d.getVar('B') |
347 | self.base_libdir = recipe_d.getVar('base_libdir') | 348 | self.base_libdir = recipe_d.getVar('base_libdir') |
348 | self.bblayers = recipe_d.getVar('BBLAYERS').split() | 349 | self.bblayers = recipe_d.getVar('BBLAYERS').split() |
350 | self.bitbakepath = recipe_d.getVar('BITBAKEPATH') | ||
349 | self.bpn = recipe_d.getVar('BPN') | 351 | self.bpn = recipe_d.getVar('BPN') |
350 | self.cxx = recipe_d.getVar('CXX') | 352 | self.cxx = recipe_d.getVar('CXX') |
351 | self.d = recipe_d.getVar('D') | 353 | self.d = recipe_d.getVar('D') |
@@ -710,14 +712,15 @@ class RecipeModified: | |||
710 | 712 | ||
711 | def gen_install_deploy_script(self, args): | 713 | def gen_install_deploy_script(self, args): |
712 | """Generate a script which does install and deploy""" | 714 | """Generate a script which does install and deploy""" |
713 | cmd_lines = ['#!/bin/bash'] | 715 | cmd_lines = ['#!/bin/sh'] |
714 | 716 | ||
715 | # . oe-init-build-env $BUILDDIR | 717 | # . oe-init-build-env $BUILDDIR $BITBAKEDIR |
716 | # Note: Sourcing scripts with arguments requires bash | 718 | # Using 'set' to pass the build directory to oe-init-build-env in sh syntax |
717 | cmd_lines.append('cd "%s" || { echo "cd %s failed"; exit 1; }' % ( | 719 | cmd_lines.append('cd "%s" || { echo "cd %s failed"; exit 1; }' % ( |
718 | self.oe_init_dir, self.oe_init_dir)) | 720 | self.oe_init_dir, self.oe_init_dir)) |
719 | cmd_lines.append('. "%s" "%s" || { echo ". %s %s failed"; exit 1; }' % ( | 721 | cmd_lines.append('set %s %s' % (self.topdir, self.bitbakepath.rstrip('/bin'))) |
720 | self.oe_init_build_env, self.topdir, self.oe_init_build_env, self.topdir)) | 722 | cmd_lines.append('. "%s" || { echo ". %s %s failed"; exit 1; }' % ( |
723 | self.oe_init_build_env, self.oe_init_build_env, self.topdir)) | ||
721 | 724 | ||
722 | # bitbake -c install | 725 | # bitbake -c install |
723 | cmd_lines.append( | 726 | cmd_lines.append( |
diff --git a/scripts/lib/wic/plugins/source/extra_partition.py b/scripts/lib/wic/plugins/source/extra_partition.py new file mode 100644 index 0000000000..d370b0107e --- /dev/null +++ b/scripts/lib/wic/plugins/source/extra_partition.py | |||
@@ -0,0 +1,134 @@ | |||
1 | import logging | ||
2 | import os | ||
3 | import re | ||
4 | |||
5 | from glob import glob | ||
6 | |||
7 | from wic import WicError | ||
8 | from wic.pluginbase import SourcePlugin | ||
9 | from wic.misc import exec_cmd, get_bitbake_var | ||
10 | |||
11 | logger = logging.getLogger('wic') | ||
12 | |||
13 | class ExtraPartitionPlugin(SourcePlugin): | ||
14 | """ | ||
15 | Populates an extra partition with files listed in the IMAGE_EXTRA_PARTITION_FILES | ||
16 | BitBake variable. Files should be deployed to the DEPLOY_DIR_IMAGE directory. | ||
17 | |||
18 | The plugin supports: | ||
19 | - Glob pattern matching for file selection. | ||
20 | - File renaming. | ||
21 | - Suffixes to specify the target partition (by label, UUID, or partname), | ||
22 | enabling multiple extra partitions to coexist. | ||
23 | |||
24 | For example: | ||
25 | |||
26 | IMAGE_EXTRA_PARTITION_FILES_label-foo = "bar.conf;foo.conf" | ||
27 | IMAGE_EXTRA_PARTITION_FILES_uuid-e7d0824e-cda3-4bed-9f54-9ef5312d105d = "bar.conf;foobar.conf" | ||
28 | IMAGE_EXTRA_PARTITION_FILES = "foo/*" | ||
29 | WICVARS:append = "\ | ||
30 | IMAGE_EXTRA_PARTITION_FILES_label-foo \ | ||
31 | IMAGE_EXTRA_PARTITION_FILES_uuid-e7d0824e-cda3-4bed-9f54-9ef5312d105d \ | ||
32 | " | ||
33 | |||
34 | """ | ||
35 | |||
36 | name = 'extra_partition' | ||
37 | image_extra_partition_files_var_name = 'IMAGE_EXTRA_PARTITION_FILES' | ||
38 | |||
39 | @classmethod | ||
40 | def do_configure_partition(cls, part, source_params, cr, cr_workdir, | ||
41 | oe_builddir, bootimg_dir, kernel_dir, | ||
42 | native_sysroot): | ||
43 | """ | ||
44 | Called before do_prepare_partition(), list the files to copy | ||
45 | """ | ||
46 | extradir = "%s/extra.%d" % (cr_workdir, part.lineno) | ||
47 | install_cmd = "install -d %s" % extradir | ||
48 | exec_cmd(install_cmd) | ||
49 | |||
50 | if not kernel_dir: | ||
51 | kernel_dir = get_bitbake_var("DEPLOY_DIR_IMAGE") | ||
52 | if not kernel_dir: | ||
53 | raise WicError("Couldn't find DEPLOY_DIR_IMAGE, exiting") | ||
54 | |||
55 | extra_files = None | ||
56 | for (fmt, id) in (("_uuid-%s", part.uuid), ("_label-%s", part.label), ("_part-name-%s", part.part_name), (None, None)): | ||
57 | if fmt: | ||
58 | var = fmt % id | ||
59 | else: | ||
60 | var = "" | ||
61 | extra_files = get_bitbake_var(cls.image_extra_partition_files_var_name + var) | ||
62 | if extra_files is not None: | ||
63 | break | ||
64 | |||
65 | if extra_files is None: | ||
66 | raise WicError('No extra files defined, %s unset for entry #%d' % (cls.image_extra_partition_files_var_name, part.lineno)) | ||
67 | |||
68 | logger.info('Extra files: %s', extra_files) | ||
69 | |||
70 | # list of tuples (src_name, dst_name) | ||
71 | deploy_files = [] | ||
72 | for src_entry in re.findall(r'[\w;\-\./\*]+', extra_files): | ||
73 | if ';' in src_entry: | ||
74 | dst_entry = tuple(src_entry.split(';')) | ||
75 | if not dst_entry[0] or not dst_entry[1]: | ||
76 | raise WicError('Malformed extra file entry: %s' % src_entry) | ||
77 | else: | ||
78 | dst_entry = (src_entry, src_entry) | ||
79 | |||
80 | logger.debug('Destination entry: %r', dst_entry) | ||
81 | deploy_files.append(dst_entry) | ||
82 | |||
83 | cls.install_task = []; | ||
84 | for deploy_entry in deploy_files: | ||
85 | src, dst = deploy_entry | ||
86 | if '*' in src: | ||
87 | # by default install files under their basename | ||
88 | entry_name_fn = os.path.basename | ||
89 | if dst != src: | ||
90 | # unless a target name was given, then treat name | ||
91 | # as a directory and append a basename | ||
92 | entry_name_fn = lambda name: \ | ||
93 | os.path.join(dst, | ||
94 | os.path.basename(name)) | ||
95 | |||
96 | srcs = glob(os.path.join(kernel_dir, src)) | ||
97 | |||
98 | logger.debug('Globbed sources: %s', ', '.join(srcs)) | ||
99 | for entry in srcs: | ||
100 | src = os.path.relpath(entry, kernel_dir) | ||
101 | entry_dst_name = entry_name_fn(entry) | ||
102 | cls.install_task.append((src, entry_dst_name)) | ||
103 | else: | ||
104 | cls.install_task.append((src, dst)) | ||
105 | |||
106 | |||
107 | @classmethod | ||
108 | def do_prepare_partition(cls, part, source_params, cr, cr_workdir, | ||
109 | oe_builddir, bootimg_dir, kernel_dir, | ||
110 | rootfs_dir, native_sysroot): | ||
111 | """ | ||
112 | Called to do the actual content population for a partition i.e. it | ||
113 | 'prepares' the partition to be incorporated into the image. | ||
114 | In this case, we copies all files listed in IMAGE_EXTRA_PARTITION_FILES variable. | ||
115 | """ | ||
116 | extradir = "%s/extra.%d" % (cr_workdir, part.lineno) | ||
117 | |||
118 | if not kernel_dir: | ||
119 | kernel_dir = get_bitbake_var("DEPLOY_DIR_IMAGE") | ||
120 | if not kernel_dir: | ||
121 | raise WicError("Couldn't find DEPLOY_DIR_IMAGE, exiting") | ||
122 | |||
123 | for task in cls.install_task: | ||
124 | src_path, dst_path = task | ||
125 | logger.debug('Install %s as %s', src_path, dst_path) | ||
126 | install_cmd = "install -m 0644 -D %s %s" \ | ||
127 | % (os.path.join(kernel_dir, src_path), | ||
128 | os.path.join(extradir, dst_path)) | ||
129 | exec_cmd(install_cmd) | ||
130 | |||
131 | logger.debug('Prepare extra partition using rootfs in %s', extradir) | ||
132 | part.prepare_rootfs(cr_workdir, oe_builddir, extradir, | ||
133 | native_sysroot, False) | ||
134 | |||