Commit graph

371 commits

Author SHA1 Message Date
MilhouseVH
653298b18a buildsystem: allow onexit trap to be selectively ignored 2020-02-19 10:24:15 +00:00
MilhouseVH
a1e700fd87 buildsystem: log pkg_call that failed 2020-02-19 07:49:35 +00:00
MilhouseVH
70b69ebffa
Merge pull request #4191 from HiassofT/le10-fix-obj-remove
allow packages to install *.o files into the image
2020-02-13 17:26:09 +00:00
MilhouseVH
a11e063083 build: auto remove build dirs 2020-02-10 08:53:39 +01:00
Andre Heider
a6991f0aba pkg-config: add support for multiple sysroots 2020-02-10 08:53:39 +01:00
Andre Heider
a98010df72 build: automatically add dependencies for kernel packages
And add the missing "linux" to PKG_DEPENDS_UNPACK while at it, the tree
is required for building kernel modules.
2020-02-10 08:53:39 +01:00
Matthias Reichl
e96a892a10 config/functions: fix safe_remove of multiple files
Several packages call safe_remove with a wildcard to remove
multiple files but safe_remove only deleted the first one.

Fix this by iterating over all arguments passed into safe_remove
so unwanted files don't end up in the image.

Signed-off-by: Matthias Reichl <hias@horus.com>
2020-02-09 12:00:24 +01:00
MilhouseVH
5e44eafa55 config/functions: drop unecessary / escaping 2020-02-02 21:11:54 +00:00
Matthias Reichl
2cb65bbaa2
Merge pull request #4094 from dhewg/pull/load
build: add load average limit to reduce CPU overcommitment
2020-01-21 00:14:18 +01:00
Matthias Reichl
80f1b14da0
Merge pull request #4092 from MilhouseVH/le10_generator
buildsystem: switch to dynamic scheduler
2020-01-21 00:13:51 +01:00
Andre Heider
2d12b7ebe8 build: add load average limit to reduce CPU overcommitment
For make and ninja based build systems, no new jobs are started if the load
average is greater than number_of_cores * 1.5.
2020-01-17 09:16:37 +01:00
MilhouseVH
fe1dd1e8ac buildsystem: use an update lock when updating image and sysroot
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.
2020-01-15 18:49:15 +00:00
MilhouseVH
f173e38e54 buildsystem: dynamic schedule requires fewer locks; pkgbuilder.py now handles failed jobs 2020-01-15 18:49:15 +00:00
MilhouseVH
96c510394d buildsystem: add is_sequential_build() helper 2020-01-15 18:49:14 +00:00
MilhouseVH
439f38bcff config/functions: store config info in history 2020-01-15 18:49:14 +00:00
MilhouseVH
00faa81294 scripts/pkgbuilder.py: replace parallel with something smarter 2020-01-15 18:49:11 +00:00
MilhouseVH
da94ecfb2f config/functions: major/minor version helper 2020-01-13 21:18:40 +00:00
Andre Heider
8e4663912a build: move install dirs out of the build dir
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
2019-12-31 11:26:49 +01:00
Andre Heider
ae663c98e9 build: fix calculate_stamp() for multiple corner cases
- 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.
2019-12-31 11:26:49 +01:00
Andre Heider
b56c0f0619 build: add missing build stamp input data
Always include project specific package files
(e.g. projects/Amlogic/packages/systemd).
2019-12-31 11:26:49 +01:00
Andre Heider
3c8862a701 build: add and use get_install_dir()
Don't hardcode get_build_dir()/.install_pkg in multiple places.
2019-12-31 11:26:49 +01:00
Andre Heider
267d57d7f3 build: add and use PKG_INSTALL
Set it depending on the target, so there's no need to hardcode
$PKG_BUILD/.install_[pkg|init] in multiple places.
2019-12-31 11:26:49 +01:00
Andre Heider
882ecdecc9 llvm: fix cross compilation issues
llvm-config is a compiled host binary used to get infos about the
target installation (sic). It currently lives in the target sysroot,
which may not be usable because now we're mixing build host and
target libraries:

toolchain/x86_64-libreelec-linux-gnu/sysroot/usr/bin/llvm-config-host:
  relocation error: /lib/x86_64-linux-gnu/libpthread.so.0: symbol
                    __libc_vfork version GLIBC_PRIVATE not defined in file
                    libc.so.6 with link time reference

Move it to $TOOLCHAIN/bin where host binaries belong. But llvm-config
doesn't support spitting out a library path from a different prefix than
its own (which explains the placement in sysroot). Patch that in to
prevail sanity.

