diff options
author | 2019-03-23 05:58:03 +0100 | |
---|---|---|
committer | 2019-03-23 09:06:18 +0100 | |
commit | dcfc952708ed4d6f7ffd303178d7b72e79c6aa3c (patch) | |
tree | 0ab2ef996d868835fbc9d1e6f9f9dfa5835bd0cd /gen_compile.sh | |
parent | gen_kerncache_is_valid(): No need to do anything if $KERNCACHE file doesn't e... (diff) | |
download | genkernel-dcfc952708ed4d6f7ffd303178d7b72e79c6aa3c.tar.gz genkernel-dcfc952708ed4d6f7ffd303178d7b72e79c6aa3c.tar.bz2 genkernel-dcfc952708ed4d6f7ffd303178d7b72e79c6aa3c.zip |
Try to compile gen_init_cpio if missing
gen_init_cpio is required in append_devices(). However, when
KERNEL_OUTPUTDIR was cleaned, this file is missing.
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'gen_compile.sh')
-rwxr-xr-x | gen_compile.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gen_compile.sh b/gen_compile.sh index d08d1e5..14d059d 100755 --- a/gen_compile.sh +++ b/gen_compile.sh @@ -244,6 +244,23 @@ apply_patches() { fi } +compile_gen_init_cpio() { + local gen_init_cpio_SRC="${KERNEL_DIR}/usr/gen_init_cpio.c" + local gen_init_cpio_DIR="${KERNEL_OUTPUTDIR}/usr" + + print_info 1 "$(getIndent 2)>> Compiling gen_init_cpio..." + + [ ! -e "${gen_init_cpio_SRC}" ] && gen_die "'${gen_init_cpio_SRC}' is missing. Cannot compile gen_init_cpio!" + [ ! -d "${gen_init_cpio_DIR}" ] && mkdir "${gen_init_cpio_DIR}" + + export_utils_args + + ${CC} -O2 "${KERNEL_DIR}/usr/gen_init_cpio.c" -o "${KERNEL_OUTPUTDIR}/usr/gen_init_cpio" -Wl,--no-as-needed || + gen_die 'Failed to compile gen_init_cpio!' + + unset_utils_args +} + compile_generic() { local RET [ "$#" -lt '2' ] && |