From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A3F67C25B79 for ; Thu, 23 May 2024 11:50:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=Mvk7lOBEZl1o28CszD+srydO/p48jUmiutiGO6PaP54=; b=J/jpJUkmIRPo9/ fm/IYdH6dwhBdQ1zrOX66ccUHpcAU9sGlehSZW1RQ7nhKbw1eESY8IsX184Q0UPSCRD8YwoP1ZHAs f3bV65oyZhH5UFrRhL/pin5UO4Hn0/BUdO2L0GFuci56pcFV8JM60RUUeYLn/+t2eVC74Cq6MV12V eZuSEIEaQyRANEYmyGoiW53EKZOyeoHcaWTw+4Rr3JtLz4t8FIyjjGTjDlJRBXo/f9olZITHzetzr eHKjv9xGva3V2xq6BMxB4mEJtp1VDcOwNOOSEA41hfzpfH092cHjEex/ZbIGI7r4HLVaSzERqRn5G 0oxLFJ/AcVb0HNGUWEZg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sA6xH-000000065q0-3vNQ; Thu, 23 May 2024 11:49:55 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sA6xE-000000065pV-0Iab for linux-arm-kernel@lists.infradead.org; Thu, 23 May 2024 11:49:53 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 226CE339; Thu, 23 May 2024 04:50:12 -0700 (PDT) Received: from e129830.budapest.arm.com (e129830.arm.com [10.45.25.93]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 64B553F641; Thu, 23 May 2024 04:49:47 -0700 (PDT) From: Akos Denke To: linux-arm-kernel@lists.infradead.org Cc: Mark Rutland , Akos Denke Subject: [boot-wrapper-aarch64 PATCH] configure: Do not force kernel-dir as a mandatory input Date: Thu, 23 May 2024 13:49:31 +0200 Message-ID: <20240523114931.2093222-1-akos.denke@arm.com> X-Mailer: git-send-email 2.43.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240523_044952_215350_1F6C827A X-CRM114-Status: GOOD ( 12.19 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org kernel-dir was required to fulfill the real dependencies: * kernel image * dtc * dtb There are already checks for all of these real dependencies, so passing the `--with-kernel-dir` does not need to be mandatory, in the case these dependencies are provided separately. An autoconf `--with-kernel-image` argument was added which allows to specify the image with its exact location. The `dtc` can be already provided via the PATH variable, whilst we already have a `--with-dtb` argument to pass a specific `dtb` file. These facts together deprecates the mandatoriness of kernel-dir and allows to provide any arbitrary kernel image, with dtb, dtc and initramfs, without a need for an assumed kernel directory structure. This makes the boot-wrapper building easier for prebuilt kernels, where we do not control the directory structure of the kernel artifacts. Signed-off-by: Akos Denke --- configure.ac | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/configure.ac b/configure.ac index 9e3b722..768506f 100644 --- a/configure.ac +++ b/configure.ac @@ -27,14 +27,18 @@ AS_IF([test "x$BOOTWRAPPER_ES" = x32 -a "x$KERNEL_ES" != x32], # Allow a user to pass --with-kernel-dir AC_ARG_WITH([kernel-dir], - AS_HELP_STRING([--with-kernel-dir], [specify the root Linux kernel build directory (required)]), - AC_SUBST([KERN_DIR], [$withval]), - AC_MSG_ERROR([No kernel directory specified. Use --with-kernel-dir])) + AS_HELP_STRING([--with-kernel-dir], [specify the root Linux kernel build directory]), + AC_SUBST([KERN_DIR], [$withval])) AS_IF([test "x$KERNEL_ES" = x32], [KERN_IMAGE=$KERN_DIR/arch/arm/boot/zImage], [KERN_IMAGE=$KERN_DIR/arch/arm64/boot/Image]) KERN_DTB=$KERN_DIR/arch/arm64/boot/dts/arm/fvp-base-revc.dtb +# Allow a user to pass a specific kernel image file +AC_ARG_WITH([kernel-image], + AS_HELP_STRING([--with-kernel-image], [specify kernel image]), + AC_SUBST([KERN_IMAGE], [$withval])) + # Allow the user to override the default DTB AC_ARG_WITH([dtb], AS_HELP_STRING([--with-dtb], [Specify a particular DTB to use]), @@ -52,11 +56,6 @@ AS_IF([test "x$X_IMAGE" == "x"], [], AC_SUBST([XEN_IMAGE], [$X_IMAGE]) AM_CONDITIONAL([XEN], [test "x$X_IMAGE" != "x"]) -# Ensure that the user has provided us with a sane kernel dir. -if ! test -d $KERN_DIR; then - AC_MSG_ERROR([Could not find Linux kernel dir: $KERN_DIR.]) -fi - AC_MSG_CHECKING([whether DTB file exists]) if ! test -f $KERN_DTB; then AC_MSG_RESULT([no]) @@ -126,7 +125,7 @@ AC_PROG_SED AC_PROG_LN_S AC_PATH_PROG([DTC], dtc, error, [$PATH$PATH_SEPARATOR$KERN_DIR/scripts/dtc]) if test "x$DTC" = "xerror"; then - AC_MSG_ERROR([cannot find the device tree compiler (dtc)]) + AC_MSG_ERROR([cannot find the device tree compiler (dtc). Use --with-kernel-dir or put dtc on the PATH]) fi AC_CHECK_TOOL(LD, ld) @@ -139,8 +138,12 @@ echo "" echo " Boot wrapper configuration" echo " ==========================" echo "" +if test "x${KERN_DIR}" != "x"; then echo " Linux kernel build dir: ${KERN_DIR}" +fi +echo " Linux kernel image: ${KERN_IMAGE}" echo " Device tree blob: ${KERN_DTB}" +echo " Device tree compiler: ${DTC}" echo " Linux kernel command line: ${CMDLINE}" echo " Embedded initrd: ${FILESYSTEM:-NONE}" echo " Use PSCI? ${USE_PSCI}" -- 2.43.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel