Commit Graph

376 Commits

Author SHA1 Message Date
Daniel Semkowicz
056fe7fad4 uboot-extlinux-config.bbclass: Add menu title configuration
Add new UBOOT_EXTLINUX_MENU_TITLE variable that allows configuring
the "MENU TITLE" entry.

If set to empty, "MENU TITLE" will not be added to the output file.

(From OE-Core rev: 23026911142585fde9290e21b07934fc583b6540)

Signed-off-by: Daniel Semkowicz <dse@thaumatec.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-04 23:55:12 +01:00
Daniel Semkowicz
8676ca858b uboot-extlinux-config.bbclass: Uppercase "menu title" entry
All other extlinux.conf entries are written to the output file
in uppercase.

(From OE-Core rev: 6c89654cf37da95aeea07e1645f2cdffe320c8bc)

Signed-off-by: Daniel Semkowicz <dse@thaumatec.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-04 23:55:12 +01:00
Daniel Semkowicz
67cf43618f uboot-extlinux-config.bbclass: Remove repeated space character
(From OE-Core rev: e8a7a8d93c20f966bc2845d23696d01234cbb227)

Signed-off-by: Daniel Semkowicz <dse@thaumatec.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-04 23:55:12 +01:00
Daniel Semkowicz
047eea40f5 uboot-extlinux-config.bbclass: Add missing variable descriptions
Description of UBOOT_EXTLINUX and UBOOT_EXTLINUX_CONFIG was missing.
Describe these two variables in class comment.

(From OE-Core rev: fb1c2cae3dbd37ad25d26efb09e80480d49063f9)

Signed-off-by: Daniel Semkowicz <dse@thaumatec.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-01 08:12:59 +01:00
Ninad Palsule
41c15b1bae kernel-fitImage: Strip path component from dtb
Machines that have added subdirectires to the KERNEL_DEVICETREE
recently, such as arm32 boards that were moved under subdirectories in
Linux 6.5, will have that subdirectory in the node name of the FIT. This
breaks existing systems that select a configuration in u-boot by it's
name.

Strip off the directory component from the device tree to preserve
compatibility.

(From OE-Core rev: 941ba1a132bafa9c9be855fb91fec96d8b06299f)

Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Ninad Palsule <ninad@linux.ibm.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-28 12:37:47 +01:00
Martin Jansa
9e8b56994d multilib_script.bbclass: expand script name as well
* e.g. mozjs from meta-oe contains major version from PV in the script name
  but currently cannot use a variable there because it would be unexpanded
  in the varflag name as shown in bitbake -e (lib32-curl included for comparison)

env.lib32-curl:# $ALTERNATIVE_TARGET [2 operations]
env.lib32-curl-#   set oe-core/meta/conf/documentation.conf:66
env.lib32-curl-#     [doc] "Used by the alternatives system to create default link locations for duplicated commands."
env.lib32-curl-#   set multilib_script.bbclass:37 [__anon_40_oe_core_meta_classes_recipe_multilib_script_bbclass]
env.lib32-curl-#     [curl-config] "${bindir}/curl-config-${MULTILIB_SUFFIX}"
env.lib32-curl-# pre-expansion value:
env.lib32-curl-#   "None"
--
env.lib32-mozjs-115:# $ALTERNATIVE_TARGET [2 operations]
env.lib32-mozjs-115-#   set oe-core/meta/conf/documentation.conf:66
env.lib32-mozjs-115-#     [doc] "Used by the alternatives system to create default link locations for duplicated commands."
env.lib32-mozjs-115-#   set multilib_script.bbclass:37 [__anon_40_oe_core_meta_classes_recipe_multilib_script_bbclass]
env.lib32-mozjs-115-#     [js${MAJ_VER}-config] "${bindir}/js${MAJ_VER}-config-${MULTILIB_SUFFIX}"
env.lib32-mozjs-115-# pre-expansion value:
env.lib32-mozjs-115-#   "None"
--
env.lib32-mozjs-115-escript:# $ALTERNATIVE_TARGET [2 operations]
env.lib32-mozjs-115-escript-#   set oe-core/meta/conf/documentation.conf:66
env.lib32-mozjs-115-escript-#     [doc] "Used by the alternatives system to create default link locations for duplicated commands."
env.lib32-mozjs-115-escript-#   set multilib_script.bbclass:38 [__anon_41_oe_core_meta_classes_recipe_multilib_script_bbclass]
env.lib32-mozjs-115-escript-#     [js115-config] "/usr/bin/js115-config-${MULTILIB_SUFFIX}"
env.lib32-mozjs-115-escript-# pre-expansion value:
env.lib32-mozjs-115-escript-#   "None"