Then disable the z3 solver so the target doesn't use build host libraries.
But that's broken too, use debian's patch to fix it up (with the
addition to default to "OFF" instead on "ON").

Finally, disable new options and use the build type "MinSizeRel" for the
host as well, courtesy if @MilhouseVH.
2019-12-16 17:54:26 +01:00
Sascha Kühndel
ebaff1375f
Merge pull request #4054 from MilhouseVH/le10_fix_flag_enabled_var
flag_enabled(): declare is local by default - remove it
2019-12-13 13:50:28 +01:00
MilhouseVH
8a7a9f3efe flag_enabled(): declare is local by default - remove it 2019-12-12 03:16:31 +00:00
MilhouseVH
6105f67998 post_install_addon: new package function 2019-11-17 20:50:31 +00:00
Jernej Škrabec
b4663fc070
Merge pull request #3965 from MilhouseVH/le10_python3_le_scripts
buildsystem: use /usr/bin/python3 in scripts
2019-11-15 08:06:47 +01:00
MilhouseVH
6eb226b1fb buildsystem: use /usr/bin/python3 in scripts 2019-11-07 10:33:47 +00:00
MilhouseVH
f03406f33b buildsystem: fix BUILD_WITH_DEBUG usage in config/optimize (v2) 2019-11-04 16:42:14 +00:00
MilhouseVH
0dea1a8b17 buildsystem: optimize for size when building with debug 2019-11-04 16:34:55 +00:00
MilhouseVH
a41d4f1e6b buildsystem: fix Python native modules that are using build host ABI (PEP3149) 2019-10-29 12:19:07 +00:00
MilhouseVH
fcfee6ff42 config/functions: add Python bytecode/source code helper functions 2019-10-29 12:19:07 +00:00
MilhouseVH
4ce4965f5a config: use Python3 package to set PKG_PYTHON_VERSION 2019-10-29 12:19:07 +00:00
MilhouseVH
a28a9c9980 tools/checkunpack: mass unpack tester 2019-10-25 02:25:11 +01:00
MilhouseVH
e9562ab488 config/functions: ensure enable_service tells us why it failed 2019-10-22 19:25:51 +01:00
5schatten
9df3cbaded setup_toolchain: add OpenGL_GL_PREFERENCE to target config 2019-09-27 14:36:17 +02:00
Sascha Kuehndel (InuSasha)
266f0932c8
buildsystem: swap setup_toolchain parameter 2019-09-19 11:14:43 +02:00
Sascha Kuehndel (InuSasha)
73eef7432f
buildsystem: convert to support mesonbuild >= 0.51.0
- meson needs a host environment for cross-compile
- allow setup_toolchain to setup toolchain based on used build-system
- adjust creation of meson.conf
2019-09-19 11:14:43 +02:00
CvH
6d67cfcbb9
Merge pull request #3745 from MilhouseVH/le10_buildsystem_fixup2
buildsystem: minor fixups
2019-08-17 10:18:15 +02:00
MilhouseVH
acd4e82417 meson cross-file: add libgcrypt-config support (needed by mpd)
https://github.com/MusicPlayerDaemon/MPD/pull/495
2019-08-14 14:25:03 +01:00
MilhouseVH
796a70f4dd config/functions: fix formatting with THREADCOUNT=0 2019-08-10 22:33:08 +01:00
MilhouseVH
a179bb511d config/functions: invert concurrency logic, more logical 2019-08-08 21:53:27 +01:00
Tomas Kelemen (vudiq)
48917868a7 safe_remove: remove also broken symbolic links
if the target ($1) is a symbolic link to a removed file/folder, the
check will fail and the (broken) symbolic link will be not removed.
2019-07-24 15:16:56 +01:00
MilhouseVH
46c5483f7d buildsystem: include BUILD_SUFFIX in dashboard 2019-07-10 05:23:39 +01:00
MilhouseVH
bdc8c3a6bb buildsystem: no need to source package for PKG_NAME 2019-07-09 10:37:21 +01:00
MilhouseVH
2bae815050 buildsystem: fix and relocate comment 2019-07-09 04:40:04 +01:00
MilhouseVH
3406ce9b7a buildsystem: support 6 digit process ids 2019-07-09 00:05:25 +01:00
MilhouseVH
9f7fb5f7e7 buildsystem: die if a kernel config is not available 2019-06-15 06:15:17 +01:00
MilhouseVH
7ee271342a
Merge pull request #3524 from antonlacon/speed-flag
buildsystem: add "speed" flag for package building
2019-06-12 14:56:59 +01:00
MilhouseVH
fec79b5c13 config/functions: ln -sf is not always thread safe 2019-06-09 21:23:19 +01:00