Go to file
Yann E. MORIN b06294e989 core/pkg-generic: fixup all PPD paths in a generic fashion
Some files contain hard-coded absolute paths that point to the host
and/or staging directories.

With per-package directories (aka. PPD), these paths point to the PPD
of the package that created the files, when we want them to point to the
PPD of the package that uses them.

Up until now, we had two hooks that attempted to fix those files:

  - a libtool-specific hook that searches for all .la files and seds
    them with the proper PPD,

  - a python-specific hook that tweaks just the sysconfigdata and
    removes the byte-compiled version of the sysconfigdata.

But now, we also have a few other kinds of files for which we need to
fix the PPD: .cmake, .pc, or .pri files, and probably a bunch of others
as well.

We solve this issue by just replacing any PPD in text files, with the
current package's PPD.

This is very similar to, and inspired from what is done when relocating
the SDK. However, we can't use the existing relocate-sdk script, because
that needs to know the original location, which we do not have when we
aggregate the PPD (we could store it, but we can easily do without it).

Furthermore, we use a construct that is way more efficient than
relocate-sdk. First, we skip binary files with grep, which means we have
way less files to check with 'file' [0]. Second, we use xargs to sed
multiple files at once: printf is a shell built-in, so it's fast, and so
we do not have to spawn a sed for each file to fixup.

[0] We still keep using 'file' as a safety net, to avoid mangling a
binary file that grep would have missed.

Finally, the existing python-specific macro is simplified to just remove
the pre-compiled sysconfigdata files. And we rename it accordingly.

And as for some timings, to see the impact, with the defconfig below,
and with the downloads already local, and with a PC mostly idle (mail
and IRC activity only):

                    Before      Now         Delta
  - without PPD :   7min 27s    7min 23s    -0.9%
  - with PPD    :   7min 51s    7min 59s    +1.7%
  - with PPD -j8:   5min 51s    5min 56s    +1.4%

So we can see a slight increase in time, but it is mostly in the noise
(some builds without this change did exceed some builds with this
change, due to background noise). Also, depending on scheduling, there
can be less parallelism; for example, python3 does not build in
parallel, and with this special defconfig, python is on the critical
path of a lot of packages that are python modules, which can negatively
impact a parallel build too. A more realistic, bigger defconfig would
probably be more parallel... YMMV...

Delta without PPD is also due to background noise, as those hooks are
not used when PPD is not enabled.