Otherwise log.do_package shows that apply_update_alternative_renames first
renames the js115-config to js115-config.mozjs-115 (default ALTERNATIVE_TARGET suffix is '.${BPN}')
and multilibscript_rename later fails:

DEBUG: Executing python function apply_update_alternative_renames
NOTE: mozjs-115: Rename /usr/bin/js115-config -> /usr/bin/js115-config.mozjs-115
DEBUG: Python function apply_update_alternative_renames finished
DEBUG: Executing shell function multilibscript_rename
mv: cannot stat 'BUILD/work/mach-oemllib32-linux-gnueabi/lib32-mozjs-115/115.2.0/package/usr/bin/js115-config': No such file or directory
WARNING: exit code 1 from a shell command.

I wonder if we actually need multilibscript_rename as apply_update_alternative_renames seems
to do the rename already.

(From OE-Core rev: d07bfddba023a1c92491b261c9f9c25ec1a0ef57)

Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-28 12:37:47 +01:00
Charles-Antoine Couret
e0494a64f1 systemd-boot-cfg: add .conf suffix to default entry label
Since systemd v245 (commit 6cd12ebcfe459466257ea63022a32515d756e719), systemd-boot
expects default entry to have the complete filename as value.

LABELS from poky are by default without any suffixes like "boot install", so default entry
does not have the .conf suffix as well and systemd-boot is not able to use this information
and it's starting in any case the first entry. To be able to start another entry by default,
.conf suffix is required.

With this change, LABELS variable can still be used by other bootloaders and being used as description
field.

(From OE-Core rev: 1adf70729dafc9729e665986ad2e2250cbd25c5b)

Signed-off-by: Charles-Antoine Couret <charles-antoine.couret@mind.be>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-26 10:35:28 +01:00
Derek Straka
3c8cfbfc04 pypi.bbclass: Update the upstream checks to automatically replace '_' with '-'
For a number of existing packages, the pypi URI contains '-', but the package name (PYPI_PACKAGE) uses '_'.  Add a simple replace for the UPSTREAM_CHECK_URI and UPSTREAM_CHECK_REGEX.  The change resulted in 19 additional auto-detected upstream checks for python packages meta-python.

It did break upstream checks for 3 packages that will be patched shortly:
 - python3-ipython-genutils
 - python3-ninja-syntax
 - python3-wpa-supplicant

(From OE-Core rev: f4e2923bfac8a0a5b702ffd2dd957213a6268f6b)

Signed-off-by: Derek Straka <derek@asterius.io>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-22 07:45:17 +01:00
Richard Purdie
7ebbd68f0f license/license_image: Fix license file layout to avoid overlapping files
Currently DEPLOY_DIR/licenses is added to SSTATE_ALLOW_OVERLAP_FILES. This
leads to bugs since when one MACHINE_ARCH recipes is cleaned, it removes the
files for another which then results in later build failures as license files
disappear.

The solution is to include SSTAGE_PKGARCH in the path names to the license files.
That does mean a search has to be used to find the correct license files for a
given PN but that can be done via SSTATE_ARCHS.

The implication for other tools is the layout has changed so tools will need to
adapt to the new paths. The benefit is no more strange build failures such as from
patterns like:

MACHINE=qemux86-64 bitbake core-image-minimal
MACHINE=genericx86-64 bitbake core-image-minimal
MACHINE=qemux86-64 bitbake linux-yocto -c clean
MACHINE=genericx86-64 bitbake core-image-minimal -C rootfs

