commit c468820ba9 "scripts/build: cleanup"
started to silently remove *.o files from the installation without
giving an explanation why this should be needed.
Drop that as it prevents packages from including *.o files in the
image, which eg is needed to include IR BPF decoders in LibreELEC.
Packages which install *.o files that should not end up in the image
should manually remove these in post_makeinstall_target.
Signed-off-by: Matthias Reichl <hias@horus.com>
cp (and potentially mkdir -p) are not atomic, and we have seen situations where two packages
concurrently copying the same file (eg. the udev rule for xf86-video-nvidia and
xf86-video-nvidia-legacy) will succeed for one package but the other package fails with
a "file exists" error (as the file didn't exist when it checked, but does exist when it
actually copies the file). Not even cp -f will avoid this issue.
There are several workarounds, but the most practical (and general) solution is to ensure
sequential updates of the image and shared sysroot directories.
Instead of cluttering $BUILD we now have
- $BUILD/build sources and builds of packages
- $BUILD/install_pkg installed packages
- $BUILD/install_init installed packages for initramfs
Some addon dependencies do this locally on their own. With this, these
packages can now use the standard makeinstall() functions and access build
artifacts using get_install_dir() without polluting the sysroot folder.
With the upcoming usage of the standard install_pkg folder for addon
dependencies, the devel files need to be accessible, e.g. ffmpegx for
tvheadend.
So don't wipe them from the package install folder, just skip copying
them to the image.
- meson needs a host environment for cross-compile
- allow setup_toolchain to setup toolchain based on used build-system
- adjust creation of meson.conf
Some packages install outside /usr/*bin, e.g. /usr/lib/bluetooth
and executables remain unstripped. Try to strip everything
executable except .ko and .so which are handled in separate cases.
Add copyright
Convert to config/functions/die()
Make use of bash default value mechanic
Combine some if tests
Get PKG_BUILD quoted
Replace `` with $()
Signed-off-by: Ian Leonard <antonlacon@gmail.com>
- replace strip_lto/strip_gold (only allowed to disable)
- add flag for PIC feature
- add flag to stop build parallel
- add support for hardening option (initial copy from debian 9)
All build parameters, are added in setup_toolchain.
`PKG_[FLAG]_[HOST/TARGET]_ENABLED` variable is introduced for checking the flag (yes/no) in the package.mk
Thanks to @MilhouseVH, for support and fixing