There's no need to pass the path to the build folder, use the path to
the installation instead.
From kodi's FindFFMPEG.cmake:
WARNING: this option is for developers as it will _disable ffmpeg version
checks_! Consider using FFMPEG_PATH instead, which _does_ check library
versions
Before:
-- Found FFMPEG: <snip>/toolchain/armv8a-libreelec-linux-gnueabihf/sysroot/usr (found version "undef")
After:
-- Found FFMPEG: <snip>/toolchain/armv8a-libreelec-linux-gnueabihf/sysroot/usr/include (found version "4.0")
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
Install the files required by $SCRIPTS/image to a hidden directory. That
way, the files won't get copied to the system filesystem, but the script
can access them without requiring access to the build directory,
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.
$PKG_BUILD, a build time variable, is accessed in post_install(), which is an
install time function. Move it, so the regdb files are copied in a build time
function instead.
Now with the dependencies in initramfs:init, we can include it in the
build plan to parallalize it. But just build them there, the kernel package
keeps installing them.
The build target calls the install script, and this short circuits the
image/install/stamp logic. Wipe the initramfs/:init install stamps along
$BUILD/initramfs to ensure everything gets installed when creating the
ramdisk for the kernel.
- follow symlinks (as used by RPi/Slice)
- don't include hidden files like vi swap files (lol)
- remove duplicates (like $LINUX_DEPENDS for linux itself)
- sort by filename, not by hash
- don't use one sha256sum process per file, use xargs to pass all files to
one process.