From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6751292434813026304 X-Received: by 2002:a92:85:: with SMTP id 127mr5709346ila.118.1572025197305; Fri, 25 Oct 2019 10:39:57 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a5e:aa09:: with SMTP id s9ls1676985ioe.5.gmail; Fri, 25 Oct 2019 10:39:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqzx1Y2cqtDz6K/lZEKIPFsnTVxeYUMqIhTrqcimSTNxZzi0DR2snaKwGIagu3mZT5/PodWD X-Received: by 2002:a5e:c302:: with SMTP id a2mr4889632iok.295.1572025196963; Fri, 25 Oct 2019 10:39:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572025196; cv=none; d=google.com; s=arc-20160816; b=wVd8RO5dyXPxMghSFx8UVG1ciKGFgbR8PrRjeE6fCjn0ow7BMjAAymyic8c6Zq9ypm XGxfwEz5nCkwFAM3VuNNJs4a+0coCJ24Nrq4jkOlGYTDxymdJgenYBA1Dslv5hpo9wJe Ji0HB8VkiuEDzBzq9/YO4G4r/e2zn1HcqJAg/679lmIgHV7Pz9c2kooVMzRPiXKTFxvG 5/MiCrRnw66C1+AqxR0IhqRM1EbofJHyWv1/HVcHYA8XF2aHuei6H3ZkwcJ2eJyWKbIa FEwiYA/h3WVWdC4onIcwg8+yiyZB9aMDN/yj4RVRLNvXnYEHm/LT8g4o8bBhGpV0fGZz fovA== 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=mM7QP2Fflzonq99b0QuZQFSUfQZKrj7n5SLCGFdK1FY=; b=I2yd+Ry0093BxndN9e53UO//B5pVKZklGi87GPONDkSQBWXXgWcE+foXWHyrzvZFQo TbenFxcBTNtvX0Bk2ljDgVdPDq6ZBtDbpkGcTM+pYoKUk7TXH7KTFAOV85l/O0NvWZE/ jJUR0SyrJn7n7/LZsLVk54umRcB3wky/o9jk7Nh9WDAHvEew7tkWs5Umb60aSqlwHApR 9I6KYRWlW8i0kK1l7QQtsPY/54xnajkyLAU6XDrf3AWhuPlzyQ9rSdQqxDpoI41EKFXO fa8Y3EW6t3/C010YgTSYBh+hl12ludq/66HlyIWAbrUu0mnSXaIUbIYFdm/MMdQhduuu EIzw== 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 z130si224733iof.5.2019.10.25.10.39.56 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 25 Oct 2019 10:39:56 -0700 (PDT) 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: tKGf5H+TuuMEMPqMuDG0dQDHn/EXSB3bQHtUrmB55Ul4xAMwvOJywueo5+eBKTHBXpi8dm53aa TR+/seJ/vvuCLH3JTwdF4rBvblqqy4dDgZ9VBJYVr5zpI9y7YFQUr2TNTr5LUe5he9MePrxa/N vr/PvsnPJ/WIikMc5IsPyQu0UT5gkBeGjUTdWHYJ/vYq9dTPcu60bO2N+M4Z5BYpEXqjs5doN3 XUhGpGOgzJ981ZUD/nhwRakLXvLH25TbdDfO8P7qYbfucUhRU96lVcr+SMnsFaNFhEHg3TqJo0 VS4= X-IronPort-AV: E=Sophos;i="5.68,229,1569312000"; d="scan'208";a="42545361" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa2.mentor.iphmx.com with ESMTP; 25 Oct 2019 09:39:55 -0800 IronPort-SDR: ZHye7GIRpUKwZEt21sNjaNSMy52eGwI0hnjLcahvVB4eSDXSz7xGzJeUMB+8y4Mn/TIqh9iXNu 7TzTI0GjXfjHwfXrolfNg8f3nkTgyAzuLOuFCl7RaLYGJvbB9VkxgmQ0cJ77SazvBnTPqbInK6 S3bEhrtpvxwv1iOX5ExbV8eF4083RF+xTG1mIJsgpigd/IKW5N5y3LPDdCOoUpEHISZIzM2uf5 sDpizZfIL5nA61+aQu6b9wwj/puH/9PyTqjt1rJbJLX96YMvE87D6hhC1EaE7q3jh7VuSPEzOg 9hI= From: Cedric Hombourger To: CC: Cedric Hombourger Subject: [PATCH v2 3/7] recipes-kernel/linux: make KERNEL_DEFCONFIG support in-tree defconfigs Date: Fri, 25 Oct 2019 19:39:10 +0200 Message-ID: <1572025154-1312-4-git-send-email-Cedric_Hombourger@mentor.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1572025154-1312-1-git-send-email-Cedric_Hombourger@mentor.com> References: <1571907744-1121-1-git-send-email-Cedric_Hombourger@mentor.com> <1572025154-1312-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-01.mgc.mentorg.com (139.181.222.1) To svr-ies-mbx-02.mgc.mentorg.com (139.181.222.2) X-TUID: kCzEbsh+px3f 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 5a34dd1..0f7633a 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