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 88480C25B76 for ; Wed, 5 Jun 2024 13:16:25 +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:References:In-Reply-To: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=9uXsSfYRYMb3Ylo4qAe8UA6XnhWze7J9CigaCqMG4rU=; b=UIXuJ865ujWtXk BLydDpjTHE7eYzgyf+eeTAJg4USEtJbpCiX0AZRRaP1fklmCd1AUY8/HEHykIMAEibsQ6nkdaOhOr x9olbk9TZeCc4kYTbdwkrzdbmwfy9uDPQn/1zlPPLcCB4Rhg4JC3zBiVbiQl81tDvvFrP/faGXU1J fYqC/Mz4ulM+sdMeP6fR1/P2CFGzpFuqcdmTbtfnUcI6tUJ9qb82YJ5aWWS14zOjqjSP6RmEBHv10 N6bUpLtKLlrwD1/5Fkpx+QMVKFRU2yAYDg1vsUJVVnbGn0swXpFGYDM1dXwrhOywJtMHOhY1rh2VO IbU+dJE87y6YFAcKMXkA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sEqUx-00000006CKo-1XFq; Wed, 05 Jun 2024 13:16:15 +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 1sEqUu-00000006CJE-1fQe for linux-arm-kernel@lists.infradead.org; Wed, 05 Jun 2024 13:16:13 +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 351B8339; Wed, 5 Jun 2024 06:16:33 -0700 (PDT) Received: from donnerap.manchester.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 4392C3F792; Wed, 5 Jun 2024 06:16:08 -0700 (PDT) Date: Wed, 5 Jun 2024 14:16:05 +0100 From: Andre Przywara To: Akos Denke Cc: linux-arm-kernel@lists.infradead.org, Mark Rutland Subject: Re: [boot-wrapper-aarch64 PATCH] configure: Do not force kernel-dir as a mandatory input Message-ID: <20240605141605.672b60c6@donnerap.manchester.arm.com> In-Reply-To: <20240523114931.2093222-1-akos.denke@arm.com> References: <20240523114931.2093222-1-akos.denke@arm.com> Organization: ARM X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.32; aarch64-unknown-linux-gnu) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240605_061612_744383_96939C3C X-CRM114-Status: GOOD ( 25.69 ) 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 On Thu, 23 May 2024 13:49:31 +0200 Akos Denke wrote: Hi Akos, > 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. So the patch itself looks fine to me, and it seems to work as described in my quick testing. The only thing I would like to change is the patch title: "dropping the requirement for --with-kernel-dir" is more a side effect, the main feature here seems to be --with-kernel-image, which indeed solves a long-standing annoyance (so thanks for that!) That's just a nit, though, so: > Signed-off-by: Akos Denke Reviewed-by: Andre Przywara Cheers, Andre > --- > 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}" _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel