From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 1A230138334 for ; Sat, 23 Mar 2019 09:52:51 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 68CCBE0A0B; Sat, 23 Mar 2019 09:52:47 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 3752FE09F1 for ; Sat, 23 Mar 2019 09:52:47 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id D8F03335D03 for ; Sat, 23 Mar 2019 09:52:45 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 3A6AA581 for ; Sat, 23 Mar 2019 09:52:42 +0000 (UTC) From: "Thomas Deutschmann" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Thomas Deutschmann" Message-ID: <1553328378.dcfc952708ed4d6f7ffd303178d7b72e79c6aa3c.whissi@gentoo> Subject: [gentoo-commits] proj/genkernel:master commit in: / X-VCS-Repository: proj/genkernel X-VCS-Files: gen_compile.sh gen_initramfs.sh X-VCS-Directories: / X-VCS-Committer: whissi X-VCS-Committer-Name: Thomas Deutschmann X-VCS-Revision: dcfc952708ed4d6f7ffd303178d7b72e79c6aa3c X-VCS-Branch: master Date: Sat, 23 Mar 2019 09:52:42 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 477dc4ed-7b47-4c67-90bd-f16b7fc2caf9 X-Archives-Hash: b5f1c9a1bf249484f65a20166a71131c commit: dcfc952708ed4d6f7ffd303178d7b72e79c6aa3c Author: Thomas Deutschmann gentoo org> AuthorDate: Sat Mar 23 04:58:03 2019 +0000 Commit: Thomas Deutschmann gentoo org> CommitDate: Sat Mar 23 08:06:18 2019 +0000 URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=dcfc9527 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 gentoo.org> gen_compile.sh | 17 +++++++++++++++++ gen_initramfs.sh | 4 ++++ 2 files changed, 21 insertions(+) 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' ] && diff --git a/gen_initramfs.sh b/gen_initramfs.sh index 5cafd11..f4706a5 100755 --- a/gen_initramfs.sh +++ b/gen_initramfs.sh @@ -63,6 +63,10 @@ log_future_cpio_content() { } append_devices() { + if [[ ! -x "${KERNEL_OUTPUTDIR}/usr/gen_init_cpio" ]]; then + compile_gen_init_cpio + fi + # WARNING, does NOT support appending to cpio! cat >"${TEMP}/initramfs-base-temp.devices" <<-EOF dir /dev 0755 0 0