From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6751292434813026304 X-Received: by 2002:a05:620a:2082:: with SMTP id e2mr4325878qka.81.1571907820367; Thu, 24 Oct 2019 02:03:40 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:620a:2092:: with SMTP id e18ls463364qka.16.gmail; Thu, 24 Oct 2019 02:03:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqxPx+SfAwu/okZ2/oT7ORXoNS1ooB0qtqIzxZ01TFB+d6MRB3buZV9jExa49vXGGOY6lTnu X-Received: by 2002:a37:396:: with SMTP id 144mr1607502qkd.479.1571907819826; Thu, 24 Oct 2019 02:03:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571907819; cv=none; d=google.com; s=arc-20160816; b=o50motylxyxDCxnstIWm5chCXygjlXLz4zYptv3/e/ppt137IdjgxjpLaW+7mcrktU NnyNNr/jITCH37Pc/TlpBYWwhg+gn+hmkor6WnNn2hTwmQRIFQxCegIQJglz9zadTIOb zWK+hd/4qjVyADb1I4PVK2WGS6KxG4zW7Nm/a3T/Vlh0ktWwEmexVUnoWAmYmDU8vQ/Z 4CSFt8hDu+UgRRI/WJ3uiOFFWhbJ+D+qs3WLqLLD+34fPkZ5/UmkEYaDPvnWKV2pTXXN hkWFMsHT8RqZ+26NLdmd7QCunmhNPItN/N14QWnVDRsYfruuCgA9CMDbNIlsbQkN2GYy AxZw== 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=G7yPIuqCuk91cpRXHdCVKIXR8sTmlRNgAf27Kv5tzvo=; b=Z7txU8V/26Q0P8L8WhO3aJs+i8ol90Xp21rRn18KhOv1wBVym5IZ+Bs+bglPUzBsZn Cd3nS/6zE3Pn0cy3EEw7mxNK35Xf97KoVB8GX7jEju1m4QR6F9FbVL/nIC5vhB5lKZvb KknUniStL1eAp38Erl6cDmGFbeuI1wZWK7Hd0WpYcg81b5p5LC3+O8gyx/VDuHCb+Wke /1SUYcxW0GecCJtdUYYlurFBz/oJie9mBuwGG2bks7rJJEaM6JJSW1nCzM+5enxAqTMq Wl2JmErHHkDf+xjnttXDtinH4HfLtqu5jgefr2VAT2DJqVQ7Gk6KBsg1wK+RUpMidVR3 eKwQ== 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 t53si1337870qte.2.2019.10.24.02.03.39 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Oct 2019 02:03:39 -0700 (PDT) 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: vwmoEGOrbnH+axv61y1y6LiyfGarVPTXBbJi5iafPOUF/vpZ5Wof2lKl1nPUzgcHLrbYYKg5on 0xZ5w9E2+Hhp5f2b5NTfSAXILItN//0PmS4WXxpuAqjNUbL2OjzTSrvxqMdoT5GdLmJqK8C9UC bK90s8Pe+GIWAY4AslJ14oxev0K+IZvm3+hRD6Z+r4oAK/6WyWm3Ak/ds7mq+zHnGScH7DIdhW geGwnmCz5wnlnAgGmffcrl53UlqCaRBPY/OCwiAMfuadNrN4ERcGyChEKWEvgnnyTJ1ZILSg2f Ka4= X-IronPort-AV: E=Sophos;i="5.68,224,1569312000"; d="scan'208";a="42545123" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa3.mentor.iphmx.com with ESMTP; 24 Oct 2019 01:03:38 -0800 IronPort-SDR: BQawLP++oNnJfJphlvpc8kfiOkfJ1pvCMdQ2D4t/YT68xKc67s0YGssv1uOI/vJFP9RtFIfChK qOh2kJbAJ3bE3Qc9htZY783DBRJ4zSaMLXeVbVFzHltIC0l6qgbt06wHwFDw1r/A4080Xsyigd 2bloeDnBYA1ByUzdncVaEukAngyTuJdYarb2tMWXE3KhLS12x13fDQJwzzn50xKflNFHtupcpy +jQBlgYWB9S4ahi8Kv3nbMBxXY1OwTt8bk2iBEr9xTyt6JgnLk/m/bDW2WR+3InKd4V8CC3Gn1 7/s= From: Cedric Hombourger To: CC: Cedric Hombourger Subject: [PATCH 04/10] recipes-kernel/linux: make KERNEL_DEFCONFIG support in-tree defconfigs Date: Thu, 24 Oct 2019 11:02:18 +0200 Message-ID: <1571907744-1121-5-git-send-email-Cedric_Hombourger@mentor.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1571907744-1121-1-git-send-email-Cedric_Hombourger@mentor.com> References: <1571907744-1121-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-08.mgc.mentorg.com (139.181.222.8) To svr-ies-mbx-02.mgc.mentorg.com (139.181.222.2) X-TUID: ybYvo/hHztuL 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). Signed-off-by: Cedric Hombourger --- meta/recipes-kernel/linux/files/build-kernel.sh | 6 +----- meta/recipes-kernel/linux/linux-custom.inc | 11 +++++++++-- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/meta/recipes-kernel/linux/files/build-kernel.sh b/meta/recipes-kernel/linux/files/build-kernel.sh index dcb46f7..cb310f7 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_DEFCONFIG} 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..c53cd90 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 - if [ -n "${KERNEL_DEFCONFIG}" ]; then - cp ${WORKDIR}/${KERNEL_DEFCONFIG} ${S}/.config + defconfig="${KERNEL_DEFCONFIG}" + if [ -n "${defconfig}" ]; then + if [ -e "${WORKDIR}/${defconfig}" ]; then + cp ${WORKDIR}/${defconfig} ${S}/.config + defconfig="olddefconfig" + fi + else + defconfig="defconfig" fi E="${@ bb.utils.export_proxies(d)}" @@ -72,6 +78,7 @@ dpkg_runbuild() { export KBUILD_DEPENDS="${KBUILD_DEPENDS}" export KERNEL_DEBIAN_DEPENDS="${KERNEL_DEBIAN_DEPENDS}" + export KERNEL_DEFCONFIG="${defconfig}" export KERNEL_FILE="${KERNEL_FILE}" export KERNEL_HEADERS_DEBIAN_DEPENDS="${KERNEL_HEADERS_DEBIAN_DEPENDS}" -- 2.20.1