From patchwork Thu Sep 17 14:45:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dimitri John Ledkov X-Patchwork-Id: 1366187 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=none (p=none dis=none) header.from=ubuntu.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=surgut.co.uk header.i=@surgut.co.uk header.a=rsa-sha256 header.s=google header.b=ZdIp4gAS; dkim-atps=neutral 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 4Bsfs85fMXz9sSC; Fri, 18 Sep 2020 00:45:32 +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 1kIvA8-0001Kn-45; Thu, 17 Sep 2020 14:45:28 +0000 Received: from mail-wr1-f68.google.com ([209.85.221.68]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1kIvA6-0001Kg-IX for kernel-team@lists.ubuntu.com; Thu, 17 Sep 2020 14:45:26 +0000 Received: by mail-wr1-f68.google.com with SMTP id z1so2390889wrt.3 for ; Thu, 17 Sep 2020 07:45:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=surgut.co.uk; s=google; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=eFCAjn88WqoMOLbOTbrncSdWr+OWfmwdvZVlgJWrhfw=; b=ZdIp4gASy6g9LQUjrnZwP2uNIwP1zFQylg1zTBsfqMoVi+KbRb6isRZSjbjTUhHUBM 3davveWCF1u0+jUODQ9VMbkeSuPp0BvGSAd5kKivgdMb9wdf+lYvpWJGWa30rLBAUuSo NJPEJqNOqMX5tNKrT55CZLhjyvn7JFWe6zIvk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=eFCAjn88WqoMOLbOTbrncSdWr+OWfmwdvZVlgJWrhfw=; b=GR8M9S1I03Y5H+y23T022UxIec8bP42IVAaHY7DJXl0DOM0a7pKpaDeObV7O0256iQ MD35O7k4vQcW3qvA09qRJDRF59Q7o4w8OHiLtU9/+zpt7Rwj3n8NtSBdOmhTT85mDPRX x80mCMED/K9NvoY359aqPpHlMLg9g5U/eBWbRq1vXuvnWWhjEtN5BoQwG4CnP/8vC64H H/ul1D9tZL8DRWrX5FDYniiS9zSFTFgtx/X5fITOAyqS2BZiQMiZGX8FW9T/z1j8zujS UdvEvws6humX0BiRffjzLNsAcSm2Q/bNOLzQRzAG4B4qfxGZYvJ198TQ1uBFcHXHBbT0 Tbvg== X-Gm-Message-State: AOAM531mIjvf1E8mpH/C841bWsZKexa+MWPoqfdRavsjhiBvkcwl68Z2 Iaz5F+9x47sfq6dEgwTK0AF+p+Y0infhug== X-Google-Smtp-Source: ABdhPJxDHwafB47SZK7N/nKlueNHo/mXFLk/KmuHRCVtUDT8aUSEO4uOV9DBj57wKVkpFfMeigM0jw== X-Received: by 2002:a5d:6691:: with SMTP id l17mr33748440wru.10.1600353925470; Thu, 17 Sep 2020 07:45:25 -0700 (PDT) Received: from localhost ([2a01:4b00:85fd:d700:4a20:24a7:1071:b40]) by smtp.gmail.com with ESMTPSA id q13sm4253820wra.93.2020.09.17.07.45.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Sep 2020 07:45:24 -0700 (PDT) From: Dimitri John Ledkov To: kernel-team@lists.ubuntu.com Subject: [PATCH] UBUNTU: [Packaging] kernelconfig -- only update/edit configurations on architectures we have compiler support Date: Thu, 17 Sep 2020 15:45:22 +0100 Message-Id: <20200917144522.689095-1-xnox@ubuntu.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 , Dimitri John Ledkov Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Andy Whitcroft 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.] Signed-off-by: Andy Whitcroft Signed-off-by: Dimitri John Ledkov BugLink: https://bugs.launchpad.net/bugs/1863116 --- Tested by multiple people, and we all love this on power/s390x/arm64. Please apply for unstable | groovy | focal. 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