From patchwork Wed Aug 12 21:28:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Whitcroft X-Patchwork-Id: 1366048 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BsZ2K0jwdz9sTS; Thu, 17 Sep 2020 21:08:09 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1kIrll-0005ew-2r; Thu, 17 Sep 2020 11:08:05 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1kIrlj-0005ed-7H for kernel-team@lists.ubuntu.com; Thu, 17 Sep 2020 11:08:03 +0000 Received: from mail-wm1-f72.google.com ([209.85.128.72]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1kIrli-0004fq-Vd for kernel-team@lists.ubuntu.com; Thu, 17 Sep 2020 11:08:03 +0000 Received: by mail-wm1-f72.google.com with SMTP id b14so420310wmj.3 for ; Thu, 17 Sep 2020 04:08:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=UNT8ZY5Rj3qRIRZgIWGD6GA6hdtEOayRWMYcFQrvXyo=; b=ppcAZkHolpD1XQ/+p18zUAe24K6J5JqWpGCf//8Gr9bWEkfncVMtuqi7+630cl+AuJ 4hzDhsr8pp99lCrWdMwoCLRlOn6A5VoT2Furycv8PSlBnFQ7yGAy2N5pvB75nOUHBvpW cX4rrcRoi8W8emHjrE+hItVb0dq/N50qWiON/HCSl9ZogiGcwHPWpObI7dGkXwDcklqU GmliMq6sCg54tZ4gmXv3BGrVK9fVb7BuXDI43LhKBPXfZ9WOWXSLur77wot6vgSnRVED Ax4BS9hX9qb1QJYZa7JtOngdcWA9qofIXOAiJIPcpENp7V9STZbfLHpwMi/qd3aKZ+QN UGzg== X-Gm-Message-State: AOAM533wwf4jeRLtJnqMd3zFGxGLjDsQTbYjSUpYER47F9kOngJIU4kf kwS1/i8HPnGT4zU6MyV0gxjLEY1K4UIU0Fp0wq+/sguPLL3fimlagW6mLpBu7eZkQ/h3XVII0zW ThAXyQ2cuFrk2xM/vbFnSy1/N+XbVn/rap7fTDduiKg== X-Received: by 2002:a05:600c:21c4:: with SMTP id x4mr9692418wmj.107.1600340879180; Thu, 17 Sep 2020 04:07:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzhaQeoqXTTYSY7JEDzW1UuQYv0kdOionI9snjoLCHXd8+9y+ROVs53OMEQhRXAAG4hAZe+oA== X-Received: by 2002:a05:600c:21c4:: with SMTP id x4mr9692393wmj.107.1600340878860; Thu, 17 Sep 2020 04:07:58 -0700 (PDT) Received: from localhost ([2001:470:6973:2:dd0c:9ade:ec4c:1c18]) by smtp.gmail.com with ESMTPSA id c4sm37986386wrp.85.2020.09.17.04.07.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Sep 2020 04:07:58 -0700 (PDT) From: Andy Whitcroft To: kernel-team@lists.ubuntu.com Subject: [SRU focal:linux, groovy:linux 1/1] UBUNTU: [Packaging] kernelconfig -- only update/edit configurations on architectures we have compiler support Date: Wed, 12 Aug 2020 22:28:28 +0100 Message-Id: <20200812212828.388914-1-apw@canonical.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andy Whitcroft Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" We can only rebuild, edit, or update a configuration for an architecture nativly on that architecture or using a compatible cross-compiler for that architecture. Skip architectures for which we do not have an apropriate compiler. When we do not perform the requested operation on all architectures report those which have been skipped clearly at the bottom of the output. WARNING: configuration operation applied only to a subset of architectures (skipped i386 armhf arm64 ppc64el s390x) [seth.forshee@canonical.com: remove i386 special case.] BugLink: https://bugs.launchpad.net/bugs/1863116 Signed-off-by: Andy Whitcroft Acked-by: Seth Forshee Acked-by: Stefan Bader --- debian/scripts/misc/kernelconfig | 79 +++++++++++++++++++------------- 1 file changed, 47 insertions(+), 32 deletions(-) diff --git a/debian/scripts/misc/kernelconfig b/debian/scripts/misc/kernelconfig index fc50c48df3b7..dd45d2f2b085 100755 --- a/debian/scripts/misc/kernelconfig +++ b/debian/scripts/misc/kernelconfig @@ -39,6 +39,8 @@ if [ "$mode" = "genconfigs" ]; then test -d CONFIGS || mkdir CONFIGS fi +warning_partial= + for arch in $archs; do rm -rf build mkdir build @@ -64,9 +66,15 @@ for arch in $archs; do # Environment variables for 'make *config'. We omit CROSS_COMPILE # for i386 since it is no longer supported after 19.04, however # we maintain the configs for hwe. + modify_config=true env="ARCH=$kernarch" - if [ "$arch" != "i386" ]; then + compiler_path=$(which "${cross_compile}gcc" || true) + if [ "$compiler_path" != '' ]; then env="$env CROSS_COMPILE=$cross_compile" + else + echo "WARNING: ${cross_compile}gcc not installed" + modify_config= + warning_partial="$warning_partial $arch" fi archconfdir=$confdir/$arch @@ -100,38 +108,39 @@ for arch in $archs; do fullconf="$tmpdir/$arch-$config-full" cat "$fullconf" > build/.config # Call oldconfig or menuconfig - case "$mode" in - editconfigs) - # Interactively edit config parameters - while : ; do - echo -n "Do you want to edit config: $arch/$config? [Y/n] " - read choice - - case "$choice" in - y* | Y* | "" ) - make O=`pwd`/build $env menuconfig - break ;; - n* | N* ) - # 'syncconfig' prevents - # errors for '-' options set - # in common config fragments - make O=`pwd`/build $env syncconfig - break ;; - *) - echo "Entry not valid" - esac - done - ;; - *) - echo "* Run $mode (yes=$yes) on $arch/$config ..." - if [ "$yes" -eq 1 ]; then - yes "" | make O=`pwd`/build $env "$mode" - else - make O=`pwd`/build $env "$mode" - fi ;; - esac + if [ "$modify_config" ]; then + case "$mode" in + editconfigs) + # Interactively edit config parameters + while : ; do + echo -n "Do you want to edit config: $arch/$config? [Y/n] " + read choice + case "$choice" in + y* | Y* | "" ) + make O=`pwd`/build $env menuconfig + break ;; + n* | N* ) + # 'syncconfig' prevents + # errors for '-' options set + # in common config fragments + make O=`pwd`/build $env syncconfig + break ;; + *) + echo "Entry not valid" + esac + done + ;; + *) + echo "* Run $mode (yes=$yes) on $arch/$config ..." + if [ "$yes" -eq 1 ]; then + yes "" | make O=`pwd`/build $env "$mode" + else + make O=`pwd`/build $env "$mode" + fi ;; + esac + fi cat build/.config > $archconfdir/$config - cat build/.config > "$tmpdir/CONFIGS/$arch-$config" + [ "$modify_config" ] && cat build/.config >"$tmpdir/CONFIGS/$arch-$config" if [ "$keep" = "1" ]; then cat build/.config > CONFIGS/$arch-$config fi @@ -176,6 +185,7 @@ for arch in $archs; do flavour="${config##*.}" if [ -f $archconfdir/$config ]; then fullconf="$tmpdir/CONFIGS/$arch-$config" + [ ! -f "$fullconf" ] && continue "$bindir/../config-check" "$fullconf" "$arch" "$flavour" "$confdir" "0" "0" || let "fail=$fail+1" fi done @@ -189,3 +199,8 @@ fi rm -rf build +if [ "$warning_partial" ]; then + echo "" + echo "WARNING: configuration operation applied only to a subset of architectures (skipped$warning_partial)" 1>&2 + echo "" +fi