aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* gen_initramfs.sh: unpack compressed modules/firmwares to reduce image sizeDmitriy Baranov6 days1-0/+34
| | | | | Signed-off-by: Dmitriy Baranov <reagentoo@gmail.com> Signed-off-by: Ben Kohler <bkohler@gentoo.org>
* gen_funcs.sh: use stat(1) to check free disk spaceVladimir Vrzić2023-07-281-12/+14
| | | | | | | | | By using stat(1) to get free disk space we avoid tricky parsing of df(1) output. Signed-off-by: Vladimir Vrzić <vvrzic@gmail.com> Closes: https://github.com/gentoo/genkernel/pull/22 Signed-off-by: Sam James <sam@gentoo.org>
* Replace use of `which`Sam James2023-07-271-2/+2
| | | | | | | We're trying to phase it out as it's non-portable. Use bash's `type -P` where available (preferable as it avoids user functions) or `command -v` if POSIX. Signed-off-by: Sam James <sam@gentoo.org>
* gkbuild: Install the correct binaries with slibtoolRobin H. Johnson2022-05-151-0/+23
|\ | | | | | | | | Closes: https://github.com/gentoo/genkernel/pull/33 Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
| * gen_funcs: Add an install_exe functionorbea2022-05-151-0/+23
| | | | | | | | | | | | | | This helps when the build uses slibtool where the compiled binary output path differs from GNU libtool. Signed-off-by: orbea <orbea@riseup.net>
* | gen_initramfs.sh: append devicemanager only for specific modulesMike Gilbert2022-05-151-0/+9
|/ | | | | | | | | | dmraid luks lvm multipath Bug: https://bugs.gentoo.org/749957 Signed-off-by: Mike Gilbert <floppym@gentoo.org>
* gen_determineargs.sh: determine_real_args(): Make kmod only required for ↵Thomas Deutschmann2021-11-151-1/+1
| | | | | | | | non-static kernels Fixes: 153a877d ("Refactor (compressed) kernel module handling") Bug: https://bugs.gentoo.org/821484 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Refactor (compressed) kernel module handlingThomas Deutschmann2021-09-091-0/+72
| | | | | | | | | | | | | | | | | | | | | | To support a specific module compression algorithm, two things are needed: Used depmod utility on host system building the kernel must support chosen module compression algorithm to generate proper modules.dep file or genkernel would be unable to read module dependencies when copying modules to initramfs. At runtime, used modprobe utility must be able to handle chosen module compression algorithm or modules would be unloadable. To address the first requirement, genkernel will now check if used kmod utility on host system supports chosen module compression algorithm. To address the runtime requirement, this commit will switch from BusyBox's modutils implementation to kmod because BusyBox does not support ZSTD compression (yet). Bug: https://bugs.gentoo.org/809344 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_funcs.sh: get_tar_cmd(): Use 'xz -T<makejobs>' instead of pxzThomas Deutschmann2021-07-061-1/+1
| | | | | | No need to depend on pxz for multithreaded compression anymore. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_funcs.sh: expand_file(): Outsource embedded Python callThomas Deutschmann2021-07-061-1/+1
| | | | | | | This will allow us to set proper shebang for dev-lang/python-exec[-native-symlinks] support. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_funcs.sh: check_disk_space_requirements(): use global LC_ALLThomas Deutschmann2021-02-081-2/+2
| | | | | | Since commit 0785165ca64 we set LC_ALL in global scope. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_funcs.sh: check_disk_space_requirements(): Force LC_ALL=CThomas Deutschmann2020-08-301-2/+2
| | | | | | | This should make parsing df output more stable in case non-English locales are used. Closes: https://github.com/gentoo/genkernel/pull/21 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_funcs.sh: _tc-getPROG(): Prevent override with empty valueThomas Deutschmann2020-08-281-0/+1
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_funcs.sh: kconfig_set_opt(): Change separator to allow setting of pathsThomas Deutschmann2020-08-181-1/+1
| | | | | Bug: https://bugs.gentoo.org/737598 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Unify grep usageThomas Deutschmann2020-08-011-2/+2
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Unify 'confgrep' handling via new get_grep_cmd_for_file() functionThomas Deutschmann2020-08-011-0/+21
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Switch from MDEV to UDEVThomas Deutschmann2020-07-241-0/+18
| | | | | | | | | We need to switch from using MDEV to UDEV to avoid boot problems due to timeouts caused by some UDEV rules from real system when real system is using systemd. Bug: https://bugs.gentoo.org/706434 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_funcs.sh: tc-getAS(): Fix typoThomas Deutschmann2020-07-201-1/+1
| | | | | | Actually return AS and not AR. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Add ZSTD compression support for initramfsThomas Deutschmann2020-07-161-0/+2
| | | | | Bug: https://bugs.gentoo.org/731294 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* busybox: Honor toolchainThomas Deutschmann2020-07-161-0/+9
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_funcs.sh: _tc-getPROG(): Fix overriding of default programThomas Deutschmann2020-07-161-2/+10
| | | | | | | tc-getBUILD_PROG() could pass multiple variables so we need to check all variables until we find our config variable containing user's value. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_funcs.sh: get_tc_vars(): Add READELF and OBJDUMPThomas Deutschmann2020-07-161-0/+2
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_compile.sh: compile_generic() refactoredThomas Deutschmann2020-07-161-0/+22
| | | | | | | | | | | - Use an array to construct command to run. - Make sure we set all environment variables used by kernel's build system to honor our toolchain. Tested with with sys-devel/binutils-config[-native-symlinks] and sys-devel/gcc-config[-native-symlinks]. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_funcs.sh: tc-getRANLIB(): NormalizedThomas Deutschmann2020-07-161-1/+1
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_funcs.sh: Fix duplicated tc-getSTRIP()Thomas Deutschmann2020-07-161-5/+1
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_initramfs.sh: create_initramfs(): Move and unify validation of ↵Thomas Deutschmann2020-07-161-0/+24
| | | | | | | | | | | | | | | --compress-initramfs-type to determine_real_args() This will allow us to error out early if required user space tool needed to compress initramfs based on specified --compress-initramfs-type is missing or selected type is invalid/unsupported. Best/fastest list is based on results from [Link1][Link2][Link3]. Link1: https://events.static.linuxfound.org/sites/events/files/lcjpcojp13_klee.pdf Link2: https://kernel.ubuntu.com/~cking/boot-speed-eoan-5.3/kernel-compression-method.txt Link3: https://lwn.net/Articles/817134/ Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_funcs.sh: check_distfiles(): Adjust patternThomas Deutschmann2020-07-161-1/+1
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_initramfs.sh: append_dropbear(): Add support for ed25519 host keysThomas Deutschmann2020-06-201-0/+3
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* sandbox: Set unique SANDBOX_LOG values to avoid collisionsThomas Deutschmann2020-01-231-0/+27
| | | | | Bug: https://bugs.gentoo.org/704848 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_funcs.sh: find_kernel_binary() refactoredThomas Deutschmann2020-01-121-6/+9
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Style fix: Use curly bracesThomas Deutschmann2020-01-111-16/+16
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_funcs.sh: gen_die(): Prevent recursionThomas Deutschmann2020-01-021-0/+8
| | | | | Closes: https://bugs.gentoo.org/704546 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_funcs.sh: Add is_glibc() functionThomas Deutschmann2019-12-141-0/+14
| | | | | | | This function will allow to detect if CHOST is using glibc or not. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_funcs.sh: get_chost_libdir(): Use libc.a to determine CHOST libdirThomas Deutschmann2019-12-141-2/+5
| | | | | | | libc.a is required for almost every package in initramfs whereas libnss_files.so isn't available in musl for example. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Improve SELinux compatibilityMark Wright2019-12-061-4/+4
| | | | | Closes: https://bugs.gentoo.org/697074 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Add support for a custom font at bootThomas Deutschmann2019-11-241-0/+22
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_funcs.sh: expand_file() refactoredThomas Deutschmann2019-11-191-1/+24
| | | | | | | | - Add pseudo tilde expansion support - Use `realpath -m` Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_funcs.sh: check_disk_space_requirements(): Fix error messageThomas Deutschmann2019-10-091-1/+1
| | | | | Fixes 467c2e82 ("Add feature to check for free disk space early at genkernel start") Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_funcs.sh: cleanup(): Try to kill all running child processes before cleanupThomas Deutschmann2019-10-021-0/+46
| | | | | | | | | If genkernel was aborted, it maybe possible that child processes are still running which maybe prevent cleanup. With this commit, cleanup() will try to kill all running child processes. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gkbuild.sh: Add possibility to disable distcc usage per gkbuildThomas Deutschmann2019-09-301-0/+27
| | | | | | | | | | | | | | This commit will add support for custom variable DISABLE_DISTCC which can be used in gkbuilds to disable distcc usage when set to "yes". This is needed because we don't have package.env mechanism to disable features per package. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Add --utils-cxx optionThomas Deutschmann2019-09-301-0/+3
| | | | | | | | | | | To compile thin-provisioning-tools, required for LVM thin provisioning support which was added in commit 9dea735590ebfff278710148fa8743777a18c4bd, we need a C++ compiler. This option will allow user to specify custom C++ compiler (for example when using ccache/distcc). Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_funcs.sh: _tc-getPROG(): Quote type command argumentThomas Deutschmann2019-09-301-1/+1
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_funcs.sh: get_chost_libdir(): Don't quote tc-getCC() return valueThomas Deutschmann2019-09-301-1/+1
| | | | | | This will allow user to set UTILS_CC="distcc gcc" for example. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_funcs.sh: Add tc-getBUILD_CXX() functionThomas Deutschmann2019-09-161-0/+4
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Record disk usage for each package/componentThomas Deutschmann2019-08-301-0/+11
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_funcs.sh: Import makeopts_jobs function from multiprocessing eclassThomas Deutschmann2019-08-301-0/+20
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_funcs.sh: Import gcc-* functions from toolchain eclassThomas Deutschmann2019-08-301-0/+35
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_funcs.sh: Move KCONFIG_MODIFIED_MARKER declaration to determine_real_args()Thomas Deutschmann2019-08-111-2/+0
| | | | | | | | Since we moved $TEMP declaration to determine_real_args(), we also need to move KCONFIG_MODIFIED_MARKER to determine_real_args(). Fixes 2cefc27 ("genkernel: Move --tempdir handling to determine_real_args()") Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_funcs.sh: make_bootdir_writable(): Fix ro checkThomas Deutschmann2019-08-101-1/+1
| | | | | | | | Make sure we check $BOOTDIR only for ro and not any mount containing $BOOTDIR value. Bug: https://bugs.gentoo.org/691872 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_funcs.sh: gen_die(): Call restore_boot_mount_state()Thomas Deutschmann2019-08-101-0/+2
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>