Commit Graph

712 Commits

Author SHA1 Message Date
Gyorgy Sarvari
697d7cc740 conf/bitbake.conf: use gnu mirror instead of main server
ftp.gnu.org is the main server of the GNU project, however download speed
can vary greatly based on one's location.

Using ftpmirror.gnu.org should redirect the request to the closest up-to-date mirror,
which should result sometimes in significantly faster download speed, depending
on one's location. This should also distribute the traffic more across the mirrors.

This information was sourced from https://www.gnu.org/prep/ftp.html .

(From OE-Core rev: ef14bcae0f3f27acdd4e591fac69515aa912f194)

Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit d8c6f01d7467e018aa0ed27a87850d9e4434a47a)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-10-13 12:42:58 -07:00
Daniel Turull
5b7a6dec85 package: export debugsources in PKGDESTWORK as json
The source information used during packaging can be use from other tasks to
have more detailed information on the files used during the compilation and
improve SPDX accuracy.

Source files used during compilation are store as compressed zstd json in
pkgdata/debugsources/$PN-debugsources.json.zstd
Format:
{ binary1: [src1, src2, ...], binary2: [src1, src2, ...] }

I checked the sstate size, and it slightly increases using core-image-full-cmdline:
without patch: 2456792 KB sstate-cache/
with patch:    2460028 KB sstate-cache/
(4236 KB or 0.17%)

(From OE-Core rev: c507dcb8a8780a42bfe68b1ebaff0909b4236e6b)
Adaptations to match spdx in scarthgap: change BP to PF

CC: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
CC: Richard Purdie <richard.purdie@linuxfoundation.org>
(From OE-Core rev: cba53212f5debf897752453364b9756a05c197de)

Signed-off-by: Daniel Turull <daniel.turull@ericsson.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-07-07 07:42:58 -07:00
Richard Purdie
6f48df063e bitbake.conf: Add truncate to HOSTTOOLS
Some wic images need this command. Since it is part of coreutils, it doesn't really
cost anything to have in HOSTTOOLS and it avoids signifiant build dependencies on
coreutils-native.

[YOCTO #15571]

(From OE-Core rev: 85451cdaee4718233211da1e43db01f5cd2b1aff)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 522000ce5c4f0201cbe42d7826b6a8489ed10117)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-10-02 06:15:15 -07:00
Peter Marko
2081715ce8 bitbake.conf: remove comment about oldincludedir
oldincludedir was removed by 506c91cbc6a604a84e37e53ccff430436369802e

(From OE-Core rev: 0228ab43e9b659771f4f59944897aec6879f8209)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-04-12 17:36:52 +01:00
Robert Yang
fdef56a596 archiver.bbclass: Drop tarfile module to improve performance
* The tarfile module doesn't support xz options or environment varible
  XZ_DEFAULTS, this makes do_ar_patched incrediblely slow when the file is
  large, for example, chromium-x11 is about 3GB:
  - "bitbake chromium-x11 -car_patched" hasn't been done after 3 hours on my
     host, I checked the partial tar.xz file is only 1.5GB, so maybe more than 6
     hours is required to complete the task.

  - Now only less than 4 minutes is needed on the same host.

* Need add xz to HOSTTOOLS when archiver.bbclass is enabled and compression is xz.

(From OE-Core rev: 6548354f049b173e8d443bc547d35c9d9fc05259)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-12-23 08:46:01 +00:00
Ross Burton
64162b1812 nativesdk: don't unset MACHINE_FEATURES, let machine-sdk/ set it
There is actually a use for nativesdk MACHINE_FEATURES; for example
qemu-usermode being supported, as this is needed to build profile-guided
optimised code.

