From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6755821036247187456 X-Received: by 2002:a92:4708:: with SMTP id u8mr3031563ila.179.1573118657866; Thu, 07 Nov 2019 01:24:17 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a6b:730f:: with SMTP id e15ls690001ioh.8.gmail; Thu, 07 Nov 2019 01:24:17 -0800 (PST) X-Google-Smtp-Source: APXvYqxZM8i4519S9rWhV/AKsxPejmgVQmlQKZVWBJ1PiPqlipYiHVQQRJ/DsUH3ZDG91KDGdtce X-Received: by 2002:a6b:b458:: with SMTP id d85mr2474690iof.287.1573118657480; Thu, 07 Nov 2019 01:24:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573118657; cv=none; d=google.com; s=arc-20160816; b=hIiicl90G74Mn58+jliFve6JGsKpLkquVwCY9h9zlK7e8S0hKU0HWbXABJCkRTLZvo ntRIOxIYqZ0MPXL8Lu5Qql2P8VkdUo4Utffsb3mexzN0Q+OLNIPjVrn1NfqLmqJW7ik3 WkMOteT79QEeoiiiyplXWRSDXiGn4gzrCGIaBxTZ3YGVARiob1p4TM5svwOhzXvuSCUI mn2cQZYcsos4ejdoPrEypNqdHIM1A0ceCzjG/Jt9ym2UL87+oZc3+478Q6BydZXSLp4V y3+4gX1D21O2LgToEr3agvMrVMHk4w7PqKhARmmClUn0gR5NN8QVcJa98KXhcJ63Bmsl gwtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:ironport-sdr:ironport-sdr; bh=lW6dQt0f2F39du7/212chvgFoIo79OQxQ43FSI2Z39E=; b=P+eM8yg4xzYmfY5ON/qnVenbxQ5e7Mhq+uSLFrzy2djeSTwsljciswhSp14qkyjLPn kN72Zvtg9Q7rMnWrJq3zAClIMHFwVXY6CvVBdqGZ4hAqMcmQVZr5K0TaxWEvuRPcX8eu bk0uDKQwN8csKPlrdKwxN3tkCrHM5xug0lCPslChw917uu4DbTGZoRoWDM5/Lk5Jaj7e QvJ8hHkJJAink4nvsmTiUn7kJYrY9+vve1oCpXZwZ7XdQjtM5u1Lw0MYaA5iXl5qIi40 Z/WS0fCNDWNUYu/9n1m7yxWcrQQJmKjR9HhRuXcGzdR6AwanuWjFyXaRq5BjmFfO+ILj pEgg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of cedric_hombourger@mentor.com designates 68.232.141.98 as permitted sender) smtp.mailfrom=Cedric_Hombourger@mentor.com Return-Path: Received: from esa2.mentor.iphmx.com (esa2.mentor.iphmx.com. [68.232.141.98]) by gmr-mx.google.com with ESMTPS id n6si87621iod.3.2019.11.07.01.24.17 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Nov 2019 01:24:17 -0800 (PST) Received-SPF: pass (google.com: domain of cedric_hombourger@mentor.com designates 68.232.141.98 as permitted sender) client-ip=68.232.141.98; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of cedric_hombourger@mentor.com designates 68.232.141.98 as permitted sender) smtp.mailfrom=Cedric_Hombourger@mentor.com IronPort-SDR: OvO8GS8g5VmIhS0kcmQnE+NkVaPp2CY1cMn316pw+yNCcWmkTOIR1VPlrkVAO2HZA5eih9swOU 9U5vmlzLSG9Oy8MUF/NuudW2BG+TPQuynwVraWAGb7QJI3ASyIj8+2s22PAU8kZJ0A/9pUWcB0 e6neI+f7scN9P3TE6Tp1E+YPjnA55Ftxy/FXYbsJNAQDRfQbFwp8JNbXUlD7kK7dRxJXilbLk6 pqhiEaON5bFVHyOwiVIF6H8BWgEvRhhsmdz5udn0Eo5DTKXPCQIQMiQdMFRok2hTc8QTD5jF/6 RUE= X-IronPort-AV: E=Sophos;i="5.68,277,1569312000"; d="scan'208";a="42888823" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa2.mentor.iphmx.com with ESMTP; 07 Nov 2019 01:23:52 -0800 IronPort-SDR: yvyZy8pGV+KhtMt0E0mVxcvGSWjRIjVAmEKOic3FNJmhv9wdqEF0a49BNZvUK2V2XXnGFEyU4L M9FTIOj9LvMIEUAyZ+Ehq8Wg+x+hYxi5cxxtLAtDXtO7m4oKHIoDRNVVS5HoIej+hN5oOjTfzi 7fElHy3tjs+numPGd7zoLtFANZfUl+sg+UM36D+21J+QJHIJqzxmNh2qbG78gO2Y6kNY+8oKbq UDLk9atNoqNjRhUckxA7qxXANNrEc6ojKVwv6LC5UKBfa804M3fqFcEFvBYkkCsASDwgBfduiu ZzI= From: Cedric Hombourger To: CC: Cedric Hombourger Subject: [PATCH L-C v2 1/7] recipes-kernel/linux: make KERNEL_DEFCONFIG support in-tree defconfigs Date: Thu, 7 Nov 2019 10:23:18 +0100 Message-ID: <1573118604-909-2-git-send-email-Cedric_Hombourger@mentor.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1573118604-909-1-git-send-email-Cedric_Hombourger@mentor.com> References: <1572962145-318-1-git-send-email-Cedric_Hombourger@mentor.com> <1573118604-909-1-git-send-email-Cedric_Hombourger@mentor.com> MIME-Version: 1.0 Content-Type: text/plain Return-Path: Cedric_Hombourger@mentor.com X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-02.mgc.mentorg.com (139.181.222.2) To svr-ies-mbx-02.mgc.mentorg.com (139.181.222.2) X-TUID: 9koagM3GyUB6 The recipe expected the specified KERNEL_DEFCONFIG to be provided as a SRC_URI while the kernel already provides many useful defconfigs. The recipe will now check if the specified configuration can be found in WORKDIR. If it is found, it will then be used via "make olddefconfig" as before. It will otherwise assume that it is an in-tree defconfig and attempt a "make foobar_defconfig" (where foobar_defconfig is the user-provided KERNEL_DEFCONFIG setting). To support this change, a KERNEL_CONFIG_TARGET variable is passed to the build-kernel.sh script via the environment. Signed-off-by: Cedric Hombourger --- meta/recipes-kernel/linux/files/build-kernel.sh | 6 +----- meta/recipes-kernel/linux/linux-custom.inc | 9 ++++++++- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/meta/recipes-kernel/linux/files/build-kernel.sh b/meta/recipes-kernel/linux/files/build-kernel.sh index b46cefa..386e58b 100644 --- a/meta/recipes-kernel/linux/files/build-kernel.sh +++ b/meta/recipes-kernel/linux/files/build-kernel.sh @@ -36,11 +36,7 @@ REPACK_DIR="$1/../repack" REPACK_LINUX_IMAGE_DIR="${REPACK_DIR}/linux-image" REPACK_LINUX_HEADERS_DIR="${REPACK_DIR}/linux-headers" -if [ -e .config ]; then - make olddefconfig -else - make defconfig -fi +make ${KERNEL_CONFIG_TARGET} || exit ${?} KV=$( make -s kernelrelease ) if [ "${KV}" != "${PV}" ]; then diff --git a/meta/recipes-kernel/linux/linux-custom.inc b/meta/recipes-kernel/linux/linux-custom.inc index b597e25..0c185d8 100644 --- a/meta/recipes-kernel/linux/linux-custom.inc +++ b/meta/recipes-kernel/linux/linux-custom.inc @@ -61,8 +61,14 @@ addtask devshell after do_install_builddeps dpkg_runbuild() { chmod +x ${WORKDIR}/build-kernel.sh + KERNEL_CONFIG_TARGET="${KERNEL_DEFCONFIG}" if [ -n "${KERNEL_DEFCONFIG}" ]; then - cp ${WORKDIR}/${KERNEL_DEFCONFIG} ${S}/.config + if [ -e "${WORKDIR}/${KERNEL_DEFCONFIG}" ]; then + cp ${WORKDIR}/${KERNEL_DEFCONFIG} ${S}/.config + KERNEL_CONFIG_TARGET="olddefconfig" + fi + else + KERNEL_CONFIG_TARGET="defconfig" fi E="${@ bb.utils.export_proxies(d)}" @@ -71,6 +77,7 @@ dpkg_runbuild() { export KERNEL_NAME=${KERNEL_NAME_PROVIDED} export KBUILD_DEPENDS="${KBUILD_DEPENDS}" + export KERNEL_CONFIG_TARGET export KERNEL_DEBIAN_DEPENDS="${KERNEL_DEBIAN_DEPENDS}" export KERNEL_FILE="${KERNEL_FILE}" export KERNEL_HEADERS_DEBIAN_DEPENDS="${KERNEL_HEADERS_DEBIAN_DEPENDS}" -- 2.20.1