Defconfig used:
    BR2_arm=y
    BR2_cortex_a7=y
    BR2_TOOLCHAIN_EXTERNAL=y
    BR2_PACKAGE_PYTHON3=y
    BR2_PACKAGE_PYTHON_AIOBLESCAN=y
    BR2_PACKAGE_PYTHON_AIOCOAP=y
    BR2_PACKAGE_PYTHON_AIOFILES=y
    BR2_PACKAGE_PYTHON_AIOHTTP_CORS=y
    BR2_PACKAGE_PYTHON_AIOHTTP_DEBUGTOOLBAR=y
    BR2_PACKAGE_PYTHON_AIOHTTP_MAKO=y
    BR2_PACKAGE_PYTHON_AIOHTTP_REMOTES=y
    BR2_PACKAGE_PYTHON_AIOHTTP_SECURITY=y
    BR2_PACKAGE_PYTHON_AIOHTTP_SESSION=y
    BR2_PACKAGE_PYTHON_AIOHTTP_SSE=y
    BR2_PACKAGE_PYTHON_AIOJOBS=y
    BR2_PACKAGE_PYTHON_AIOLOGSTASH=y
    BR2_PACKAGE_PYTHON_AIOMONITOR=y
    BR2_PACKAGE_PYTHON_AIOPROCESSING=y
    BR2_PACKAGE_PYTHON_AIOREDIS=y
    BR2_PACKAGE_PYTHON_AIORWLOCK=y
    BR2_PACKAGE_PYTHON_AIOZIPKIN=y
    BR2_PACKAGE_LIGHTTPD=y
    BR2_PACKAGE_LIGHTTPD_OPENSSL=y
    BR2_PACKAGE_LIGHTTPD_ZLIB=y
    BR2_PACKAGE_LIGHTTPD_BZIP2=y
    BR2_PACKAGE_LIGHTTPD_PCRE=y
    BR2_PACKAGE_LIGHTTPD_WEBDAV=y
    # BR2_TARGET_ROOTFS_TAR is not set

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Cc: Adam Duskett <aduskett@gmail.com>
Cc: Louis-Paul CORDIER <lpdev@cordier.org>
Cc: Andreas Naumann <anaumann@ultratronik.de>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2022-01-25 21:37:48 +01:00
arch arch/Config.in.x86: indicate how the CPU variants are ordered 2022-01-25 08:41:33 +01:00
board configs/qemu_aarch64_virt_defconfig: linux.config: enable fb/input support 2022-01-22 20:08:41 +01:00
boot boot/uboot: bump to version 2022.01 2022-01-11 22:01:58 +01:00
configs configs/qemu_aarch64_virt_defconfig: bump Linux kernel to 5.15.16 2022-01-22 20:08:43 +01:00
docs support/download: drop support for the 'none' hash 2022-01-11 21:58:01 +01:00
fs fs: clean the volatile /run and /tmp directories 2022-01-09 10:04:34 +01:00
linux linux: add BR2_LINUX_KERNEL_NEEDS_HOST_PAHOLE 2022-01-13 22:23:27 +01:00
package core/pkg-generic: fixup all PPD paths in a generic fashion 2022-01-25 21:37:48 +01:00
support support/scripts/gen-bootlin-toolchains: add missing BR2_X86_CPU_HAS_AVX512 condition for x86-64-v4 2022-01-25 08:41:19 +01:00
system system/skeleton: provide run/lock directory 2022-01-12 20:38:09 +01:00
toolchain toolchain/toolchain-external/toolchain-external-bootlin: regenerate with AVX512 condition for x86-64-v4 toolchain 2022-01-25 08:41:22 +01:00
utils support/download: drop support for the 'none' hash 2022-01-11 21:58:01 +01:00
.clang-format .clang-format: initial import from Linux 5.15.6 2022-01-01 15:01:13 +01:00
.defconfig arch: remove support for sh64 2016-09-08 22:15:15 +02:00
.flake8 Revert ".flake8: fix check for 80/132 columns" 2021-01-02 17:38:20 +01:00
.gitignore
.gitlab-ci.yml .gitlab-ci.yml: update docker to 20220105.2314 2022-01-06 09:34:05 +01:00
CHANGES Update for 2021.02.8 2021-12-14 23:22:57 +01:00
Config.in support/download: Add SFTP support 2022-01-06 09:34:05 +01:00
Config.in.legacy package/brcmfmac_sdio-firmware-rpi: merge of rpi-{bt,wifi}-firmware 2022-01-19 22:24:11 +01:00
COPYING
DEVELOPERS package/brcmfmac_sdio-firmware-rpi: merge of rpi-{bt,wifi}-firmware 2022-01-19 22:24:11 +01:00
Makefile utils/check-package: add a check for the new spacing convention 2022-01-09 23:01:53 +01:00
Makefile.legacy Remove BR2_DEPRECATED 2016-10-15 23:14:45 +02:00
README docs: move the IRC channel away from Freenode 2021-05-29 22:16:23 +02:00

Buildroot is a simple, efficient and easy-to-use tool to generate embedded
Linux systems through cross-compilation.

The documentation can be found in docs/manual. You can generate a text
document with 'make manual-text' and read output/docs/manual/manual.text.
Online documentation can be found at http://buildroot.org/docs.html

To build and use the buildroot stuff, do the following:

1) run 'make menuconfig'
2) select the target architecture and the packages you wish to compile
3) run 'make'
4) wait while it compiles
5) find the kernel, bootloader, root filesystem, etc. in output/images

You do not need to be root to build or run buildroot.  Have fun!

Buildroot comes with a basic configuration for a number of boards. Run
'make list-defconfigs' to view the list of provided configurations.

Please feed suggestions, bug reports, insults, and bribes back to the
buildroot mailing list: buildroot@buildroot.org
You can also find us on #buildroot on OFTC IRC.

If you would like to contribute patches, please read
https://buildroot.org/manual.html#submitting-patches