aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* gen_determineargs.sh: determine_real_args(): Don't allow TMPDIR with spacesThomas Deutschmann2019-07-291-0/+16
| | | | | | | This just won't work -- many packages like util-linux don't support spaces in builddir path and will fail when applying libtool magic. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_funcs.sh: gkbuild(): Export any set CCACHE_* and DISTCC_* variableThomas Deutschmann2019-07-291-0/+13
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Export $PATH to genkernel workerThomas Deutschmann2019-07-291-0/+4
| | | | | | For example required for ccache. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_funcs.sh: Refactor get_chost_libdir() error handlingThomas Deutschmann2019-07-291-2/+14
| | | | | | | | We need to check each returned value because last call to dirname() would return "." when called for an empty path caused by a previous failure. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Make initramfs and kernel filename customizableThomas Deutschmann2019-07-291-0/+7
| | | | | | | | | | | | | New options like --initramfs-filename or --kernel-filename will allow user to customize filenames used when installing initramfs or kernel into $BOOTDIR. Therefore --kernelname (KNAME) option was removed. Filename can contain placeholders like '%%ARCH%%' which will get replaced at runtime. Man page contains more information. Bug: https://bugs.gentoo.org/395095 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Make use of $TAR_COMMAND variableThomas Deutschmann2019-07-271-1/+4
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_funcs.sh: Add is_gzipped() functionThomas Deutschmann2019-07-261-0/+26
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_funcs.sh: gen_die(): Just trigger trap function when died in subshellThomas Deutschmann2019-07-261-16/+21
| | | | | | This will ensure that only one function will call cleanup(). Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Add feature to check for free disk space early at genkernel startv4.0.0_beta9Thomas Deutschmann2019-07-231-0/+79
| | | | | | | | | | | | To avoid preventable errors like running out of disk space while building a new kernel, two new options, --check-free-disk-space-bootdir and --check-free-disk-space-kerneloutputdir, were added. When set, disabled by default, genkernel will check early before starting to build kernel/initramfs for specified amount of free disk space. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Log genkernel start and end timeThomas Deutschmann2019-07-231-0/+5
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Add --no-sandbox optionThomas Deutschmann2019-07-211-90/+102
| | | | | | | This option is useful when you are calling genkernel within a sandboxed environment, i.e. when using genkernel within an ebuild. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_funcs.sh: set_config_with_override(): Bail out when we failed to set ↵Thomas Deutschmann2019-07-211-3/+8
| | | | | | config variable Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_funcs.sh: gkbuild(): Export $TMPDIRThomas Deutschmann2019-07-211-1/+2
| | | | | | | Some portage programs like eltpatch depend on $TMPDIR. Bug: https://bugs.gentoo.org/690264 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_funcs.sh: gen_die(): Don't advertise $LOGFILE until ↵Thomas Deutschmann2019-07-211-3/+8
| | | | | | | | | determine_real_args() was called Before determine_real_args() was called, $LOGFILE will probably contain content from a previous run. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_funcs.sh: dump_debugcache(): Echo DEBUGCACHE when $LOGFILE isn't writableThomas Deutschmann2019-07-211-1/+9
| | | | | | This can happen until determine_real_args() was called. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* genkernel: Move $LOGFILE initialization to determine_real_args()Thomas Deutschmann2019-07-211-9/+0
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_funcs.sh: set_color_vars(): Define NORMAL as last colorThomas Deutschmann2019-07-211-4/+4
| | | | | | This will fix output when running with "set -x" very early. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_funcs.sh: is_valid_triplet(): Relax regexThomas Deutschmann2019-07-201-1/+1
| | | | | Bug: https://bugs.gentoo.org/690262 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_funcs.sh: restore_boot_mount_state(): Delete .bootdir.no_boot_partition ↵Thomas Deutschmann2019-07-181-3/+3
| | | | | | | only when present Fixes 8458d98a ("Rework --mountboot handling") Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>