From patchwork Fri Jun 11 09:57:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AceLan Kao X-Patchwork-Id: 1490864 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; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=XoleAKPS; 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 4G1brJ2pF8z9sSn; Fri, 11 Jun 2021 19:58:08 +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 1lrdvQ-00085q-AO; Fri, 11 Jun 2021 09:58:04 +0000 Received: from mail-pj1-f45.google.com ([209.85.216.45]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1lrdvM-00084H-Jw for kernel-team@lists.ubuntu.com; Fri, 11 Jun 2021 09:58:00 +0000 Received: by mail-pj1-f45.google.com with SMTP id o17-20020a17090a9f91b029015cef5b3c50so5545191pjp.4 for ; Fri, 11 Jun 2021 02:58:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tGS5XlgPGcODx6d3biZh/D+4DitfYXpccvegSpnwVrk=; b=XoleAKPSzzh3Ysvh2XaKpS3yrz9iLu3ky0OYmUX3NgJtajJGc+0mAHN85T1IYBHSdh BmUoN71PQ4rzP0UkDx+yazZNBovv2mMLSuXy8yTplMtzwVApJqisl2+IuNncoOsXOz49 4/FY4F3Em/6NWexGnj3QYVlW3ctl6rVx8Ud8nlyRTRqgPS6KS5PxJDed6raq8PrnR+IG /9mn3oT+pypByQR6x3Av4hjulMDrOVG4CGGDrLM2/ROb9hUbHHT2E7GFRb0GEH6JoNEA OBDCoCyKpqYHEQrrPu9uprpr2Y6oxdTpAv4hlBObfuBHpyu+lwCdEWNoQf+e9Bz8DuIa Cj+Q== 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:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=tGS5XlgPGcODx6d3biZh/D+4DitfYXpccvegSpnwVrk=; b=qvsgNT+pgw8t92HnW+uJG3+hERlCixyl5E3R1LuaLNwwjeygV6sWPmX8YHHZvVPaz5 Mq2ZdEgHkKjcJ4s3fXZvDW7VevZ3j7ZN1pJQbj/H6vLXhBbBjCrPrCnp7DnFEBaB/cCk FsuY20bx5aCp2y6V2h+xUMMS+SSIru/u1B4LAkhlRr+reWB9tyaA0UrZG7PK9x9C9LXm vJC0QhqFSeSg1oQ8TxBOAUOBJilnP9wD94rvVon2eqUix3qnMOuO4KFQ252Od1FSlQ9o +emXy5juvdk33leA3LACfX/VG1ynR/jcYlNjWMgZDyYWfjJciJdMASvx+aUUejTttoGx GOTg== X-Gm-Message-State: AOAM530RFHP9W0nKoOPghSg8wKEo8/9bb+xveisSx69tMU4EQBulii9A w3ipqePFbkCzf6OjndXsBXicHgAeUBHDrg== X-Google-Smtp-Source: ABdhPJw/fxOzUvLCMLq2jzkJWE0n4dS4/mzqaHas/nNGQKnvhZEgu8GRTx6j4actQ4yqBVyCbzbwtw== X-Received: by 2002:a17:90b:384b:: with SMTP id nl11mr3719605pjb.147.1623405477969; Fri, 11 Jun 2021 02:57:57 -0700 (PDT) Received: from localhost (220-135-95-34.HINET-IP.hinet.net. [220.135.95.34]) by smtp.gmail.com with ESMTPSA id e21sm4867253pjh.55.2021.06.11.02.57.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Jun 2021 02:57:57 -0700 (PDT) From: AceLan Kao To: kernel-team@lists.ubuntu.com Subject: [PATCH 1/3][SRU][G] UBUNTU: [Packaging] Add support for ODM drivers Date: Fri, 11 Jun 2021 17:57:49 +0800 Message-Id: <20210611095751.14524-2-acelan.kao@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210611095751.14524-1-acelan.kao@canonical.com> References: <20210611095751.14524-1-acelan.kao@canonical.com> MIME-Version: 1.0 Received-SPF: pass client-ip=209.85.216.45; envelope-from=acelan@gmail.com; helo=mail-pj1-f45.google.com 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: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Stefan Bader BugLink: https://bugs.launchpad.net/bugs/1912789 We want to be able to selectively turn on ODM driver support for those kernels/arches we have to but otherwise not inherit this to other derivatives. This is done by a new config option which we will have to depend on in the new drivers config options. Support is toggled by changing a makefile rule variable. The new config option will be hidden as long as not at least one of the arches supported turns on the rule variable. Signed-off-by: Stefan Bader Acked-by: Marcelo Henrique Cerri Acked-by: Andy Whitcroft Signed-off-by: Kelsey Skunberg (cherry picked from commit 4aeffc246531a666c1fad1925ebf1a6e68a704e4 focal) Signed-off-by: Chia-Lin Kao (AceLan) --- debian/rules.d/0-common-vars.mk | 4 ++++ debian/rules.d/1-maintainer.mk | 1 + debian/rules.d/2-binary-arch.mk | 3 +++ debian/scripts/misc/arch-has-odm-enabled.sh | 21 +++++++++++++++++++++ debian/scripts/misc/kernelconfig | 2 +- ubuntu/Kconfig | 6 ++++++ 6 files changed, 36 insertions(+), 1 deletion(-) create mode 100755 debian/scripts/misc/arch-has-odm-enabled.sh diff --git a/debian/rules.d/0-common-vars.mk b/debian/rules.d/0-common-vars.mk index 4a04c41eedfd..c09213f2592a 100644 --- a/debian/rules.d/0-common-vars.mk +++ b/debian/rules.d/0-common-vars.mk @@ -187,6 +187,10 @@ do_common_headers_indep=true # add a 'full source' mode do_full_source=false +# Add an option to enable special drivers which should only be build when +# explicitly enabled. +do_odm_drivers=false + # build tools ifneq ($(wildcard $(CURDIR)/tools),) ifeq ($(do_tools),) diff --git a/debian/rules.d/1-maintainer.mk b/debian/rules.d/1-maintainer.mk index b5b506f08058..5944ca526703 100644 --- a/debian/rules.d/1-maintainer.mk +++ b/debian/rules.d/1-maintainer.mk @@ -86,6 +86,7 @@ printenv: @echo "do_flavour_header_package = $(do_flavour_header_package)" @echo "do_common_headers_indep = $(do_common_headers_indep)" @echo "do_full_source = $(do_full_source)" + @echo "do_odm_drivers = $(do_odm_drivers)" @echo "do_tools = $(do_tools)" @echo "do_any_tools = $(do_any_tools)" @echo "do_linux_tools = $(do_linux_tools)" diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk index ddcbe4110cdb..ffd1bba6b54f 100644 --- a/debian/rules.d/2-binary-arch.mk +++ b/debian/rules.d/2-binary-arch.mk @@ -31,6 +31,9 @@ $(stampdir)/stamp-prepare-tree-%: $(commonconfdir)/config.common.$(family) $(arc [ "$(do_full_source)" != 'true' ] && true || \ rsync -a --exclude debian --exclude debian.master --exclude $(DEBIAN) * $(builddir)/build-$* cat $(wordlist 1,3,$^) | sed -e 's/.*CONFIG_VERSION_SIGNATURE.*/CONFIG_VERSION_SIGNATURE="Ubuntu $(release)-$(revision)-$* $(raw_kernelversion)"/' > $(builddir)/build-$*/.config + [ "$(do_odm_drivers)" = 'true' ] && true || \ + sed -ie 's/.*CONFIG_UBUNTU_ODM_DRIVERS.*/# CONFIG_UBUNTU_ODM_DRIVERS is not set/' \ + $(builddir)/build-$*/.config find $(builddir)/build-$* -name "*.ko" | xargs rm -f $(build_cd) $(kmake) $(build_O) -j1 syncconfig prepare scripts touch $@ diff --git a/debian/scripts/misc/arch-has-odm-enabled.sh b/debian/scripts/misc/arch-has-odm-enabled.sh new file mode 100755 index 000000000000..7bc8a5db0db0 --- /dev/null +++ b/debian/scripts/misc/arch-has-odm-enabled.sh @@ -0,0 +1,21 @@ +#!/bin/sh +# Evaluate whether arch ($1) will be built with do_odm_drivers set to true. +set -e + +if [ "$1" = "" ]; then + return 1 +fi + +TOPDIR=$(dirname $0)/../../.. +. $TOPDIR/debian/debian.env +RULESDIR=$TOPDIR/$DEBIAN/rules.d + +do_odm_drivers=false +for f in $1.mk hooks.mk; do + eval $(cat $RULESDIR/$f | sed -n -e '/do_odm_drivers/s/ \+//gp') +done +if [ "$do_odm_drivers" != "true" ]; then + return 1 +fi + +return 0 diff --git a/debian/scripts/misc/kernelconfig b/debian/scripts/misc/kernelconfig index 888cc892d936..f95396e28f28 100755 --- a/debian/scripts/misc/kernelconfig +++ b/debian/scripts/misc/kernelconfig @@ -68,7 +68,7 @@ for arch in $archs; do # for i386 since it is no longer supported after 19.04, however # we maintain the configs for hwe. modify_config=true - env="ARCH=$kernarch" + env="ARCH=$kernarch DEB_ARCH=$arch" compiler_path=$(which "${cross_compile}gcc" || true) if [ "$compiler_path" != '' ]; then env="$env CROSS_COMPILE=$cross_compile" diff --git a/ubuntu/Kconfig b/ubuntu/Kconfig index 5056671223bb..5575ce574577 100644 --- a/ubuntu/Kconfig +++ b/ubuntu/Kconfig @@ -1,5 +1,11 @@ menu "Ubuntu Supplied Third-Party Device Drivers" + +config UBUNTU_ODM_DRIVERS + def_bool $(success,$(srctree)/debian/scripts/misc/arch-has-odm-enabled.sh $(DEB_ARCH)) + ---help--- + Turn on support for Ubuntu ODM supplied drivers + # # NOTE: to allow drivers to be added and removed without causing merge # collisions you should add new entries in the middle of the six lines From patchwork Fri Jun 11 09:57:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AceLan Kao X-Patchwork-Id: 1490865 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; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=lq2/xJqW; 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 4G1brL2fmGz9sSn; Fri, 11 Jun 2021 19:58:10 +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 1lrdvS-00087J-O4; Fri, 11 Jun 2021 09:58:06 +0000 Received: from mail-pg1-f174.google.com ([209.85.215.174]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1lrdvR-00085c-CV for kernel-team@lists.ubuntu.com; Fri, 11 Jun 2021 09:58:05 +0000 Received: by mail-pg1-f174.google.com with SMTP id j12so2030245pgh.7 for ; Fri, 11 Jun 2021 02:58:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=xFYks/vdeO2x9NyY7Ip2MJdzuQimpKJk+m6KlH/Ge6I=; b=lq2/xJqW9kGhQj75oad+iqNNUcd+hfxEbhYEBis5AzhPwdap4WUvmZ30wFtJBZxMfv qKYZW3g0OC5tyqISPhZwgsX1fzaaiL6Y7fIixD24ngpIIHqGQ3Qta2nJl1WAY/b+Hkwq O3yBrFQFGVFH+/rerOqKiy548zmNJ2LD7dppHcXFZfn7xEu3gAj67V9ERSO5lvebqNN3 tT5k6QTdgK7XAxxxPIE3/Sth5UOleMb/hHQhLcH2XyTdsEe/JC1vtd/NInF9nRsC2P9x YBFCJOY49OuIdGIFLPjH0iDjknIPym18dZr3lo0qAwEWPkhYymZj26W6ps3nZYZNOd1H WL4w== 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:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=xFYks/vdeO2x9NyY7Ip2MJdzuQimpKJk+m6KlH/Ge6I=; b=SkHbBvzxMitBDVyzpmLwByuThkNq9Jnj6GmUZcEKOgE915B9xtWE6pJF98p2i85pTb XGOz6bh+mhK4yR72neUuZpRUwBcmKiYxBEaITvhM17skN9t43cASvkb9iwhxhHupd54I 3k6o6O4QRjf7Br36xk5Crympw1C8NbnIPIHKn1EQGLb2HTiMHW5OT7+l70jcQyRpotcg zncp/VljNtYwHgVL2mkd3oX/wYc4UsCO6tSVVAFkkjGFBB3DojE++xDwGrl6urKZqT65 vISx8uXwYUJz2dnTX6xut0QRCuHrJXT9f5Jj9SI8X7kREjbWKxx7Bb1EZqQuBUc/ZoRa enig== X-Gm-Message-State: AOAM532vieW+31N4TIvugbu3YeYIi+EsOT5Fc+cE6+Czk/dhmHDuVYoD CbNPHCEN3ENEe9C/7iUnnlvmXWxorBftAA== X-Google-Smtp-Source: ABdhPJz3Lcob610JQysPkvCSmCMzQbMXZrDiy+LmhIp6R07xcxzxGYNuiLbwiCMFa9oUNHkNYL+IFw== X-Received: by 2002:a63:40c:: with SMTP id 12mr2854079pge.174.1623405482247; Fri, 11 Jun 2021 02:58:02 -0700 (PDT) Received: from localhost (220-135-95-34.HINET-IP.hinet.net. [220.135.95.34]) by smtp.gmail.com with ESMTPSA id p17sm10163752pjg.54.2021.06.11.02.58.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Jun 2021 02:58:01 -0700 (PDT) From: AceLan Kao To: kernel-team@lists.ubuntu.com Subject: [PATCH 2/3][SRU][G] UBUNTU: [Packaging] Turn on ODM support for amd64 Date: Fri, 11 Jun 2021 17:57:50 +0800 Message-Id: <20210611095751.14524-3-acelan.kao@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210611095751.14524-1-acelan.kao@canonical.com> References: <20210611095751.14524-1-acelan.kao@canonical.com> MIME-Version: 1.0 Received-SPF: pass client-ip=209.85.215.174; envelope-from=acelan@gmail.com; helo=mail-pg1-f174.google.com 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: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Stefan Bader BugLink: https://bugs.launchpad.net/1912789 Now there is the support in place let us turn this on for amd64. This is added as enabled generally in the config because otherwise updating the config for drivers depending on it would not work. It is changed at build time for arches which have not enabled it. Also it will automatically go away for backports. Signed-off-by: Stefan Bader Acked-by: Marcelo Henrique Cerri Acked-by: Andy Whitcroft Signed-off-by: Kelsey Skunberg (backported from commit 4aeffc246531a666c1fad1925ebf1a6e68a704e4 focal) Signed-off-by: Chia-Lin Kao (AceLan) --- debian.master/config/config.common.ubuntu | 1 + debian.master/rules.d/amd64.mk | 1 + 2 files changed, 2 insertions(+) diff --git a/debian.master/config/config.common.ubuntu b/debian.master/config/config.common.ubuntu index 0b25507258e1..1cdb812a9d72 100644 --- a/debian.master/config/config.common.ubuntu +++ b/debian.master/config/config.common.ubuntu @@ -10656,6 +10656,7 @@ CONFIG_UBIFS_FS_ZLIB=y CONFIG_UBIFS_FS_ZSTD=y # CONFIG_UBSAN is not set CONFIG_UBUNTU_HOST=m +CONFIG_UBUNTU_ODM_DRIVERS=y CONFIG_UCB1400_CORE=m CONFIG_UCC=y CONFIG_UCC_FAST=y diff --git a/debian.master/rules.d/amd64.mk b/debian.master/rules.d/amd64.mk index a95707b0cdd7..b33aced86921 100644 --- a/debian.master/rules.d/amd64.mk +++ b/debian.master/rules.d/amd64.mk @@ -22,3 +22,4 @@ do_extras_package = true do_tools_common = true do_tools_acpidbg = true do_zfs = true +do_odm_drivers = true From patchwork Fri Jun 11 09:57:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AceLan Kao X-Patchwork-Id: 1490866 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; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=C9UatRoI; 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 4G1brR2c71z9sSn; Fri, 11 Jun 2021 19:58:15 +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 1lrdvX-00089j-8h; Fri, 11 Jun 2021 09:58:11 +0000 Received: from mail-pg1-f174.google.com ([209.85.215.174]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1lrdvU-00087R-43 for kernel-team@lists.ubuntu.com; Fri, 11 Jun 2021 09:58:08 +0000 Received: by mail-pg1-f174.google.com with SMTP id j12so2030359pgh.7 for ; Fri, 11 Jun 2021 02:58:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=AKEKCSgEAP074MlWs5XGZnnJjLjCHNL2uAMLXfzkgxk=; b=C9UatRoIF2Rp92oG0XZ5CwgNjp9spZmoymo9bCYV8fQ1t+I57oabhLIJyyvF3Amz/0 nwoI8XbgECfFpwGSJRp+SuI2UogtzKqZeF6tHQGvgg4M3vVxu5MQ1Yl59MNybEhlRd8V fdVJOQnM1JaSyoufCnOAppZO1FGrTP1UDL97IlyKyduYdcmwCtOHarPU+N9KL8rVYP2/ LBXPaFDCHNB/vXcT1/krTIcRmR9DSxU952LpC43rtWpfXr64/MIsjvbfBG7k8mzdfWsF kXv7sxD+nFoDvYinVsU6xqIWd2rGanfQP84yImrl6A9rAfKsPzPvUBZFXr6KtT3y0MzE LCIA== 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:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=AKEKCSgEAP074MlWs5XGZnnJjLjCHNL2uAMLXfzkgxk=; b=mlxpJQBF4QW4hE4RU+wvPKyQcsJObmKrgLlmOgjkcD2VYQOHXTY2tQj3D0dnbZ99lX uqCRud1ygHD1CSd7IRasW7o4CBmQkgmAtdzFsk4rUPpYBKLlJjj6sGnB5ftuD9YuWUVu ZoXhe4bt5OEFjLkHuTtyzkYuwNVO3aRzAhS0He+eNm/kCkimzicG1o9rKx6T5IECBx4k qg1OJZ7MYKsHOvL8E59u/ozy3epAFoYTd0Qi5a1qFhXlhiDh6GQ1tkHx0RRSJTrb4poz 7tnXZk28dwHTnG5ENfi67hJMjxT7P4mzEIGuMZxv1hDxsioj5HNzchY35CGbwSe8TdCS BEoA== X-Gm-Message-State: AOAM530PH2HHx82CNVQ28dICMLipoupRuGSx3d13JcyySC9HTpN7ViZT LSeUqSfa+Uz/x4WrDhtFRP80z1n10JWiMw== X-Google-Smtp-Source: ABdhPJwtr75dY/LSPtot7GsDd6NNLeTkqzPLC8TzZ7h8GUzoJJvkwGzLYtGYXQR49aJZmNurvEJaJQ== X-Received: by 2002:a65:64c8:: with SMTP id t8mr2818853pgv.96.1623405485603; Fri, 11 Jun 2021 02:58:05 -0700 (PDT) Received: from localhost (220-135-95-34.HINET-IP.hinet.net. [220.135.95.34]) by smtp.gmail.com with ESMTPSA id v14sm5259746pgo.89.2021.06.11.02.58.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Jun 2021 02:58:04 -0700 (PDT) From: AceLan Kao To: kernel-team@lists.ubuntu.com Subject: [PATCH 3/3][SRU][G] UBUNTU: [Packaging] Fix ODM support in actual build Date: Fri, 11 Jun 2021 17:57:51 +0800 Message-Id: <20210611095751.14524-4-acelan.kao@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210611095751.14524-1-acelan.kao@canonical.com> References: <20210611095751.14524-1-acelan.kao@canonical.com> MIME-Version: 1.0 Received-SPF: pass client-ip=209.85.215.174; envelope-from=acelan@gmail.com; helo=mail-pg1-f174.google.com 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: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Stefan Bader BugLink: https://bugs.launchpad.net/bugs/1912789 The config update was working with the conditional entry but the actual build is different and was just ignoring everything. Signed-off-by: Stefan Bader (cherry picked commit from 198971108d5dfe12b9846bf0d115accc3d1c3fe8 focal) Signed-off-by: Chia-Lin Kao (AceLan) --- debian/scripts/misc/arch-has-odm-enabled.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/debian/scripts/misc/arch-has-odm-enabled.sh b/debian/scripts/misc/arch-has-odm-enabled.sh index 7bc8a5db0db0..23fe34a868a7 100755 --- a/debian/scripts/misc/arch-has-odm-enabled.sh +++ b/debian/scripts/misc/arch-has-odm-enabled.sh @@ -3,7 +3,16 @@ set -e if [ "$1" = "" ]; then - return 1 + # This would be set doing the actual kernel build + if [ "$KBUILD_VERBOSE" = "" ]; then + return 1 + fi + case $ARCH in + x86) ARCH=amd64;; + *) ;; + esac +else + ARCH=$1 fi TOPDIR=$(dirname $0)/../../.. @@ -11,7 +20,7 @@ TOPDIR=$(dirname $0)/../../.. RULESDIR=$TOPDIR/$DEBIAN/rules.d do_odm_drivers=false -for f in $1.mk hooks.mk; do +for f in $ARCH.mk hooks.mk; do eval $(cat $RULESDIR/$f | sed -n -e '/do_odm_drivers/s/ \+//gp') done if [ "$do_odm_drivers" != "true" ]; then