From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7057120643105423360 X-Received: by 2002:a17:902:8644:b0:14f:cf95:648a with SMTP id y4-20020a170902864400b0014fcf95648amr4198365plt.138.1645732424460; Thu, 24 Feb 2022 11:53:44 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a65:450d:0:b0:34e:5e5d:84db with SMTP id n13-20020a65450d000000b0034e5e5d84dbls1427172pgq.7.gmail; Thu, 24 Feb 2022 11:53:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJxL9qhe69KkiDY91DoDMEWM3foM2UG927B1MS/632dcHB4ChgO7eBUpQ9ryuJe+J3QFQn0t X-Received: by 2002:a05:6a00:2402:b0:4e1:46ca:68bd with SMTP id z2-20020a056a00240200b004e146ca68bdmr4463618pfh.70.1645732423601; Thu, 24 Feb 2022 11:53:43 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1645732423; cv=pass; d=google.com; s=arc-20160816; b=NMDFGCw2U0DB6PmAlUOqmewXRiG+Xqt4PJcXRuO42Vtoeg6F/cLUUJr91qTKWegQoz jMRnuHk6b9dd88Ycoerxe6DW99DyYdKJjrnv5D9Cd5//T3wkjWZB6p/Wf/3pRCnf6d3D ArnIpz2TxyEr/CUKn41pBTbRNVlSOTxqy7quFnHlB5jqW+FtO3XhAONCvGwvuC23wC8I fzHEWMKecxh3Oq/nTNKkWJ28aCMblXMOwLGOGSEFFwHgYm478yO3g0vOrvdWsSpm+biU oHseyoR4T7aC0DqRBlHOBWLTuvtf57OWIWjXG2FRsb6UCFVKKDErPXOOPklf45oiFTq5 37dA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:content-transfer-encoding:references:in-reply-to :message-id:subject:cc:to:from:date:dkim-signature; bh=l1c1gp0UrEqhOgX8NZ02g9R/SU3uVwjWz61gI7it58Y=; b=jumhiIV6uekUG6JXZoB61KGZH4o/NR7kERRiZYjRk4s1bnJ75WeUrFd+i5DexGCou0 UAk0eyA4i1mlxpkCKS76IeIEqSmVv8PMW1z7x88Y6ALwUf4X2SJ6moMu5mcFVm/QMS33 sW+2xCCnLIKOKzz181naqRl/RyP6WG94w4rj1t/KRPVb6c7/dhut6GPuvTyN48YVpezr KPmuLUellpHlqw+v3vXJ9u6L5GhKgSlCHQrxT+YJgOua2p0kDQhPFHw4fbouw1JVMLJx mnPkcJpdWXUrIvsWbm2BcGj1EfEfCjiSihS8bzLcKpFvgMmfE/4winiY2tsWoEnyA9vr QIfQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=selector2 header.b=mDL9cv4I; arc=pass (i=1 spf=pass spfdomain=siemens.com dkim=pass dkdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of henning.schild@siemens.com designates 2a01:111:f400:7e1a::62b as permitted sender) smtp.mailfrom=henning.schild@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Return-Path: Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2062b.outbound.protection.outlook.com. [2a01:111:f400:7e1a::62b]) by gmr-mx.google.com with ESMTPS id n22-20020a170902969600b0014fd9b97da2si32700plp.0.2022.02.24.11.53.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Feb 2022 11:53:43 -0800 (PST) Received-SPF: pass (google.com: domain of henning.schild@siemens.com designates 2a01:111:f400:7e1a::62b as permitted sender) client-ip=2a01:111:f400:7e1a::62b; Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=selector2 header.b=mDL9cv4I; arc=pass (i=1 spf=pass spfdomain=siemens.com dkim=pass dkdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of henning.schild@siemens.com designates 2a01:111:f400:7e1a::62b as permitted sender) smtp.mailfrom=henning.schild@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Q52U69w+iB1TBNpJv2/gX2q+KLqftLCMlPqxcH0HPDuPo0eh1Nj1e2bf658kEGHqvWC/0SAf06FPwnm5wqruuxvgBAAOqDBtVILceZD4HVxlMm+pWRnKMti5GSZIvpWgKnSR5pNHTMPWs8SuBUlfnBeDWSd5c7NTyZxyqf56+FEOZIxAre26jJ4XybrNT+HR6u9rCGYlq1I3MwtVMECzfo04FPJY/KN8U+8F9Hx60GBye0UeCie0Nwp1qBZmemY68z00i74kl/VoYThEREWLAzM+A+3vwrti+leOVss4v65SOy6iH5vi1CMXsDA+84sp4TMkdsBIBM8hz2thuNp5Qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=l1c1gp0UrEqhOgX8NZ02g9R/SU3uVwjWz61gI7it58Y=; b=H8PxVBFXowYoCY1LP6EZaqwvK0ffOrpD5iao5/AdHLWDRK4k6KYHCGPbIKcPLV97si/nlgNRREA5c+JqexAwGTsV1Knb1ylA71WZrAHjo1w134LGK/9xxDzM8rbp+7CKwwAv0TL/v37Gd7l7z0PCq8wQF34Ecs82DE1tpAU9BlVYl1HECKuWa9UpvPTXGng1VZxj0oCfmjLBCU+KNLilKjBRqmGaDvb2wuwWUGlGDgJP90Nl1+BIcdN1iPeJPIjHwiIDSs/rOUVus30lW+K2ToewlKUxQNUmSlnYffYE+5Dqwyx2F4iQvWXNt/Mv4MeZwbp8aQ2gG95gMLuiVVuu+w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=siemens.com; dmarc=pass action=none header.from=siemens.com; dkim=pass header.d=siemens.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=siemens.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=l1c1gp0UrEqhOgX8NZ02g9R/SU3uVwjWz61gI7it58Y=; b=mDL9cv4IdUKvljvy3wiDIxqG2ssD3wv9ij6liEZ8DBR/iPZkkYrwMSfMNSk/as5r+k5M4tjs98UgU91HwP1wx/xEPL0F4AgZuw0cHHGMLdEpusy0Z0qPtXNUucxCjGmdKfXJV8pCpIpj//2crVvoV0l2Nt8srcliKAggpkzCACo9yBJ1Xc/90f9pcf5jZ2cpjsmLrNfHB2NoANWEWspd4KNGVOKtFBx5LoYQ6j3uJnrb5RpJCNfZO2QAt2znOxHtFhA0G0UGzXu4KP7YLlHf5hTqJ9SXEu0Fv7M2RIohXGUJsHraOcZ0LdXvzFvo6IRwzr5ZZSFfrn5+BlTal8/HVw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=siemens.com; Received: from AM0PR10MB3459.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:155::20) by AM8PR10MB4658.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:357::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5017.22; Thu, 24 Feb 2022 19:53:41 +0000 Received: from AM0PR10MB3459.EURPRD10.PROD.OUTLOOK.COM ([fe80::d433:79c4:958b:1551]) by AM0PR10MB3459.EURPRD10.PROD.OUTLOOK.COM ([fe80::d433:79c4:958b:1551%7]) with mapi id 15.20.5017.025; Thu, 24 Feb 2022 19:53:41 +0000 Date: Thu, 24 Feb 2022 20:53:37 +0100 From: Henning Schild To: Uladzimir Bely Cc: isar-users@googlegroups.com Subject: Re: [PATCH v5 9/9] linux-custom: Move cfg fragments applying to debian/rules Message-ID: <20220224205337.6489a559@md1za8fc.ad001.siemens.net> In-Reply-To: <2535027.fDdHjke4Dd@home> References: <20220213074111.23232-1-ubely@ilbers.de> <20834726.4csPzL39Zc@home> <20220224133657.66e1fc24@md1za8fc.ad001.siemens.net> <2535027.fDdHjke4Dd@home> X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-ClientProxiedBy: AS9PR0301CA0046.eurprd03.prod.outlook.com (2603:10a6:20b:469::6) To AM0PR10MB3459.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:155::20) Return-Path: henning.schild@siemens.com MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c55e7324-b9ab-4fe0-d19e-08d9f7cf5b1a X-MS-TrafficTypeDiagnostic: AM8PR10MB4658:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: y6QAxECtwaOxCEZ/Sortz7/Jtx6PoHGlQS3Hh50UQOUzml7AsLOco6juZXp2b+612xD3aXA22d9zUj/hVTpJfCNLhQR0ufIhH+mgScpFYyRODxJ79EzukfZ2NbE1zeSwoUJN+OdJrzU5j0Or3UgeGp7pPjdTXHD8j2DzYyn1kKsNONVSktOxCARSuJ5/EYc6vMmggKoUb9IxVdKQJPqxItt1WL7uKcSKiVkujEFen57AguEAb+OKy71bekXZIPqU/oJbvdO57UUzpCvElvgFHKxdmWGpZEIGIBPOeBuHdq+bbulwPZ0K5Dj+7lZ6tkJGdqOFwBSbwGo7XxEE4WvUNNdxQ7hfL5MQjvc4p2Rx1CoG9WWzvozGW4b3yzNDuzz6agp17tVOvIAfSEtosRsjmL78z7t6w5ZPujVRWqypGiinythZgI+FR8psOUh44/YFO/W6w3tsMAf7xe4iYMvSHINJPQV+NRaXI3Dc5ZlrpZigBOT6ebQfpiassP57YugPJ6r+30uIRCOHgu1mvCuzvqUlUqnX0whtXfCmibWr3iWcJjemJwXesSBjv/NpF0B7g6c2Hdi+Y/NgjZfBtI8H020PXyd3W72rRBVqTap1K00Zhg76iC6o06wqHAEaygd/QCO9KcPW5YaF+HcMeISwOA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM0PR10MB3459.EURPRD10.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(4326008)(66556008)(66946007)(8936002)(66476007)(8676002)(6506007)(316002)(6512007)(5660300002)(6486002)(44832011)(30864003)(6916009)(6666004)(508600001)(86362001)(1076003)(2906002)(9686003)(186003)(83380400001)(38100700002)(82960400001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?moqlTO1OSMxr7DMl6jvQ4vyz1aYABuTVSlpBVtRCGG8PKlLa4MyrvREpfzqz?= =?us-ascii?Q?DtRDBOCv6Cbs8qD4F7kUVqSel5i3eFPHt2dhqlNgTavxExRSrL31D50tOfjz?= =?us-ascii?Q?XrExVvQUbMHvN2LpQjkSZRP47fe2sfkuyqI+2GMKmEolC1GzXgLZnGBc/wot?= =?us-ascii?Q?BTuHJEHo9G5ggT5CluJNlCJ5Q7cDm8bLrVrXO7nuAxUcelH9Azj5ZJfBAIH7?= =?us-ascii?Q?PV1wz7ITG9HXPA5/qpp30zBOBxvR0FJlEM/xXAv4jbdpGyEV5X5JBUKoqP2g?= =?us-ascii?Q?S42iJt4T+MxLi6MCKiy0LORhXhqx1JnSuRulS2uwJS3M3LMAQJ3/Ym0AoJ3v?= =?us-ascii?Q?mQtRxH7fnn2J39Q/7+snBNdIrOeLXQLs64uAYaj5UZWOfRlrB3CTDN8iyS/r?= =?us-ascii?Q?AfAjHcNwaOd87OZEStK7q/Sr5B1dwk+10Rvl2Hjf6O3tQbJ5RiNeN9Lw5GWf?= =?us-ascii?Q?jFIEk9suR54b/oSgV6ELAosc2Gyc+d0lX6Ax/5GN83t7yfJS60fgMEQ+8gAW?= =?us-ascii?Q?SoCr4jS4eIIRa+dbxG7V9u88ceuTgLHliPKGcNfvJUyunn/EaYQUVI9FB020?= =?us-ascii?Q?N2/LQHEgSGt5MbYGCa1ZkOplepsNWROW1lrBVOU15vcN0wxHGP/JlFlEcRnT?= =?us-ascii?Q?ABpJdBi6Uh4e+TulIOgzdkiqj5r5ERn1U4dcDMzzL/bFiJxkhtjS1GWyJy6n?= =?us-ascii?Q?lE/J2kLN9kFFfXBPDgxnUUBeVz2VVP8WlQiDuxjeFK14wFafggaVxt3RdlT3?= =?us-ascii?Q?uabnjOZJt1Jx1hCwB3ZFkl1ZLUlo7vjsQ1R0EKb27W6mR8H8ikdD3vXme20r?= =?us-ascii?Q?shXzRJXQqC3wwqAe93XKYIpSf+O5la+hat7gs77tz+9FP5M+W2g64CYf7YCr?= =?us-ascii?Q?D7InDbf6v7gnDubbtumdvcGuiMfVul/64x4BZNgWcLlrXM0CQCUD9KOjvmlb?= =?us-ascii?Q?STSI/RZlsNtlZiPLgfuFEYBVi4+cggXzxQ9y5IMKpfb7a28XeKCoPN1ZuM+a?= =?us-ascii?Q?Ns1TSBUB50Hyl8jw9LjcRQSQwfaDxOZY4rR0uGmtdloXje0gL34Z681xAZOd?= =?us-ascii?Q?AlDucc5HzXyr/nRgQ+y7T6hTakYzYjnn7us9r1Z2CL+zxz0qsc0W3LspN84E?= =?us-ascii?Q?BRBWscVEiTlpH3hgEEs9Dd9H+DpBYhhY/e6ZRKEpCPdwgs+sB+I2EdSmSJCH?= =?us-ascii?Q?hkHlfYUCxTTh+EPg/WVOlOPTgqu060nAvHu8TV1eWpxt+bH9WUupSkTSx11q?= =?us-ascii?Q?/KL8VHPVeItxSJikRhTNZS1NgT8ZxfoB3pDh2RxXkRIJWtpEhqYxRKY42RGR?= =?us-ascii?Q?GvpyGLXRmWZG5gib5YTS2lHvzzkMjKOtAAjZb4UOQtEkfjYkl7Z31VcnufU8?= =?us-ascii?Q?35/vbW5FpKLlBGPaYlCQUH0zD8fXhEn7nlsICZKUUDglWffcaOEpMcY94O96?= =?us-ascii?Q?ds1kcYqgenRqUu8cJxydvPtHTyiTY+JNXphvh5u8Drizt5yKQuQSdtm5PT13?= =?us-ascii?Q?mTMExjMRY8OPBVIjpcNCJBW/s2NCSDbLetifZcfiTbpjMJV+092o0PQVFMrB?= =?us-ascii?Q?BkQ3RwFpmUE0DNvTXU+6k9LgQFQR9xzexiJmR1X5+fqsAkuZBmWnNr/pfO9v?= =?us-ascii?Q?T5xpiONFnynTxcvoMUBIw5rJBTaZ34YA+WAfBWkHS9DYvuB5AdxUe/TbMZmY?= =?us-ascii?Q?rul7hRs+JEYBrhiUsqbmBUOWWJRkFrN/c6qnoVNmHnnisjHNF8Hc5M8dn3xl?= =?us-ascii?Q?jg1nuO/0F1d2GHAGqVvFEiIaEBs3WdY=3D?= X-OriginatorOrg: siemens.com X-MS-Exchange-CrossTenant-Network-Message-Id: c55e7324-b9ab-4fe0-d19e-08d9f7cf5b1a X-MS-Exchange-CrossTenant-AuthSource: AM0PR10MB3459.EURPRD10.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Feb 2022 19:53:41.0754 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 38ae3bcd-9579-4fd4-adda-b42e1495d55a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: IS40PxmsgIX2Y2WAtdndvTey90aOxr4hHj4H7ZXh1/ubCTsTJiqiojIGeRBftz0aI4/zpJJZU+6OH4BypAg4Fzz18aeiUeqw5sWlAX+/3lU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR10MB4658 X-TUID: XSvrWNvmxmyH Am Thu, 24 Feb 2022 17:49:17 +0300 schrieb Uladzimir Bely : > In the email from Thursday, 24 February 2022 15:36:57 +03 user > Henning Schild wrote: > > Am Thu, 24 Feb 2022 12:09:00 +0300 > > > > schrieb Uladzimir Bely : > > > In the email from Wednesday, 23 February 2022 16:53:03 +03 user > > > > > > Henning Schild wrote: > > > > I just ran into an issue with that not actually finding my > > > > config in WORKDIR and now trying to go the KBUILD_DEFCONFIG way > > > > > > > > Am Sun, 13 Feb 2022 08:41:11 +0100 > > > > > > > > schrieb Uladzimir Bely : > > > > > Prepare linux fragments applying in Debian way. > > > > > > > > > > This allows to avoid pre-build chroot call used for merging > > > > > kernel config file and custom config fragments. Also, shell > > > > > exports are not used anymore in favor of template files. > > > > > > > > > > Signed-off-by: Uladzimir Bely > > > > > --- > > > > > > > > > > .../linux/files/debian/isar/configure.tmpl | 19 +++++++ > > > > > .../linux/files/debian/rules.tmpl | 3 ++ > > > > > meta/recipes-kernel/linux/linux-custom.inc | 53 > > > > > > > > > > ++++++++++++------- 3 files changed, 55 insertions(+), 20 > > > > > deletions(-) > > > > > > > > > > create mode 100644 > > > > > > > > > > meta/recipes-kernel/linux/files/debian/isar/configure.tmpl > > > > > > > > > > diff --git > > > > > a/meta/recipes-kernel/linux/files/debian/isar/configure.tmpl > > > > > b/meta/recipes-kernel/linux/files/debian/isar/configure.tmpl > > > > > new file mode 100644 index 00000000..83871baa --- /dev/null > > > > > +++ > > > > > b/meta/recipes-kernel/linux/files/debian/isar/configure.tmpl > > > > > @@ -0,0 +1,19 @@ +#!/bin/bash > > > > > +# Copyright (c) Mentor Graphics, a Siemens business, 2019 > > > > > +# SPDX-License-Identifier: MIT > > > > > + > > > > > +# Load common stuff > > > > > +. ${S}/debian/isar/common || exit ${?} > > > > > + > > > > > +do_configure() { > > > > > + > > > > > + # Process kernel config target and fragments > > > > > + ${MAKE} O=${KERNEL_BUILD_DIR} ${KERNEL_CONFIG_TARGET} || > > > > > exit ${?} > > > > > + ./scripts/kconfig/merge_config.sh -O > > > > > ${KERNEL_BUILD_DIR}/ \ > > > > > + ${KERNEL_BUILD_DIR}/.config ${KERNEL_CONFIG_FRAGMENTS} > > > > > + > > > > > + # Stop tracing > > > > > + set +x > > > > > +} > > > > > + > > > > > +main configure ${*} > > > > > diff --git a/meta/recipes-kernel/linux/files/debian/rules.tmpl > > > > > b/meta/recipes-kernel/linux/files/debian/rules.tmpl index > > > > > 05a26fe2..a1166287 100755 --- > > > > > a/meta/recipes-kernel/linux/files/debian/rules.tmpl +++ > > > > > b/meta/recipes-kernel/linux/files/debian/rules.tmpl @@ -22,6 > > > > > +22,9 @@ > > > > > > > > > > isar_env=$(strip \ override_dh_auto_clean: > > > > > $(isar_env) && bash $(deb_top_dir)/isar/clean > > > > > > > > > > +override_dh_auto_configure: > > > > > + $(isar_env) && bash $(deb_top_dir)/isar/configure > > > > > + > > > > > > > > > > override_dh_auto_build: > > > > > $(isar_env) && bash $(deb_top_dir)/isar/build > > > > > > > > > > diff --git a/meta/recipes-kernel/linux/linux-custom.inc > > > > > b/meta/recipes-kernel/linux/linux-custom.inc index > > > > > 59d42c84..ea1abf76 100644 --- > > > > > a/meta/recipes-kernel/linux/linux-custom.inc +++ > > > > > b/meta/recipes-kernel/linux/linux-custom.inc @@ -52,6 +52,7 @@ > > > > > TEMPLATE_FILES += " \ > > > > > > > > > > debian/isar/build.tmpl \ > > > > > debian/isar/clean.tmpl \ > > > > > debian/isar/common.tmpl \ > > > > > > > > > > + debian/isar/configure.tmpl \ > > > > > > > > > > debian/isar/install.tmpl \ > > > > > debian/isar/version.cfg.tmpl \ > > > > > debian/linux-image.postinst.tmpl \ > > > > > > > > > > @@ -71,6 +72,8 @@ TEMPLATE_VARS += " \ > > > > > > > > > > KERNEL_HEADERS_DEBIAN_DEPENDS \ > > > > > LINUX_VERSION_EXTENSION \ > > > > > KERNEL_NAME_PROVIDED \ > > > > > > > > > > + KERNEL_CONFIG_TARGET \ > > > > > + KERNEL_CONFIG_FRAGMENTS \ > > > > > > > > > > " > > > > > > > > > > inherit dpkg > > > > > > > > > > @@ -146,41 +149,51 @@ do_prepare_build_prepend() { > > > > > > > > > > # build directory for our "full" kernel build > > > > > KERNEL_BUILD_DIR = "build-full" > > > > > > > > > > +def get_kernel_config_target(d): > > > > > + kernel_defconfig = d.getVar('KERNEL_DEFCONFIG', True) > > > > > + > > > > > + config_target = kernel_defconfig > > > > > + > > > > > + if kernel_defconfig: > > > > > + workdir=d.getVar('WORKDIR', True) > > > > > > > > > + if os.path.isfile(workdir + "/" + kernel_defconfig): > > > > > > > > > Doing that at parse-time when assigning the variable > > > > KERNEL_CONFIG_TARGET can not work. Some task in the task chain > > > > might need to create that file first ... > > > > fetch/unpack/fiddle-with > > > > > > > > Checking if the file exists at parse time seems very wrong. I > > > > guess this patch needs to be reverted and rewritten and i guess > > > > the test suite does not properly cover kernels custom defconfig > > > > > > > > > > Yes, you are right, this moment is wrong. > > > > > > I guess, it can be fixed by passing KERNEL_CONFIG_TARGET to > > > 'debian/*' by direct appending from the recipe task (instead of > > > template way). > > > > > > I'll try prepare a solution soon. > > > > Cool, > > > > i would even suggest a revert because that breaks kernel builds in > > layers. I reverted just that one and my layer worked again. > > > > I will look into writing a patch to the testsuite, covering the > > olddefconfig path. > > > > Henning > > > > Please look at "linux-custom: Set KERNEL_CONFIG_TARGET at build time" > patch that should solve the issue you've described. > > While we have custom configs only for amd64 machines, but we have no > in Isar amd64 machine with linux-mainline (or linux-cip) that define > some custom config file in workdir, I just tested it on > bullseye-amd64 with separate buildi linux-mainline by bitbake. > > It seems now it works and properly detects and uses x86_64_defconfig > in workdir, while the stuff is moved to dpkg_configure_kernel() which > technically is a part of dpkg_runbuild. I failed to write a patch to test the "olddefconfig" path based on mainline and cip. These recipes for some reason are not affected, i guess that python function got executed multiple times. Probably once before the template stuff kicks in. One more thing i found is that they use "x86_64_defconfig" as a file name, which unfortunately also is a valid "make target" which would just work with no ".config" and not use our custom config. But that turned out to not be a problem. I bet there is room for better testing but i currently do not have an idea on how to do that. Let me think about it and i might come around with a patch, for now it seems good and quick turn arounds on layer testing and next fixing seem to work well. There is only so much that upstream can and should test. Henning > > > > This is how one can rebuild a debian kernel > > > > > > > > KBUILD_DEPENDS += ",linux-config-${PV}" > > > > > > > > KERNEL_DEFCONFIG="${P}.conf" > > > > > > > > do_take_debian_config() { > > > > > > > > xzcat > > > > > > > > ${BUILDCHROOT_DIR}/usr/src/linux-config-${PV}/config.${DISTRO_ARCH}_none > > > > _${ > > > > DISTRO_ARCH}.xz > ${S}/${KERNEL_DEFCONFIG} } > > > > > > > > addtask take_debian_config after do_install_builddeps before > > > > do_dpkg_build > > > > > > > > Maybe that could be used for writing a kernel test recipe > > > > actually going the "olddefconfig" way in case we do not yet > > > > have one. > > > > > > > > Henning > > > > > > > > > + config_target = "olddefconfig" > > > > > + else: > > > > > + config_target = "defconfig KBUILD_DEFCONFIG=" + > > > > > kernel_defconfig > > > > > + else: > > > > > + config_target = "defconfig" > > > > > + > > > > > + return config_target > > > > > + > > > > > +KERNEL_CONFIG_TARGET = "${@get_kernel_config_target(d)}" > > > > > + > > > > > +def get_kernel_config_fragments(d): > > > > > + src_frags = " ".join(config_fragments(d)) > > > > > + out_frags = " ".join(map(lambda frag: > > > > > 'debian/fragments/' + frag, config_fragments(d))) + > > > > > + linux_version_extension = > > > > > d.getVar('LINUX_VERSION_EXTENSION', True) > > > > > + if linux_version_extension: > > > > > + out_frags += " debian/isar/version.cfg" > > > > > + > > > > > + return out_frags > > > > > + > > > > > +KERNEL_CONFIG_FRAGMENTS = > > > > > "${@get_kernel_config_fragments(d)}" + > > > > > > > > > > dpkg_configure_kernel() { > > > > > > > > > > - config_target="${KERNEL_DEFCONFIG}" > > > > > > > > > > rm -rf ${S}/${KERNEL_BUILD_DIR} && mkdir -p > > > > > > > > > > ${S}/${KERNEL_BUILD_DIR} if [ -n "${KERNEL_DEFCONFIG}" ]; then > > > > > > > > > > if [ -e "${WORKDIR}/${KERNEL_DEFCONFIG}" ]; > > > > > then > > > > > cp ${WORKDIR}/${KERNEL_DEFCONFIG} > > > > > > > > > > ${S}/${KERNEL_BUILD_DIR}/.config > > > > > - config_target="olddefconfig" > > > > > - else > > > > > - config_target="defconfig > > > > > KBUILD_DEFCONFIG=${KERNEL_DEFCONFIG}" fi > > > > > - else > > > > > - config_target="defconfig" > > > > > > > > > > fi > > > > > > > > > > # copy config fragments over to the kernel tree > > > > > src_frags="${@ " ".join(config_fragments(d)) }" > > > > > > > > > > - out_frags="${@ " ".join(map(lambda frag: > > > > > 'debian/fragments/' > > > > > + frag, config_fragments(d))) }" > > > > > - if [ -n "${LINUX_VERSION_EXTENSION}" ]; then > > > > > - out_frags="${out_frags} > > > > > debian/isar/version.cfg" > > > > > - fi > > > > > > > > > > rm -rf ${S}/debian/fragments > > > > > if [ -n "${src_frags}" ]; then > > > > > > > > > > mkdir -p ${S}/debian/fragments > > > > > (cd ${WORKDIR} && cp ${src_frags} > > > > > > > > > > ${S}/debian/fragments/) fi > > > > > - > > > > > - sudo -E chroot --userspec=$(id -u):$(id -g) > > > > > ${BUILDCHROOT_DIR} sh -c " \ > > > > > - export ARCH=${KERNEL_ARCH} && > > > > > > > > > > \ > > > > > > > > > > - cd ${PP}/${PPS} && > > > > > > > > > > \ > > > > > > > > > > - make O=${KERNEL_BUILD_DIR} ${config_target} > > > > > && > > > > > > > > > > \ > > > > > > > > > > - ./scripts/kconfig/merge_config.sh > > > > > > > > > > \ > > > > > > > > > > - -O ${KERNEL_BUILD_DIR}/ > > > > > > > > > > \ > > > > > > > > > > - ${KERNEL_BUILD_DIR}/.config > > > > > > > > > > \ > > > > > > > > > > - ${out_frags} > > > > > > > > > > \ > > > > > > > > > > - " > > > > > > > > > > } > > > > > > > > > > dpkg_runbuild_prepend() { > >