From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6755821036247187456 X-Received: by 2002:a5d:5687:: with SMTP id f7mr2398576wrv.384.1574697913847; Mon, 25 Nov 2019 08:05:13 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a5d:5284:: with SMTP id c4ls7739693wrv.15.gmail; Mon, 25 Nov 2019 08:05:13 -0800 (PST) X-Google-Smtp-Source: APXvYqzExckgKD9H4zRlcmHO0IZ0lHzc8HEHxtyFKlKld4RqVBiJE9L98LDCswQf76GfYjr5hQXG X-Received: by 2002:adf:dd10:: with SMTP id a16mr8470179wrm.213.1574697913302; Mon, 25 Nov 2019 08:05:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574697913; cv=none; d=google.com; s=arc-20160816; b=om5Q2t6uIBSGEKWlDaFn2iqZ0h6pOmqVL4lDnME8wQrEzOcYU3WiuMx8j9FrYPFbsK Dxs8A+PMBZ2caXeHdSZwjcxPEhgqgaGQGe0+vMXdk9aMfPJ0yQT4xXSA9EQkFukvMx9S UPCrq6ngBCxgcnPD9If5fsITC2EeRmcnNEYHgaU5N5dwwZlXnEm+2nHCl9woI/nILdRf 2DLz03w2vOX4lVMwfbqXNy++HeCmIzTA0qCzHFHLqR8cZGGKiQdpgE5LRvLvdwk8nZkq 9GS6qPxZx1qfM8HpTa3s3eRfwyBiQaP4+qup6+NlNUFQzmeN6GyQuku2MKoK4EMhH/jC +/uw== 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=WlFp2ofsUvlOO9GUEdLX6apehpAOC6+N6NYcIIdUH0c=; b=JDDKGXXQkjcrjMS/AztY3QrJ/ls6YOHrsl6odrp42TF4K0k40XY/7xgrcNeenffcS/ wDNy/Iuzy+J26rmXy8czKjNUI4TKM34POOBT+sZ9T7sI8/1a2138ZGx7SnYJglJ5JB5v oNPN2OsrxYHqdtxFJEhMQf2frdGYv8rpDzdJzSR8IAMIiya6wcyWUPrrBenfSH7y6gvg HY+QMXB4OMnBQ6bJZRBlA2pqRGzKzDsWtgQr9uFf31NcCKEP/62Fsm2QYxhg6y3N5SfW e6XEdbOG1JwbcF90G86wG7Au2/uuQdCRwFUB/+Hgz/1xWb5XJOzCzPCjC8+QvYpG9wzb Uo2g== 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 h2si291823wre.0.2019.11.25.08.05.12 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Nov 2019 08:05:13 -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: JB4/3qdP7iakD0V2LK9WK5m8XjqQSx2jfzTamMyQPeN/0t4Y2lZVsXd2rO8xrlrIUPOmI2R6FW MUDn9d3+qSDxCAXoPwNQ/U/9HferC9zJ+hWwqCkqry0LhNjEo38ful/flHnUeqz9iqfuunquoz REbtPWvg5QBNucbbJOGk8fE1j7KCdEJ8KgZuUTTb1r3YlyHvG1Hmtnf55PaJ5l3wfFT5wF4HC9 3rsTRwth1tAvT747sUToZoLKKINAAxEyzEbdSfppU3kSRpd/rqbeicKfwD7EtDAu9a+SnjiuSi caQ= X-IronPort-AV: E=Sophos;i="5.69,242,1571731200"; d="scan'208";a="43486758" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa3.mentor.iphmx.com with ESMTP; 25 Nov 2019 08:05:11 -0800 IronPort-SDR: Nnpe/EJIsHuQjHlqjlj3kFbO/5h3I8xyLVWbqiC3NdS7D5QtIxDUq2zAlcSaHQmhLYBbjBnoc8 OW5nQdptqLBYgs5Pl/kQ8ZctxjWuSiY8v74ktFQS5jIz9luZLr2Mj1cY8WTsl2sr9/93B2YcNo 8PJnKEgqqP+0Z0jWwTyQYVDz0iZWYhWKpWC+TC55Ctprbz81vTKPvHvNEmoxoWQMm4SSwQyrYH jShsmIp7uULMUmOh8eSp8rLMkmBY6tuRwQuQg1w47U3n/4hQFYP457JgduEnmnYi28ht2nuRSv iAU= From: Cedric Hombourger To: CC: Cedric Hombourger Subject: [PATCH L-C v4 1/5] recipes-kernel/linux: make KERNEL_DEFCONFIG support in-tree defconfigs Date: Mon, 25 Nov 2019 17:04:50 +0100 Message-ID: <1574697894-825-2-git-send-email-Cedric_Hombourger@mentor.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1574697894-825-1-git-send-email-Cedric_Hombourger@mentor.com> References: <3c232836-fc03-b784-33e2-cc21393dfad7@siemens.com> <1574697894-825-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-07.mgc.mentorg.com (139.181.222.7) To svr-ies-mbx-02.mgc.mentorg.com (139.181.222.2) X-TUID: uLcMxb9TvTvc 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 17f8464..712f52b 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="${@ isar_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