[YOCTO #14123]

For anyone finding this commit, I'd question how much people should be relying on
this code for tooling and suggest the SPDX manifests should be the preferred data
format going forward anyway.

(From OE-Core rev: 1a4ab9fc26659507e678e87312b514e8ea515673)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-20 23:51:11 +01:00
Richard Purdie
84e17003c6 multilib: fix SSTATE_ARCHS for multilib usage
When building multilibs, we need to inject the multilib sstate pkgarch
into SSTATE_ARCHS so the list forms a complete search path. Add a tweak
to do this.

PACKAGE_ARCH defaults to TUNE_PKGARCH so this is equivalent and just
guards against recipes changing the value which may have other unwanted
side effects.

(From OE-Core rev: 37126ffc7ccbd3df57ebbd8e581d158f03bb3b4c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-20 23:51:11 +01:00
Martin Jansa
f92b7ddc73 fontcache.bbclass: avoid native recipes depending on target fontconfig
* this caused liberation-font-native to depend on TUNE_PKGARCH target fontconfig
  because ${MLPREFIX}fontconfig-utils is added to RDEPENDS in anonymous python

* the dependency tree for liberation-font-native got much shorter
  (just quilt-native and liberation-font-native itself):
   2 after/pn-buildlist
  78 before/pn-buildlist

* fixes graphviz-native signature issue as well as detected with sstate-diff-machines.sh

  $ bitbake-diffsigs \
    sstate-after/mako/x86_64-linux/graphviz-native/8.1.0.do_populate_sysroot.sigdata.184d4fd355f1e7a2d7d929ef4b5f62b94e2071df9dd674b2067ec21bfc7bcc1b \
    sstate-after/qemux86-64/x86_64-linux/graphviz-native/8.1.0.do_populate_sysroot.sigdata.35da674d2dbc275bac02869dfce4165466315023910bdef65a6026e2cb942a46
  Hash for task dependency liberation-fonts-native:do_populate_sysroot changed from 310d3da04ad9abf8ee99997e53d1ffa71c2b7d9d60fb0e8de85171a9ab6a77d3 to 048420ad1410c2b8d95498fc3c11681207335a2c722836f1f3e683cc449814da

(From OE-Core rev: 998d4da9d89aea77dc0f2cbac60ea64258331756)

Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-20 23:51:11 +01:00
Mikko Rapeli
bd1fc66e4c testimage.bbclass: remove QEMU_USE_SLIRP variable
QEMU_USE_SLIRP is replaced by TEST_RUNQEMUPARAMS with "slirp" and
possibly other arguments to runqemu script.

(From OE-Core rev: 99fd24f0d9ff79fed389ae5a01c3031d7e7167d0)

Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-14 21:57:16 +01:00
Ross Burton
a96f735ff9 testimage: respect target/server IPs when using slirp
We can't hardcode these IPs when using slirp.

The target IP will need a port to be specified as this controls what port
the SSH connection uses, and when slirp is used it can't bind to port
22. The qemu runner (OEQemuTarget) assumes that the first port forward
is the SSH forward, but this may be wrong or a different target may be
used.

The server IP depends on how the virtual networking is configured.
runqemu defaults to 10.0.2.x for the guests so that is a wise default,
but that may be configured differently.

(From OE-Core rev: 81b304e2558730de285f2773371340fc636a8ed1)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-14 09:19:38 +01:00
Kai Kang
6c4e33ceb1 goarch.bbclass: not compatible with riscv32
It fails to build recipes which inherit goarch.bbclass for qemuriscv32:

| ERROR: Nothing PROVIDES 'docker-moby'
| docker-moby was skipped: Unsupported CPU architecture: riscv32

So empty COMPATIBLE_HOST for riscv32.

(From OE-Core rev: e053e718b07855eacf0c24741ec8a56308f23657)

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-14 09:19:37 +01:00
Mikko Rapeli
8af6f66bb4 testimage.bbclass: detect slirp from TEST_RUNQEMUPARAMS
Also set target and server IP addresses correctly to 127.0.0.1
so that TEST_TARGET_IP and TEST_SERVER_IP don't
need to be set manually with slirp.

Users run qemu images with slirp networking like this:

$ bitbake core-image-minimal
$ ../poky/scripts/runqemu slirp

slirp networking means that only one TCP port is forwarded from host
system to the qemu machine so that ssh into the machine works. ping
and other low level networking from host to target machine do not work,
but networking from target via host does work. This is much more easy to
setup than the bridge networking used by default, which I've never
managed to get running on various host machines.

To use slirp networking wita qemu and core-image-minimal to run testimage.bbclass tests, add
these to local.conf:

IMAGE_CLASSES += "testimage"
IMAGE_FEATURES += "ssh-server-dropbear"
TEST_RUNQEMUPARAMS += "slirp"

Then image can be compiled and tested with:

$ bitbake core-image-minimal
$ bitbake -c testimage core-image-minimal

Note that only few of the current oeqa runtime tests work against
core-image-minimal, but test results look like:

RESULTS:
RESULTS - date.DateTest.test_date: PASSED (3.64s)
RESULTS - df.DfTest.test_df: PASSED (0.55s)
RESULTS - oe_syslog.SyslogTest.test_syslog_running: PASSED (0.56s)
RESULTS - oe_syslog.SyslogTestConfig.test_syslog_logger: PASSED (1.88s)
RESULTS - oe_syslog.SyslogTestConfig.test_syslog_restart: PASSED (0.93s)
RESULTS - pam.PamBasicTest.test_pam: PASSED (2.20s)
RESULTS - parselogs.ParseLogsTest.test_parselogs: PASSED (4.98s)
RESULTS - ping.PingTest.test_ping: PASSED (0.05s)
RESULTS - ssh.SSHTest.test_ssh: PASSED (1.28s)
RESULTS - systemd.SystemdBasicTests.test_systemd_basic: PASSED (0.56s)
RESULTS - systemd.SystemdBasicTests.test_systemd_failed: PASSED (1.10s)
RESULTS - systemd.SystemdBasicTests.test_systemd_list: PASSED (0.92s)
RESULTS - systemd.SystemdJournalTests.test_systemd_boot_time: PASSED (0.56s)
RESULTS - systemd.SystemdJournalTests.test_systemd_journal: PASSED (0.54s)
RESULTS - apt.AptRepoTest.test_apt_install_from_repo: SKIPPED (0.00s)
RESULTS - buildcpio.BuildCpioTest.test_cpio: SKIPPED (0.00s)
RESULTS - buildgalculator.GalculatorTest.test_galculator: SKIPPED (0.00s)
RESULTS - buildlzip.BuildLzipTest.test_lzip: SKIPPED (0.00s)
RESULTS - connman.ConnmanTest.test_connmand_help: SKIPPED (0.00s)
RESULTS - connman.ConnmanTest.test_connmand_running: SKIPPED (0.00s)
RESULTS - dnf.DnfBasicTest.test_dnf_help: SKIPPED (0.00s)
RESULTS - dnf.DnfBasicTest.test_dnf_history: SKIPPED (0.00s)
RESULTS - dnf.DnfBasicTest.test_dnf_info: SKIPPED (0.00s)
RESULTS - dnf.DnfBasicTest.test_dnf_search: SKIPPED (0.00s)
RESULTS - dnf.DnfBasicTest.test_dnf_version: SKIPPED (0.00s)
RESULTS - dnf.DnfRepoTest.test_dnf_exclude: SKIPPED (0.00s)
RESULTS - dnf.DnfRepoTest.test_dnf_install: SKIPPED (0.00s)
RESULTS - dnf.DnfRepoTest.test_dnf_install_dependency: SKIPPED (0.00s)
RESULTS - dnf.DnfRepoTest.test_dnf_install_from_disk: SKIPPED (0.00s)
RESULTS - dnf.DnfRepoTest.test_dnf_install_from_http: SKIPPED (0.00s)
RESULTS - dnf.DnfRepoTest.test_dnf_installroot: SKIPPED (0.00s)
RESULTS - dnf.DnfRepoTest.test_dnf_installroot_usrmerge: SKIPPED (0.00s)
RESULTS - dnf.DnfRepoTest.test_dnf_makecache: SKIPPED (0.00s)
RESULTS - dnf.DnfRepoTest.test_dnf_reinstall: SKIPPED (0.00s)
RESULTS - dnf.DnfRepoTest.test_dnf_repoinfo: SKIPPED (0.00s)
RESULTS - gcc.GccCompileTest.test_gcc_compile: SKIPPED (0.00s)
RESULTS - gcc.GccCompileTest.test_gpp2_compile: SKIPPED (0.00s)
RESULTS - gcc.GccCompileTest.test_gpp_compile: SKIPPED (0.00s)
RESULTS - gcc.GccCompileTest.test_make: SKIPPED (0.00s)
RESULTS - gi.GObjectIntrospectionTest.test_python: SKIPPED (0.00s)
RESULTS - go.GoHelloworldTest.test_gohelloworld: SKIPPED (0.00s)
RESULTS - kernelmodule.KernelModuleTest.test_kernel_module: SKIPPED (0.00s)
RESULTS - ldd.LddTest.test_ldd: SKIPPED (0.00s)
RESULTS - logrotate.LogrotateTest.test_logrotate_newlog: SKIPPED (0.00s)
RESULTS - logrotate.LogrotateTest.test_logrotate_wtmp: SKIPPED (0.00s)
RESULTS - oe_syslog.SyslogTestConfig.test_syslog_startup_config: SKIPPED (0.00s)
RESULTS - opkg.OpkgRepoTest.test_opkg_install_from_repo: SKIPPED (0.00s)
RESULTS - perl.PerlTest.test_perl_works: SKIPPED (0.00s)
RESULTS - ptest.PtestRunnerTest.test_ptestrunner_expectfail: SKIPPED (0.00s)
RESULTS - ptest.PtestRunnerTest.test_ptestrunner_expectsuccess: SKIPPED (0.00s)
RESULTS - python.PythonTest.test_python3: SKIPPED (0.00s)
RESULTS - rpm.RpmBasicTest.test_rpm_help: SKIPPED (0.00s)
RESULTS - rpm.RpmBasicTest.test_rpm_query: SKIPPED (0.00s)
RESULTS - rpm.RpmBasicTest.test_rpm_query_nonroot: SKIPPED (0.00s)
RESULTS - rpm.RpmInstallRemoveTest.test_check_rpm_install_removal_log_file_size: SKIPPED (0.00s)
RESULTS - rpm.RpmInstallRemoveTest.test_rpm_install: SKIPPED (0.00s)
RESULTS - rpm.RpmInstallRemoveTest.test_rpm_remove: SKIPPED (0.00s)
RESULTS - rust.RustCompileTest.test_cargo_compile: SKIPPED (0.00s)
RESULTS - rust.RustCompileTest.test_rust_compile: SKIPPED (0.00s)
RESULTS - scp.ScpTest.test_scp_file: SKIPPED (0.00s)
RESULTS - stap.StapTest.test_stap: SKIPPED (0.00s)
RESULTS - systemd.SystemdServiceTests.test_systemd_disable_enable: SKIPPED (0.00s)
RESULTS - systemd.SystemdServiceTests.test_systemd_disable_enable_ro: SKIPPED (0.00s)
RESULTS - systemd.SystemdServiceTests.test_systemd_status: SKIPPED (0.00s)
RESULTS - systemd.SystemdServiceTests.test_systemd_stop_start: SKIPPED (0.00s)
RESULTS - weston.WestonTest.test_wayland_info: SKIPPED (0.00s)
RESULTS - weston.WestonTest.test_weston_can_initialize_new_wayland_compositor: SKIPPED (0.00s)
RESULTS - weston.WestonTest.test_weston_running: SKIPPED (0.00s)
RESULTS - weston.WestonTest.test_weston_supports_xwayland: SKIPPED (0.00s)
RESULTS - xorg.XorgTest.test_xorg_running: SKIPPED (0.00s)
SUMMARY:
core-image-minimal () - Ran 70 tests in 22.173s
core-image-minimal - OK - All required tests passed (successes=14, skipped=56, failures=0, errors=0)
NOTE: recipe core-image-minimal-1.0-r0: task do_testimage: Succeeded
NOTE: Tasks Summary: Attempted 1305 tasks of which 1304 didn't need to be rerun and all succeeded.

(From OE-Core rev: f4e865062cec06586d8c38c05d86a5b0d727625c)

Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-12 12:23:09 +01:00
Adrian Freihofer
27414b27d4 cmake.bbclass: refactor cmake args
Make the details of the cmake configure arguments available to
d.getVar(). This allows to share them with devtool via tinfoil.

(From OE-Core rev: 325fc8523bb5f62cd3754277aa34032cc0884861)

Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-10 08:54:36 +01:00
Adrian Freihofer
d0a91931f2 cmake.bbclass: cleanup spaces and tabs
(From OE-Core rev: f1e96bf4ace090ff8ef9d311268ff068a0a3768e)

Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-10 08:54:36 +01:00
Richard Purdie
6fd8af0d30 classes: Drop ';' delimiter from ROOTFS/IMAGE*COMMAND variables
Originally these were shell functions but they have long since been processed by
bb.build.exec_func(). Since we no longer need shell syntax, we can drop the ';'
delimiters and just use a space separated string.

This cleans up the variable and quietly removes any stray ';' that do happen to
still make it in.

(From OE-Core rev: c3365dfd9ddd7fbe70b62e0f11166e57a8ca6f73)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-09 22:14:41 +01:00
Khem Raj
f606c04ee4 rust-target-config: Map rust target to OE target
(From OE-Core rev: caca883b524a767d970d934744b0f2b0ef743e20)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-07 07:53:51 +01:00
Zang Ruochen
8e4b6fdce5 goarch.bbclass: Add loongarch64 to go_map_arch
(From OE-Core rev: 97010a9c1b2bfc7ea01441f37c0682bc5cd4349b)

Signed-off-by: Zang Ruochen <zangruochen@loongson.cn>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-07 07:53:51 +01:00
Ryan Eatmon
81af7cd406 kernel.bbclass: Add force flag to rm calls
The latest 6.5 kernels do not appear to create the source file in
${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/source so the
recipe errors out when trying to remove it.  Simple fix is to add the
-f (force) flag to the call.

(From OE-Core rev: 2e669bf797b15d803e7d6a700e449bdc467a4bcc)

Signed-off-by: Ryan Eatmon <reatmon@ti.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-02 11:47:50 +01:00
Jaeyoon Jung
d4664d2b79 cml1: Fix KCONFIG_CONFIG_COMMAND not conveyed fully in do_menuconfig
Variable overrides in KCONFIG_CONFIG_COMMAND do not work as expected due
to double quote mismatches. The issue is reproducible in an environment
where gold is the default linker. Below is an example snippet of
run.do_terminal generated by do_menuconfig.

do_terminal() {
exec sh -c "make menuconfig   CC="aarch64-webos-linux-gcc ..."
LD="aarch64-webos-linux-ld.bfd ..."
...
}

Although LD override is set to bfd correctly, it is not passed to make
and make menuconfig ends up with messages like:
| gold linker is not supported as it is not capable of linking the kernel proper.
| scripts/Kconfig.include:56: Sorry, this linker is not supported.

(From OE-Core rev: 9c483765db762dbe8020423c8778518612b7e5f7)

Signed-off-by: Jaeyoon Jung <jaeyoon.jung@lge.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-02 11:47:50 +01:00
Joshua Watt
cfa0ad6822 classes/image_types: Add vfat image type
Adds support for creating FAT formatted file system images (useful for
boot partitions on some SoCs).

Note that FAT partitions are limited in what they can represent (no
symlinks or device files), so they can't really be used for general
purpose root file systems. As such, they are skipped when testing for
that purpose.

(From OE-Core rev: 440fa508d362b8a449beb1b82dd999e980b753b7)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-30 08:43:03 +01:00
Chen Qi
68e468b3e9 cmake.bbclass: fix allarch override syntax
The override syntax should be ":allarch" instead of "_allarch".

(From OE-Core rev: bea74c9942a3bb4f71aca0f722b4a7306ae52fb4)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-29 09:41:07 +01:00
Richard Purdie
65318019cd recipes/classes/scripts: Drop SRCPV usage in OE-Core
Now that SRCPV isn't needed we can simplify things in a few places...

(From OE-Core rev: 843f82a246a535c353e08072f252d1dc78217872)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-24 16:50:24 +01:00
Frederic Martinsons
c318d1914e classes-recipe: add cargo_c.bbclass
This class can be used inside rust recipe to generate
a rust library that can be called by C/C++ code.

The rust recipe which uses this class has to only replace
"inherit cargo" by "inherit cargo_c".

(From OE-Core rev: 1e4862db1d6293872b76b62acee1e4a5e2597367)

Signed-off-by: Frederic Martinsons <frederic.martinsons@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-21 16:15:35 +01:00
Peter Kjellerstedt
b7b382101b bin_package.bbclass: Inhibit the default dependencies
Nothing is being built so there is no need for the cross-compiler.

(From OE-Core rev: d1d09bd4d7be88f0e341d5fccbfbefeb98d4b727)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-21 11:34:12 +01:00
Ross Burton
06cf343e14 gi-docgen: depend on qemu-usermode MACHINE_FEATURES
gi-docgen uses GObject Introspection, so depends on qemu-usermode working.

(From OE-Core rev: 524eab0e39c53ea9006b95c9e08ea1f071f1d1f2)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-21 11:34:12 +01:00
Ross Burton
de6505c8fa meson.bbclass:: update do_write_config vardeps
Add OBJCOPY and EXEWRAPPER_ENABLED, remove LD as it isn't used anymore.

(From OE-Core rev: 920f6cb25c06fde679f641a076a8e17dc36a828e)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-16 07:54:38 +01:00
Ross Burton
d0cedc4039 meson.bbclass: add MESON_TARGET
Add a variable to control what target gets built in do_compile.  By
default this value is unset so meson builds the default target, but by
setting MESON_TARGET a specific target can be built.

(From OE-Core rev: bd82ccc819ec90af08216fe780af6a66f1d347b3)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-16 07:54:38 +01:00
Khem Raj
64789f18f3 kernel.bbclass: Use KERNEL_STRIP instead of STRIP
Kernel uses its own variables KERNEL_* instead of general toolchain env
variables, therefore use KERNEL_STRIP here explicitly, Problems happen
when using llvm-strip as default STRIP in distro settings, since kernel
defaults to using gcc, system does not stage llvm/clang toolchain into
kernel's staging sysroot and this function ends up with

FileNotFoundError: [Errno 2] No such file or directory: 'riscv64-yoe-linux-llvm-strip'

(From OE-Core rev: 2db0ef8fe6381c893791ad645748f6e7c8134e5f)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-16 07:54:38 +01:00
Benjamin Bara
7865ffaf57 rust-target-config: fix target_features for vfpv3d16
A build with vfpv3d16 (armv7at2hf-vfpv3d16) tune currently warns:
'+d16' is not a recognized feature for this target (ignoring feature)

This correlates with the supported target_features for arm[1].

With the now enabled features, rustc might use vdiv.f64 with register
d17, which leads to an illegal instruction on the given platform.

Therefore, adapt the features s.t. they correspond to the
armv7_unknown_linux_gnueabihf target[2].

Additionally, only set the latest supported version of VFP.

[1] https://github.com/rust-lang/rust/blob/1.70.0/compiler/rustc_codegen_ssa/src/target_features.rs#L32
[2] https://github.com/rust-lang/rust/blob/1.70.0/compiler/rustc_target/src/spec/armv7_unknown_linux_gnueabihf.rs#L15

(From OE-Core rev: d79f0a0702b667625e12c9e131932e02cb08bada)

Signed-off-by: Benjamin Bara <benjamin.bara@skidata.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-14 12:51:21 +01:00
Richard Purdie
71282bbc53 qemuboot: Update hardcoded path to match new layout
Obviously this code is horrible and shouldn't hardcode it. Update it to match
the WORKDIR change to drop PE/PR for now.

(From OE-Core rev: 05095c116602d1a8c388cc02afffcc36230138f7)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-11 13:22:01 +01:00
Joel Stanley
b40619a5b3 kernel: don't fail if Modules.symvers doesn't exist
Kernels that do not use modules do not have the Modules.symvers file,
which causes the previous one-liner to fail.  Invert the logic so that
the absence of the Modules.symvers is a passing situation but we still
get failure checking on the install operation.

(From OE-Core rev: 856c916ffbf3438d8cf5d8bed344473bde03b56e)

Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-10 09:18:54 +01:00
Richard Purdie
afcd4b9cbc qemuboot/runqemu: Fix 6.2 and later kernel network device naming
With kernel 6.2 and later network devices are renamed by systemd. This does not
match with the current network device naming assumed in our configuration.

We may or may not change that naming but for now, pass the right kernel commandline
so things work as expected with newer kernels and removing a blocker on upgrading
to the 6.4 kernel by default.

(From OE-Core rev: 9e9c33d51e401fe2b4a632db74ccb3449e4b23ee)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-09 13:22:00 +01:00
Frederic Martinsons
2dd04232e7 cargo_common.bbclass: Handle Cargo.lock modifications for git dependencies
Now we use --frozen, Cargo.lock cannot be modified by cargo build.
These patched git dependencies requires that the git url is removed
from Cargo.lock.

Fixes #15104

(From OE-Core rev: b80f756dd480fc92f58d7e10105d3a2427a32795)

Signed-off-by: Frederic Martinsons <frederic.martinsons@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-09 13:22:00 +01:00
Frederic Martinsons
d4c14304c9 cargo.bbclass: Use --frozen flag for cargo operations
It supersed the --offline flag and guarantee that Cargo.lock
file will not be modified during the build.

(From OE-Core rev: 9ff9e6523bd7eb6cdc854adcbd031085c536e0e6)

Signed-off-by: Frederic Martinsons <frederic.martinsons@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-09 13:22:00 +01:00
Denis OSTERLAND-HEIM
5797574236 kernel-fitImage: add machine compatible to config section
to allow bootloaders to select best matching configuration based
on compatible string.

(From OE-Core rev: f4c82fb6da89359679c52318a8ebab7295c233e8)

Signed-off-by: Denis OSTERLAND-HEIM <denis.osterland@diehl.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-01 09:51:20 +01:00
Frederic Martinsons
80cec38c0c ptest-cargo.bbclass: Support of cargo workspaces
For complex project, it is very common to have multiple
sub artifacts and so use workspaces, sometimes it has
even no root artifacts (but several bin or lib) and
virtual manifest is used for that.

Long story short, support this case in ptest-cargo class
to look for all test binaries in the current project
and no more those generated by the root Cargo.toml

(From OE-Core rev: 67644c3fa7d012ad03d0a876a281d5abd5edf7fe)

Signed-off-by: Frederic Martinsons <frederic.martinsons@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-07-30 07:54:44 +01:00
Tim Orling
0cd6a81d6d python_setuptools3_rust: inherit ...build_meta
Rather than inheriting the aging `setuptools3` bbclass, inherit
`python_setuptools_build_meta` which is one of the PEP 517 build
backends (for proper wheels using pyproject.toml).

Since python_setuptools_build_meta does not have a do_configure,
call the parent python_pep517_do_configure().

(From OE-Core rev: 52d33576a17574025e40526816c5f0ba72a57eea)

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-07-25 15:27:33 +01:00
Bruce Ashfield
88ae1b73c0 kernel: make LOCALVERSION consistent between recipes
The initial fix for localversion setting in 6.3+ broke older
recipes and also broke recipes setting localversion in a kernel
recipe, as make-mod-scripts (and other locations) can trigger
a regeneration of files and don't have access to the variable.

Moving the setting of this variable to the global namespace
doesn't make sense, so we follow the example of the kernel-abiversion
and save a kernel-localversion to the build artifacts.

Recipes that may regenerate scripts/dynamic files, must
depend on the do_shared_workedir of the kernel and use the helper
function to read the file storing the localversion.

(From OE-Core rev: b378eec156998eea55ba61e59103cb34fab0d07c)

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-07-25 15:27:33 +01:00
Staffan Rydén
3ebef7a719 kernel: Fix path comparison in kernel staging dir symlinking
Due to an oversight in the do_symlink_kernsrc function, the path
comparison between "S" and "STAGING_KERNEL_DIR" is broken. The code
obtains both variables, but modifies the local copy of "S" before
comparing them, causing the comparison to always return false.

This can cause the build to fail when the EXTERNALSRC flag is enabled,
since the code will try to create a symlink even if one already exists.

This patch resolves the issue by comparing the variables before they are
modified.

(From OE-Core rev: afd2038ef8a66a5e6433be31a14e1eb0d9f9a1d3)

Signed-off-by: Staffan Rydén <staffan.ryden@axis.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-07-21 11:52:26 +01:00
Bruce Ashfield
74b670cf0b kernel: set HOSTPKG_CONFIG to use pkg-config-native
The 5.19 kernel introduced a variable to specify the pkg-config
command to use for host tools.

Previously to this being introduced, we needed to overrride the
standard PKG_CONFIG* variables to avoid calls to pkg-config using
the target configuration.

While we can't completely drop the PKG_CONFIG workaround, we
should introduce the new variable, and prepare to only use it
once all supported kernels are 5.19+

(From OE-Core rev: d4b5ea28078cbbf417d95e1b77c6b8c3e9f9e4c0)

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-07-21 11:52:26 +01:00
Alexander Kanavin
810ccdd99f Revert "rootfs-postcommands.bbclass: add post func remove_unused_dnf_log_lock"
This was not well researched or explained, and obscures a problem elsewhere:
if dnf leaves lock files around, the problem should be fixed at the source,
and not in an after-the-fact function.

(From OE-Core rev: 49bad18012a4079f0dbfe6c541a46ec508940f28)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-07-18 09:18:34 +01:00
Changqing Li
cf0efc86b3 rootfs-postcommands.bbclass: add post func remove_unused_dnf_log_lock
Remove log_lock.pid which maybe created during do_rootfs. In commit
[dnf: only write the log lock to root for native dnf],
native dnf changed to write log lock to root, and target dnf still
use /var/log, so log_lock.pid need to be removed post do_rootfs.

(From OE-Core rev: 406a72a9a47c2735b7e18cefc682b1df00d5a9aa)

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-07-17 15:30:04 +01:00
Frederic Martinsons
f782c806a4 ptest-cargo.bbclass: fix condition to detect test executable
before that, a test executable at None was picked.
Moreover, use universal_newlines to subprocess call to avoid
being polluted by fancy carriage return characters.

(From OE-Core rev: 8dd52f19a919fb7be0ffb7d40782eafe183f8a09)

Signed-off-by: Frederic Martinsons <frederic.martinsons@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-07-14 17:31:06 +01:00
Bruce Ashfield
bb0f9e8770 kernel: fix localversion in v6.3+
During testing of the v6.4 reference kernel, it was noticed that
on-target modules no longer matched the magic value of the running
kernel.

This was due to a different localversion in the cross built kernel
and the scripts / resources created on target.

This was due to changes in the setlocalversion script introduced
in the v6.3 series.

The .scmversion file is no longer used (or packaged) to inhibit
the addition of a "+" (through querying of the git status of the
kernel) or the setting of a local version.

We recently introduced the KERNEL_LOCALVERSION variable to allow
recipes to place a value in .scmversion, so we extend the use of
that variable to kernel-arch.bbclass and use it to set the
exported variable LOCALVERSION.

We must do it at the kernel-arch level, as the variable must be
exported in any kernel build to ensure that setlocalversion always
correctly sets the localversion.

(From OE-Core rev: 765b13b7305c8d2f222cfc66d77c02e6a088c691)

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-07-12 16:50:45 +01:00
Ross Burton
7e01522204 rootfs_rpm: don't depend on opkg-native for update-alternatives
opkg-native hasn't provided update-alternatives since 2014[1] so this is
the wrong dependency, and image.bbclass depends on the virtual provider
virtual/update-alternatives-native already.

[1] oe-core 1e2c38ce13f8e4b25d8656d237343380cbc970aa

(From OE-Core rev: 51004376be9a6b9a4c38585d14d2516d90138319)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-07-10 11:36:34 +01:00
Ross Burton
1b5636daf1 cml1: add showconfig task to easily find the generated .config file
It's not that unusual to want to manually review the generated .config file
after do_configure has ran.  Add a new 'showconfig' task that simply
prints the full path to the .config file, so the user can open it in an
editor.

(From OE-Core rev: 7edd3cd80ce6b705cfcf5ab794e809303745b951)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-07-10 11:36:34 +01:00
Khem Raj
bed76c8b48 meson.bbclass: Point to llvm-config from native sysroot
Default search in meson would grok /usr/bin for llvm-config and if found
will use it, which might add wrong paths into cflags/ldflags, since we
depend on llvm-native when building gallium support ( thats when
llvm-config is effective), its better to point llvm-config into native
sysroot so it can add correct paths into compiler/linker cmdline

(From OE-Core rev: cc73360b9728812ed6123e30559b77d8e89cc21c)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-07-10 11:36:34 +01:00