From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6755821036247187456 X-Received: by 2002:a5d:4dd2:: with SMTP id f18mr6551239wru.4.1573196875852; Thu, 07 Nov 2019 23:07:55 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:adf:9d8b:: with SMTP id p11ls5305645wre.7.gmail; Thu, 07 Nov 2019 23:07:55 -0800 (PST) X-Google-Smtp-Source: APXvYqyW5QjM53SCawpirt6wUukvrxaIXV7hR+B0a/qwz4vAUDq8gc3XWEZJmgO0iN+JyE+AT9f2 X-Received: by 2002:a5d:640d:: with SMTP id z13mr7369448wru.68.1573196875322; Thu, 07 Nov 2019 23:07:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573196875; cv=none; d=google.com; s=arc-20160816; b=GNbRKj/LlXtGkkiXrhRQtv1FM0ofv2/2gtYbrhbhY+8t13j4/zzbZVQMZYZd31J46R Zgh0CVTRxmenH0WqD9FSDiuAKpxF2FbRRGSF08JBKVcqd6dY5HVoXWOaZknzJFXvjED8 3QyNJx20JnVMo5Fn8tr5qABFvwyRBbd8WdFgb9ZdelC3qDzBTNxJ7Ov12+0cCnq2TucJ 3liwqw2k8xqBxsoPgepwLUV/wc3/35XvxJ0/nxSG5TUrd2AwGwOFQMgD2uWI9pm+H7R2 ouj5du4U1/Zym1wv7zBWlN/d6cydx9x2xtwGH5bZJCrl4Lzy8guktmGn7+3rXg/N4d3+ OXXA== 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=aRf23vEOvHZ6zMF6C5WQq/Z5mol8R7+sHnRWhAJjlnUcuqmr+CvO9+aRPb0uzxR5yC gnj4Q7PHZ/gOuZj+7YU9Dip6E4AzE19FYzf8i5g/GOSfq7hUUS8NYcCpyhhVWwvgT6p4 Od384l253LqNEXKBo0uhy3SaYEo9D2aKCCS7WPuhxBCBztQqYnNn/wqpmDzeMBe0YvOm Hp5nf5jf95skGZoCjER58R6UVtWS4V6aUMoEj0bDbwaz8dSGPP5w2FqIGG3de2D4wwQS Pm6rxs4UX3Z43kylJQkUt1DkGTPvHTEKuVR90Nrzz69gyg5HcLlhCW0GoW/ffCujpE0q ygpw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of cedric_hombourger@mentor.com designates 68.232.137.180 as permitted sender) smtp.mailfrom=Cedric_Hombourger@mentor.com Return-Path: Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com. [68.232.137.180]) by gmr-mx.google.com with ESMTPS id y140si331310wmd.0.2019.11.07.23.07.54 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Nov 2019 23:07:55 -0800 (PST) Received-SPF: pass (google.com: domain of cedric_hombourger@mentor.com designates 68.232.137.180 as permitted sender) client-ip=68.232.137.180; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of cedric_hombourger@mentor.com designates 68.232.137.180 as permitted sender) smtp.mailfrom=Cedric_Hombourger@mentor.com IronPort-SDR: WLCRRjlZQ8WLkakMKgShjozZNs0lV1RyQEzkWjEsLMPbKFCYRXHSZQ4Qmfzw+R6dwSeCo5YVsf +oGxylQXiJlvpEG8+ICPFo5fJONxDDI4yD2l12SEoatlFBUH5atTIj9LjWQRCjS15yHWIjK724 rqA5nmg5biLmYvFGtE3HqpavAHcxVDOqjBROCsIJ5tJ7TtK8GjIXzezYsjAlaMlITSvPICUeS7 uvT997yVGpBaCAbjx2y4tqmBhXHMMKHM0psKtxUTMHyB8WCDyuS5+unTqmktK7U55pLlTTAXL8 YOM= X-IronPort-AV: E=Sophos;i="5.68,280,1569312000"; d="scan'208";a="42989983" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa3.mentor.iphmx.com with ESMTP; 07 Nov 2019 23:07:53 -0800 IronPort-SDR: tY5/uOVnV9mgzRnaFFPUqTkyXk68zlUufff4Ec5YQv43qS6bvrpIoHyEG3EhYOF8HbuA2fvxFz yDEnZpJWG34radFYjso60f6JGuu2nmUFPgBw3WKcfKGruFMm1ziEsZJ6hzqpi9xwGmRWUwBrAs longwTSnjq5KNQ710nikReDdCE+qD2Vi9F6HmD6MkG8ksFSGcBc3xaprDSgSWYyrLhty9AZTQ8 eNRGVHwvE3koNe6yDqlvoJAJ4dN4BZopD+nc6LElvns5DB+hny/PsB/8L4jasKBrZHlJYkhWtX 9rM= From: Cedric Hombourger To: CC: Cedric Hombourger Subject: [PATCH L-C v3 1/7] recipes-kernel/linux: make KERNEL_DEFCONFIG support in-tree defconfigs Date: Fri, 8 Nov 2019 08:07:13 +0100 Message-ID: <1573196839-1143-2-git-send-email-Cedric_Hombourger@mentor.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1573196839-1143-1-git-send-email-Cedric_Hombourger@mentor.com> References: <1573118604-909-1-git-send-email-Cedric_Hombourger@mentor.com> <1573196839-1143-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: xpkWPTo3QK0G 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