We shouldn't use the target MACHINE_FEATURES for this because the target
and the SDK can be entirely different, so instead set the
MACHINE_FEATURES in nativesdk.bbclass to SDK_MACHINE_FEATURES (which
defaults to "") and let the conf/machine-sdk/*.conf files set that as
appropriate.

(From OE-Core rev: 14571764b7e046507f81bbe589a9f42c5b16665a)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Link: https://lore.kernel.org/r/20231221170159.1995650-2-ross.burton@arm.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-12-23 08:46:00 +00:00
Joshua Watt
df548e981d ipk: Switch to using zstd compression
Converts IPK package generation to use zstd instead of xz. zstd has a
much larger compression/speed tradeoff range allowing users to choose
what suits them best, and fast decompression speeds. It also continues
to support parallel compression as xz did.

A new variable called ZSTD_DEFAULTS is provided to set the defaults for
places that want to use zstd for compression; the zst image conversion
command is also modified to use this.

Finally, in order for this to function properly, opkg must include zstd
support, so it is enabled all the time with no PACKAGECONFIG to turn it
off.

(From OE-Core rev: 1bc3e9bbaa670b6128c74c76b4b5264e60ce3463)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-12-23 08:46:00 +00:00
Joshua Watt
8dff718633 bitbake.conf: Add runtimedir
Adds the path to the runtime state directory (/run). In particular,
systemd units need to have the correct path to the runtime directory
because RequiresMountsFor doesn't follow symbolic links. This means that
if a unit calls out a directory in /var/run (a symbolic link to /run),
it may actually start before /run is mounted. The fix is to have the
unit specify a directory in /run instead.

(From OE-Core rev: 90bc18108230f6d41a50cebc8348444e119e95bf)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-12-20 07:47:00 +00:00
Charlie Johnston
fdbf779245 bitbake.conf: Add gsutil as hosttool for gcp fetcher.
The gcp fetcher uses gsutil to check if the file exists before
fetching. This change ensures the tool is included as a nonfatal
hosttool so that it's included in the build environment when
available.

(From OE-Core rev: d5e481bbd96210e608fa0aa5f7b54c1398c7d273)

Signed-off-by: Charlie Johnston <charlie.johnston@loftorbital.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-12-02 17:18:57 +00:00
Richard Purdie
69ed412751 bitbake.conf: Log events by default using BB_DEFAULT_EVENTLOG
By setting this, event data from during the build is saved out. This can
be used for analytic including toaster to allow builds to be examined
later. This will use some disk space but it is worth it for the ability
to look into what happened during the build. Users can set the value to
something else in local.conf to override if they wish.

(From OE-Core rev: 4719b68bb9e3cccb85aed55350e53a439360abcb)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-11-23 12:12:00 +00:00
Martin Jansa
0904c4c34a bitbake.conf: drop ${PE} and ${PR} from -f{file,macro,debug}-prefix-map
* ${EXTENDPE} and ${PR} was already dropped from ${WORKDIR} in:
  https://lists.openembedded.org/g/openembedded-core/message/185818
  adjust -fmacro-prefix-map and -fdebug-prefix-map similarly.
  As we don't depend on PR in WORKDIR maybe we don't need it in
  /usr/src/debug paths as well anymore.

* add TARGET_DBGSRC_DIR variable with "/usr/src/debug/${PN}/${PV}"
  because there is quite a few places where this location is being
  used in various recipes

* The interesting side-effect of this is that for DISTROs which still
  use PR (e.g. webOS OSE), the difference in -fdebug-prefix-map causes
  all binaries to be slightly different when rebuilt with different PR
  (due to this path, even when otherwise they are binary reproducible)
  and when the number of digits in PR changes (e.g. from r9 to r10) it
  also results in slightly bigger binaries (and more unnecessary changes
  in buildhistory diffs).

  For example this foo binary, the difference between "new" and "old" is
  extra patch applied in SRC_URI (which doesn't affect the foo binary,
  but was the reason for PR bump).

  And the binary is bigger with r10, identical with r6 and slightly
  different due to debug-prefix-map between r6 and r7:

  $ ls -la 1.0.0-175-*/image/usr/sbin/foo
  -rwxr-xr-x 1 bitbake bitbake 30182460 Nov  8 08:29 1.0.0-175-new-r10/image/usr/sbin/foo
  -rwxr-xr-x 1 bitbake bitbake 30182224 Nov  8 08:02 1.0.0-175-new-r6/image/usr/sbin/foo
  -rwxr-xr-x 1 bitbake bitbake 30182224 Nov  8 07:49 1.0.0-175-new-r7/image/usr/sbin/foo
  -rwxr-xr-x 1 bitbake bitbake 30182224 Nov  8 07:39 1.0.0-175-old-r6/image/usr/sbin/foo

  $ md5sum 1.0.0-175-*/image/usr/sbin/foo
  8e3ab67d596f8cc2f9c6320dab10af01  1.0.0-175-new-r10/image/usr/sbin/foo
  f6ff1e64fe6affb9ba0d8f278cf7ed79  1.0.0-175-new-r6/image/usr/sbin/foo
  6469a0b10aac233911e63c5ea97b03c0  1.0.0-175-new-r7/image/usr/sbin/foo
  f6ff1e64fe6affb9ba0d8f278cf7ed79  1.0.0-175-old-r6/image/usr/sbin/foo

(From OE-Core rev: c84c8ba295eeaa0e0b7592364b0978f17a44c70b)

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-11-20 15:30:52 +00:00
Richard Purdie
0769e8ef6b bitbake.conf: Drop oldincludedir
Autoconf defines this as:

"The directory for installing C header files for non-GCC compilers."

Whilst this is something autoconf does allow changing, I find it hard
to believe it has much use in the wild now and that headers don't get
split like this in reality, it would probably only be useful on really
old unixes.. The values are the same in our configuration anyway.

Drop the value and just use includedir everywhere.

(From OE-Core rev: 506c91cbc6a604a84e37e53ccff430436369802e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-11-20 15:30:52 +00:00
david d zuhn
2c448ec906 bitbake.conf: remove ${CCACHE} from FORTRAN compiler
ccache used to support FORTRAN (versions 3.3-3.6) but no longer does

(From OE-Core rev: 0cc2c0a9ec16fceeb19e01cd47af8c0743168030)

Signed-off-by: david d zuhn <david.zuhn@sonos.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-30 08:50:46 +00:00
BELHADJ SALEM Talel
62739c2e8f bitbake.conf: Drop DEPLOY_DIR_TAR
DEPLOY_DIR_TAR is never used since package_tar.bbclass is removed.

(From OE-Core rev: 7f3963834c60e407f4252084b1f8e004c10b7c25)

Signed-off-by: Talel BELHAJSALEM <bhstalel@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-19 13:26:05 +01:00
Julien Stephan
96f6271d0a bitbake.conf: include bblock.conf
include conf/bblock.conf. This file is generated by the bblock tool. It
locks some package tasks by fixing their signatures. See bblock -h for
more details

(From OE-Core rev: fb85282476f9dee2b0364c305ca75b096a76b1ae)

Signed-off-by: Julien Stephan <jstephan@baylibre.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-09 15:58:47 +01:00
Denys Dmytriyenko
593edfa2ae bitbake.conf: add MACHINE to SDK_NAME
Do the same here as Poky has done 5 years ago, adding MACHINE to
SDK_NAME:

https://git.yoctoproject.org/meta-yocto/commit/?id=3614dd4aee9d19f1024edb6a36b2862c2d726c04

This avoids file conflicts in deploy/sdk/ when building multiple
machines (either manually or via multiconfig), where sdk/toolchain
installers, manifests and now SPDX archives will overlap otherwise.

(From OE-Core rev: 5bbefd9602dd787866a80e4be6c1cb13d0ccdb0f)

Signed-off-by: Denys Dmytriyenko <denys@konsulko.com>
Signed-off-by: Denys Dmytriyenko <denis@denix.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-26 10:25:42 +01:00
Richard Purdie
374fd90865 lib: Import packagedata oe module by default
Variable dependencies for functions in the oe.packagedata module were
missing as it was not present in BBIMPORTS. Add it as the fact it was
missing is likely just historical oversight from base.bbclass history
and the dependencies are useful.

Add an exclusion to bitbake.conf to ensure BB_NUMBER_THREADS doesn't
change task checksums.

(From OE-Core rev: 7df9178766ee7939d139648e04f5747b0ffe1e13)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-26 10:25:42 +01:00
Richard Purdie
ad5464eb7e bitbake.conf: No longer support PR from filename
Nobody really sets PR from the recipe filename, we might as well drop
the overhead of the python function call and simplify the variable.

(From OE-Core rev: 5f2691a51a851e8337704aa00899eb27250f0f3f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-22 07:45:17 +01:00
Adrian Freihofer
40fdebda20 lib/oe/utils: Refactor to make multiprocess_launch callable without d
This is a preparation for making the strip_execs function callable from
devtool without going via tinfoil and a bitbake server process.

(From OE-Core rev: af8ee73cdef90b83556a7ac5e139a08108706486)

Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-12 12:44:47 +01:00
Richard Purdie
cf78511f8c bitbake.conf: Add IMAGE_BASENAME to SDK_NAME
When SPDX manifests are enabled for OE-Core, it hightlights that the SDK_NAME
default isn't working well. Add IMAGE_BASENAME to it to help avoid conflicts
between outut files.

I suspect the defaults aren't working well and most distros are already
overriding this.

(From OE-Core rev: fba8fc22898f8455bd39f9a5f21ff056f2c0cd91)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-12 07:45:52 +01:00
Alberto Planas
b6469ed7d6 bitbake.conf: add bunzip2 in HOSTTOOLS
rpm2cpio.sh can make calls to bunzip2 to uncompress the RPM payload that
conform the cpio file.

bzip2 is already part of HOSTTOOLS, as a link to the system installed
bzip2.

This patch add bunzip2 in HOSTOOLS list as a non-optional binary, so is
available to rpm2cpio.sh when it is required.

The currect rpm2cpio.sh has other calls to gunzip (present in HOSTOOLS),
xzcat (missing), unlzma (missing) and unzstd (present in HOSTTOOLS since
bff58d337890e804d33d7decbaa46065a4d3bba4)

Adding the missing ones will not add any new host dependency as xz-utils
is already listed as a requirement.

(From OE-Core rev: fd376a11ed8d1b79633c2572ec0b4341d3ca2f1c)

Signed-off-by: Alberto Planas <aplanas@suse.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-30 08:43:03 +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
Richard Purdie
62afa02d01 base/package: Move source revision information from PV to PKGV
Source control information being present in PV used to be a hard requirement
for bitbake to operate correctly. Now that hashes are a required part of task
stamps, this requirement no longer exists.

This means we can defer the hash pieces to PKGV and simplify PV.

Use new bitbake fetcher API to inject the source revisions directly into the hash
allowing removal of some horrible code from base.bbclass and avoiding any hardcoding
about how SRCREV may or may not be used.

Use that API to object the string to append to PKGV and append that directly.

The user visible effect of this change is that PV will no longer have revision
information in it and this will now be appended to PV through PKGV when the
packages are written. Since PV is used in STAMP and WORKDIR, users will see
small directory naming and stamp naming changes.

This will mean that sstate reuse through hash equivalence where the source
revision changes but the output does not will become possible as the sstate
naming will become less specific and no longer contain the revision.

The SRCPV variable will no longer be needed in PV and is effectively now just
a null operation. Usage can be removed over time.

(From OE-Core rev: a8e7b0f932b9ea69b3a218fca18041676c65aba0)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-24 16:50:24 +01:00
Richard Purdie
d7ce7d6799 bitbake.conf: Drop PE and PR from WORKDIR and STAMP
Once, we relied upon stamps changing to rebuild. PE and PR are packaging
variables and are reflected in the taskhashes when/where they're used so
they do not need to be in STAMP.

Similarly, once, multiple versions were something which was useful in
WORKDIR but this is really just noise causing long pathnames now.

Drop PR and PE from these variables to clean up the paths a bit.

This may break some tool assumptions about paths but those are probably
things we need to fix.

(From OE-Core rev: cc83e45484656a6b577ff84817131735023daad4)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-11 13:22:01 +01:00
Andrej Valek
be9883a92b cve-check: add option to add additional patched CVEs
- Replace CVE_CHECK_IGNORE with CVE_STATUS to be more flexible.
The CVE_STATUS should contain an information about status wich
is decoded in 3 items:
- generic status: "Ignored", "Patched" or "Unpatched"
- more detailed status enum
- description: free text describing reason for status

Examples of usage:
CVE_STATUS[CVE-1234-0001] = "not-applicable-platform: Issue only applies on Windows"
CVE_STATUS[CVE-1234-0002] = "fixed-version: Fixed externally"

CVE_CHECK_STATUSMAP[not-applicable-platform] = "Ignored"
CVE_CHECK_STATUSMAP[fixed-version] = "Patched"

(From OE-Core rev: 34f682a24b7075b12ec308154b937ad118d69fe5)

Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-07-19 23:25:01 +01:00
Piotr Łobacz
0c1de5c5c5 bitbake.conf: Add acl distro native features support
Include support for ACLs for native builds by default.

(From OE-Core rev: eeb3f8e893e351520f3b8e642027e0dd6ca7c08b)

Signed-off-by: Piotr Łobacz <p.lobacz@welotec.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-07-19 18:00:32 +01:00
Richard Purdie
42921e63a4 bitbake.conf: Add layer-<layername> override support
Add a new layer specific override based upon the FILE_LAYERNAME support now present
in bitbake. In particular this allows layer specific QA warnings and errors to
be made more easily.

(From OE-Core rev: 144db9241b141c3380a2b292414d04bfc39a2e20)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-06-20 23:24:26 +01:00
Alberto Planas
e964202dfc bitbake.conf: add unzstd in HOSTTOOLS
rpm2cpio.sh can make calls to unzstd to uncompress the RPM payload that
conform the cpio file.

zstd is already part of HOSTTOOLS, as a link to the system installed
zstd.

This patch add unzstd in HOSTOOLS list as a non-optional binary, so is
available to rpm2cpio.sh when it is required.

(From OE-Core rev: bff58d337890e804d33d7decbaa46065a4d3bba4)

Signed-off-by: Alberto Planas <aplanas@suse.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-06-19 13:18:56 +01:00
Denys Dmytriyenko
7c67fe1b4d bitbake.conf: Add SRCPV to BB_HASH_CODEPARSER_VALS
Also add SRCPV to the list of BB_HASH_CODEPARSER_VALS for code parser
cache handling. Otherwise an empty SRC_URI in the list triggers this
exception:

bb.data_smart.ExpansionError: Failure expanding variable SRCPV, expression was ${@bb.fetch2.get_srcrev(d)} which triggered exception
 FetchError: Fetcher failure: SRCREV was used yet no valid SCM was found in SRC_URI
The variable dependency chain for the failure is: SRCPV -> UBOOT_LOCALVERSION -> do_compile

(From OE-Core rev: d17f9da69f430337ee1ef9c09b731c27393eba83)

Signed-off-by: Denys Dmytriyenko <denis@denix.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-06-01 08:05:11 +01:00
Khem Raj
ac176badb2 bitbake.conf: Add -fcanon-prefix-map to DEBUG_PREFIX_MAP
This should help canonicalize the relative paths and symlinks
during cross compile, -fcanon-prefix-map is newly added in gcc-13+ [1]

[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108464#c8
(From OE-Core rev: ba778e43576aaab212751ccc13270fd4c504ba1f)

(From OE-Core rev: abe97fa74b10c2c71d79bc3573d4edb509b111f5)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-05-26 07:54:17 +01:00
Richard Purdie
2b02561776 bitbake.conf: Empty SRC_URI for code parser cache handling
(From OE-Core rev: 93a09a05d6dde3542587735df0aa2371e79a3bb7)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-05-25 12:36:00 +01:00
Lorenzo Arena
c0e4aa38b2 conf: add nice level to the hash config ignred variables
This is needed as each user could be setting different nice levels
while building, however this should not make the shared cache unusable.

(From OE-Core rev: 42784f9360345da1c01d988070253e7ffd5ac4ac)

Signed-off-by: Lorenzo Arena <arena.lor@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-05-22 10:53:49 +01:00
Alexander Kanavin
04514378e0 bitbake.conf: set minimum required target kernel to 5.15
In particular this enables a number of useful features in glibc
(which utilize newer kernel APIs), such as actually using 64 bit
time_t versions of kernel syscalls:

https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/kernel-features.h;h=07b440f4eea364b05fa49bf71ceebf78f80efe13;hb=HEAD#l164

In general, OLDEST_KERNEL setting is used in these two places:

- kernel.bbclass compares it with the target kernel version being built.
If a vendor BSP still offers an older kernel, OLDEST_KERNEL should be set to match.

- glibc recipe passes it as a parameter to the build so that additional features
and optimized paths that kernels older than OLDEST_KERNEL are enabled.

Note that there is a related setting, SDK_OLDEST_KERNEL, which remains as
it was (at 3.2.0) to ensure maximum compatibility with kernels on SDK host
machines; that setting is used to build nativesdk-glibc and verify the kernel
version when the SDK is being installed.

Build host kernel versions are not checked directly; compatible distros
are listed instead.

(From OE-Core rev: feb8e3fb71131a414a2a9271832b4e16860301ea)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-05-05 11:07:26 +01:00
Trevor Woerner
d5d40479d7 VOLATILE_TMP_DIR: add
Provide a mechanism to allow users to choose whether the /tmp directory
is on persistent storage (non-volatile) or a RAM-based tmpfs (volatile).
The default is volatile.

Works for both sysvinit-based and systemd-based systems.

(From OE-Core rev: 8b76c0637eaeaf5bd5e696680cd74b7a642f4157)

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-02-28 07:53:54 +00:00
Pavel Zhukov
daddc695fc bitbake.conf: Add mercurial to HOSTTOOLS_NONFATAL
(From OE-Core rev: 8cf72a195961081d83ec049021c3a9bdf920fa57)

Signed-off-by: Pavel Zhukov <pavel@zhukoff.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-02-08 10:29:01 +00:00
Richard Purdie
8c5faadf6c bitbake.conf: Inject a dash into PN for BB_HASH_CODEPARSER_VALS
We've had a couple of reports of recipes expecting to be able to call
split("-") on PN. There isn't any real harm in adding a dash to the dummy
PN value to avoid these errors.

(From OE-Core rev: 10e140d98790ce28b440b8e8697a4311658fe4df)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-01-29 19:24:22 +00:00
Richard Purdie
fb10e3b83b bitbake.conf: Add METADATA_REVISION to BB_HASH_CODEPARSER_VALS
This stops the codeparser cache changing ever time a new commit is
added to the main repository.

(From OE-Core rev: f77b9f983395c648fddc96f0d6c8ebd6d52056d4)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-01-26 21:06:57 +00:00
Richard Purdie
3be00ad905 bitbake.conf: Add BB_HASH_CODEPARSER_VALS
Add an initial value for the new bitbake BB_HASH_CODEPARSER_VALS support,
which optimises the codeparser cache's size and stops it growing at every
parse.

(From OE-Core rev: 7c15e03dd30abe43d784f41e3c04c96a7bbb0d62)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-01-24 22:06:51 +00:00
Richard Purdie
b3573d38ef package: Move emit_pkgdata to packagedata.py
Move one of the PACKAGEFUNCS from the package bbclass to packagedata
library code for parsing efficiency.

(From OE-Core rev: ceba33bf2897f7dd5b1ffe6b742c47bf616243c8)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-01-05 11:52:50 +00:00
Richard Purdie
d7a10cf6f9 bitbake.conf: Add module function vardepsexclude entries
Now that bitbake can look into python module code variable and function
dependencies, there are a few extra basic variables we need to exclude.
This is done per function since it keeps the main exclusion list cleaner
and is also slightly faster.

(From OE-Core rev: 870c324d47f1d920fcb736e09fc6e857f24945c7)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-12-17 08:52:28 +00:00
Michael Opdenacker
f2c0153603 bitbake.conf: remove SERIAL_CONSOLE variable
This variable has been deprecated since version 2.6
Use SERIAL_CONSOLES instead.

(From OE-Core rev: 9d053af1fb570b4e3483de4ecd6827e1e0be61b7)

Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-12-09 13:18:41 +00:00
Richard Purdie
4543d20213 bitbake.conf: Simplify CACHE setting
A long time ago the bitbake cache didn't use hashes in it's filename and
hence values such as MACHINE were needed in the path to the cache file
so that when switching MACHINE, a new cache wasn't always parsed.

Times have moved on, we have a hash which represents the configuration
and the caches are reused if there is an existing hash that matches.

This means the values added to CACHE are obsolete and not needed,
we can drop them.

(From OE-Core rev: 550ed0a4ce8839946781f18fdce18452de34ddaf)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-11-29 10:29:58 +00:00
Richard Purdie
5a2b075fa9 bitbake.conf: Drop export of SOURCE_DATE_EPOCH_FALLBACK
Whilst SDE definitely needs to be exported, the fallback does not as
it is only used in our python code via the datastore.

It was introduced as an export in 9a1dde74e794362399193dc3f81c9685a83d0776
but even then it doesn't look like it needed to be, likely just a copy and
paste mistake.

Drop the export.

(From OE-Core rev: 74fb6539dd06acb0dd6a9af4809152975e8473e6)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-11-07 14:32:42 +00:00
Khem Raj
ab920a779e bitbake.conf: Define TC_CXX_RUNTIME
This variable is used to denote the C/C++ compiler runtime to use.
Right now there are few alternatives out of the core which could
use this variable to define this property, the values it can take
are 'gnu' for gcc runtime. 'llvm' for using compiler-rt+libc++ and
'android' to use android runtime. Default settings is to use gnu
which is current silent default also.

(From OE-Core rev: a32f4309aec277cac01c1fd8c78e28d0fd63b064)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-09-12 08:33:56 +01:00
Rasmus Villemoes
52ef5711dc bitbake.conf: set BB_DEFAULT_UMASK using ??=
Currently, there's no way for the user's site.conf, local.conf or
similar to set BB_DEFAULT_UMASK, because those files are included by
bitbake.conf prior to the unconditional assignment of
BB_DEFAULT_UMASK. To make that possible, use a weak default assignment
instead. This is also consistent with most other variable assignments
in the lower half of bitbake.conf.

I believe the risk of a regression is very small; it would require
something like somebody having a definition of BB_DEFAULT_UMASK in a
local configuration file, and having been relying on that _not_ taking
effect.

(From OE-Core rev: e3dbded499f0bd1e71abb0650ae98fd9ade94250)

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-30 10:33:35 +01:00
Richard Purdie
12bdb5df1e bitbake.conf: Handle S and B separately for debug mapping
We don't really need to keep S and B separate for debug source purposes
and there shouldn't be source references in WORKDIR that isn't S and B
either.

Separating these out simplifies the shared-work directory handling for
gcc and should also help fix external source usage. Therefore handle
S and B in DEBUG_PREFIX_MAP separately and clean up other code.

Indentation is reduced here as it is introduced on every compiler
commandline so minimising it is helpful.

(From OE-Core rev: c39b5020b8705d17e3745c41e38d0f99a1ac94cf)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-17 19:57:32 +01:00
Richard Purdie
5c45b73c8f rust: Switch to use RUST_XXX_SYS consistently
The code was using a mixture of XXX_SYS and RUST_XXX_SYS. Use
RUST_XXX_SYS consistently and add the variables to the global exclsion
on signatures as they're reflected in the directory triplets and trying
to filter them out the hashes separately is too painful.

(From OE-Core rev: ee0c0fdf9c1eba9eece6ed1293fda25bf18964b3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-08 15:44:20 +01:00
Richard Purdie
ddbd90a37c bitbake.conf: Change -dev RDEPENDS to RRECOMMENDS
Switch the default DEPENDS for ${PN}-dev to be a RRECOMMENDS instead. This
takes advantage of a change to complmentary package globbing to not follow
RRECOMMENDS and means and SDK for an image with both openssh and dropbear
compoments will now build successfully.

(From OE-Core rev: 6f28420ab0e8f2ab5eb06326024777a40aded0a6)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-06-28 23:49:38 +01:00
Richard Purdie
73cf55cdde bitbake.conf/recipes: Introduce add DEV_PKG_DEPENDENCY to change RDEPENDS:${PN}-dev
There is a pattern that several recipes need to break the dependency of ${PN}-dev
on ${PN}, most often as ${PN} may be be empty. Add a new variable to parameterise
this and allow it to be changed more easily.

(From OE-Core rev: a5b381c0f45c590a762647a9956a8f41e2e2315e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-06-28 23:49:37 +01:00
Pavel Zhukov
bd5abcc908 bitbake.conf: Make TCLIBC and TCMODE lazy assigned
This allows two level of overriding (distro level and local.conf/shell
variable). Previous settings blocked shell variables overring
if it was overriden on distro level.

(From OE-Core rev: de6c3f9cb2c589aecbf8d9d25fa83cd18bf80891)

Signed-off-by: Pavel Zhukov <pavel.zhukov@huawei.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-06-07 11:56:13 +01:00