From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Thu, 09 Dec 2021 11:53:02 +0100 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1mvH2r-0010Wz-Ta for lore@lore.pengutronix.de; Thu, 09 Dec 2021 11:53:02 +0100 Received: from localhost ([127.0.0.1] helo=metis.ext.pengutronix.de) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1mvH2r-0008TB-6p; Thu, 09 Dec 2021 11:53:01 +0100 Received: from mail-am6eur05on2059.outbound.protection.outlook.com ([40.107.22.59] helo=EUR05-AM6-obe.outbound.protection.outlook.com) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mvH2j-0008Sr-Fo; Thu, 09 Dec 2021 11:52:54 +0100 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=X/KKHg5wsXZ0YPC7uzxZnW1YaFvHrV2jwDux/7XSha2oKMduj07LUFbnTJIwUwQkFd+0jNIENm621IIR2ZB8Uw1VaddlS6p52WRdoNzugQ5m5A3kyG+7uOG/V3zG4ygn0/2lCDzP5xR3h58G6dIp7v+w4yx4necr3dDNMeF0t0Vss/XaHPUren2e8gepd93FsIBYISn/ugBu2fRK4uX3bZbVp+zjkRdE3lu5u/zpS7s7zhbpW12qExGTkhP8NR9swMW7+SD6maBPVfUYUK8yOSle+kPslyzMVW5IvTvb8/EyPoCl5qIg0VT6k3Y7xV50Ahsib/BmnCcn8hzVHAP2QA== 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=6qoQWW7hQyh6iLGmon3HG3mmfXAO4QwhHS3AHnXLTpQ=; b=QqPz8r4DJvPjIgTNeWqreK9flvJzQfUIJlP+kT210i4t9pMSO1GL4yrr1EskrZOObJUB9G8+RmSyR+ZaCGbhFykuSLIdjbl0qMf3VqItRQjRfgui8VcwPtRFzkkHfeNDrc/KP8o+x/i4LTAOGNgwAQYogkjIhUprcLfOOPe1qoomDlAsCD1fLvVX6eIKwYOXSGCJ6EK1Wjg4XIisrduaFDAu4f8z5VbAvtGkh9c3aNoEd0Dak5eiabpkJG7mpeDSZV/I2LMZKPjbduggl10Uf06d4G3dcOdr/hiz0f9Cb3AroWl7UI2MrMKPMlkfKQtL6RhntCotBynuggQHIuLfeQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wolfvision.net; dmarc=pass action=none header.from=wolfvision.net; dkim=pass header.d=wolfvision.net; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wolfvision.net; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6qoQWW7hQyh6iLGmon3HG3mmfXAO4QwhHS3AHnXLTpQ=; b=1g0E9oXgBqnAXY1vjel2ZO1ZkV7kLlvUFB6qXODSNx9bTK0lNzLyBKc8yo/pTfhXCw3isTTPV0lESdG4kYjtAyOQlYvkobySzpZBBqZW73WSvIysKKxpZwBPTQ9rSRPVrVTSEFZSA7GuARRb0xF48ZAJBeXpaoPlRdoSTxG7wSg= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=wolfvision.net; Received: from DBBPR08MB4523.eurprd08.prod.outlook.com (2603:10a6:10:c8::19) by DB6PR08MB2919.eurprd08.prod.outlook.com (2603:10a6:6:1e::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4778.11; Thu, 9 Dec 2021 10:52:50 +0000 Received: from DBBPR08MB4523.eurprd08.prod.outlook.com ([fe80::81d1:d448:4016:1956]) by DBBPR08MB4523.eurprd08.prod.outlook.com ([fe80::81d1:d448:4016:1956%4]) with mapi id 15.20.4755.022; Thu, 9 Dec 2021 10:52:50 +0000 To: Christian Melki , ptxdist@pengutronix.de, m.tretter@pengutronix.de References: <20211207153905.2386379-1-michael.riesch@wolfvision.net> <20211207153905.2386379-2-michael.riesch@wolfvision.net> <5d9dbc5e-8330-34cd-3a4b-859ebfae277e@t2data.com> <20211208083149.GF15196@pengutronix.de> <0ee4879b-13d2-44dc-e963-09b880a6f310@wolfvision.net> <20211209085356.GM15196@pengutronix.de> <132c595a-f8e4-a7c6-c830-d0911eb0f920@wolfvision.net> <20211209104632.GP15196@pengutronix.de> From: Michael Riesch Message-ID: Date: Thu, 9 Dec 2021 11:52:48 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 In-Reply-To: <20211209104632.GP15196@pengutronix.de> Content-Language: en-US X-ClientProxiedBy: ZR0P278CA0036.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:1c::23) To DBBPR08MB4523.eurprd08.prod.outlook.com (2603:10a6:10:c8::19) MIME-Version: 1.0 Received: from [IPv6:2a05:1141:1c9:7c00:2971:328c:3026:3149] (2a05:1141:1c9:7c00:2971:328c:3026:3149) by ZR0P278CA0036.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:1c::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.16 via Frontend Transport; Thu, 9 Dec 2021 10:52:49 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3ef35213-fe41-4e4c-b3e6-08d9bb020b2a X-MS-TrafficTypeDiagnostic: DB6PR08MB2919:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6790; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: AcA6DUESTIItjd6YQBVK8leh1Fp0B9Iw8CrsHh0G3z6dB0FrlALyB90CD0NZhx0mUuxc/lDum5KoYIkMvScwKmrHJqmqWsh/EC0Q4sQQmFuwPb/u7UCXctFyx5ntXK5KUg1SKfq0oDr/WlSJCixjAmSY0nU1QlMnja+lYFlOS2G6LsLReTBkZd3osRbxyghVrJQBXqYQg356jbGgw5NwATpJoayR5aO2EhDdDBD/k1ctLxrjYAScMQ4pokxLLTlumvnahtoGClGuFftY9EZIB5g/5TwBdxFL4AHvo2DR55fW9q0wa+af64hXjQMdxya1HqnCkWGwe7aBSEZWHEyfaYVp8tzKv/n6I5d/z2BuqzR+nKUzz1kPNlQE7LPJQlZAitnyTk561nB3hwDLtwDWXuUOxJAzox5WiMdj6oBt0vKUimGcx2VpEgqJoDMr2AlFhZ33No6lzeq2UqJBcTxY1lCgmIc/g95lUn0JT0UoLE11QH1ztDeVppWoUdKxu4uqJTGgqhvBuzL17xn+hmYtHdjbfqGLUXoDjy6u4gdZuTZX6H8pORnVQOFWExd1YFpOBkJJmxlAUrRel0+NRSkggLiuCg+JV2LmEJOzcLxER6ZnqCB+OyZ6lSVJLs/Tr0pLv/ism2P33Ynp7OeUaspGj1qL77smuxCddk+WKAWgG21bdcuPwKBz+reDPEqlHhZxk7wf/BOmabEql5SswiYxRG0evhRq8nAyj0YeFJcXl2Kp52RI0CEmLJNSf9e47yb2ttuatVV9+5BguRgcQpO56Me3q0gDkY0mEBBvOc8BSJF370TJNrVUTOtNAcMq5eSQ X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DBBPR08MB4523.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(31696002)(30864003)(66946007)(52116002)(66476007)(66556008)(53546011)(2906002)(316002)(31686004)(83380400001)(38100700002)(36756003)(2616005)(44832011)(8676002)(5660300002)(86362001)(186003)(508600001)(6486002)(8936002)(966005)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?ZmowUUtick9YNTloa2lGeVd4eEJCb2Ftb3M1WEh1MGE0NnVRYkdtRjYxVXZp?= =?utf-8?B?SmFRTVdJeG1SSHBtdTJob05CNzBTUE9yaHZJSHBGOVNoZDhTbndVYnBiK3pv?= =?utf-8?B?c0RlaXlNUXUyalBQZFRscTlGSE9WQnl6d3dKMUVNNm50OHZjY3J6ZWVtL0pQ?= =?utf-8?B?YS9OdU1VVTRZVmIrTzIrWEV5R1VkWkh3VGZ2aGljemN0TkpDSGUzRHgrVVI0?= =?utf-8?B?TnN5LzN3VWczODdjYkxOYWtSOFFnR2ppS3EyMndhajIyYzFUc05QVURKbkJI?= =?utf-8?B?d1VLL2NxRlJIMjRwT2dPV1Jka1NzQWlUSEIzZ3VEOVhmcXJMZS82Y1kva2R5?= =?utf-8?B?Z2J5dEV4TUhsT200NEZPalpZaEJiSzlHMzZXVTBLbkFYajFqNDdyV2ZwS0dM?= =?utf-8?B?cExLeWJHUnVCeUJBUGNRb3I5Vmg3eG5FYTQyN1gyaVdrY2w2Tmt4VnhPekhH?= =?utf-8?B?VUREdWN0QkdnT0k3QWFmYWNaZVVFdUhDV0JoSzhDR0VnWmhYVkNZUkZUamUx?= =?utf-8?B?dVBpWm1UaGpMeUM4S3pHWFEwbVRtTHM5ZEZBR3l5VGY1RE94Mk1aeFF3Vk9R?= =?utf-8?B?VWtuWnh1WEROQzdhYmhzZklMc09QNldxN3FKQlNMR1Y3M3ExYjNLb2dMUGl0?= =?utf-8?B?bTdKWENnN2hocDBZei9Uc2Z6eVBZc3FFczRuNlhRT09QRWJMTkU1TEtkNEZl?= =?utf-8?B?T0M3ZW1qcGhBUE9SdkFhUTNtbFZWdFNUMVRTRkdmRE5iL0xnbnM1OHFKNDRn?= =?utf-8?B?aENVK05Nc2dOWldzQTJjakRyUHUrNVRNb3lnc2I2MjFVNUpWblAxSmZUZVpM?= =?utf-8?B?Y2Z5L0hkb2JhVGFNdi93c1JJaUpDb0crTzNBT2UzQlRUOExrUzZ2NlhKeVU0?= =?utf-8?B?Rm5hNnlFTkZ2NldMU2VkK3VSa2pmcEt4bzNIM1A5M1FHS3h4NXpONW5HcmNi?= =?utf-8?B?L01ncTdFRHljTFVWQU4zYlMzakE3Vkw0TU1TR3ljUldkam1FY0p1OUNGQWh0?= =?utf-8?B?QkdPaHpmTnBYYkpXcWVZZnVlV25VQnZoT053ZXdpRzdSbkdKSGFSblJPTDRU?= =?utf-8?B?ekc4eFkvdlNiaEViTitHU2FBNHNIbUFDTHdVOEVZNkMvQmdlK21DNEdVQXkx?= =?utf-8?B?SUt6L05SOGM5cTZnVVZqWmFCcFY0dERIVjZkWjVWWmtQZHArVUxBR2NSaElL?= =?utf-8?B?R2xXdVNFcnNkbWRFaUY2YXdKL0tYdmJEVWVHa2l3clQ1UjBWdjBpWmxlWFJD?= =?utf-8?B?YUJ3dkVpR3MxZHZyWk1HQ1hWTjhwT1d6WEMxcWlXZHJYYXA3RzVVVG4xMEVp?= =?utf-8?B?UVNoUWdYMHBZOGo0MU1QcEpVazlvUm02a24yU3E2dVVYRiswZ3NrODRIVWdR?= =?utf-8?B?NVVHZVdsOU1GYXVURXdXM2h3Wjl2UERRQmtER1p2Ymk0R2pjR0hHU25ZcUQ4?= =?utf-8?B?SXd6ZXhpRWpaemJVVWxaSTkzOFhwdVVpSVVGaHo2TmpTU3lWclMxdnN2OVFo?= =?utf-8?B?aXhNVzJRMlM3YVlvNWxVWnVhcFlub2ZPRkkxQVdBN3pjVXFCTmVhMFV1Tmpn?= =?utf-8?B?MjB3NDNqUDhMZnZSTzZJbmtxU2ttTklkRVhWQ1R1M1lnekd1OVV3VEQ0VGo0?= =?utf-8?B?ejBvc09ndEMyT0N5bUI4U01vbHBUdW8zazJJL3RZVXZ3SFFYZnJ2ckJHYzQx?= =?utf-8?B?RDRzaFJLc1JJYWwwOEVjU3JzbWR4bFo0eFVoai9CS2p4UkxZb3ZhZzFQRTl3?= =?utf-8?B?NUlZUk92cE81bWVBV0lwa1pqd25JQnRGVTFyaE9IN093cEozdXVLa0FxMWdt?= =?utf-8?B?VkFPalowb2FMWWRud3ZBRFIrWmNlbjc1aGdqN0lBTW1pdW1IejF1QUlGcUg3?= =?utf-8?B?bDEyUzZuYnJvU3AyNXVIQWMzUWJGNUNxTklFcllKUDNXSW9DaTRtYVFneFg3?= =?utf-8?B?aUlyY2I1bUJZdkNhSkxaZjhHRExMYVNhWTAvc1NHUUdIYWZwcUhEejN5TFo5?= =?utf-8?B?clpsT3krQWxkdDlzcGdHcXp6bkttSm1UZUo5ZWZjVjVJMTZIUm9HTTd6Q0lq?= =?utf-8?B?V3ZBRldNRGxTd0Z2bkJZZ1gvSmhza3lZejBsS1E1cTJrRDY1VVhPUHRMVi80?= =?utf-8?B?RWFRUERqdjBzL2E1NUZtVkw1YzZyWGFPTEZvZGxMRnBBa2FPMFJIamVVWEE0?= =?utf-8?B?SGtIV1pPN3l6dG5nVFlrNGNueUVRcjRlSlJ6QUprRWZkdlUxMU1NL0Q3TmRa?= =?utf-8?B?Q0wyVUY5STZkN081SUZxZmVVWGpPZmxvS2psbXVlZ3U3M0o1TnI4UnRNN2V4?= =?utf-8?B?NWUrOXVnWHJsRHBqZnk4OXMveTFCRlFsaXQ2ejZPL2RlTlZMU29ReTlORno2?= =?utf-8?Q?3FHi1rEfL8/vdMVs=3D?= X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: 3ef35213-fe41-4e4c-b3e6-08d9bb020b2a X-MS-Exchange-CrossTenant-AuthSource: DBBPR08MB4523.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Dec 2021 10:52:50.2341 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: e94ec9da-9183-471e-83b3-51baa8eb804f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ZuwnxCXtAuR6ys4SUWA/HnC9sTbfgWwG4IbSukrXC2SDOfaoMRHkRGS+0RvdBnJ5uIk9agCNTRkichnMwUF/Cux3vSfuOEgX8RRZsojTrJ4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR08MB2919 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on metis.ext.pengutronix.de X-Spam-Level: X-Spam-Status: No, score=-4.6 required=4.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MSGID_FROM_MTA_HEADER, NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Subject: Re: [ptxdist] [PATCH 1/2] ptxd_make_world_{dtb, dtbo}: add support for device tree overlays X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false Hello again, On 12/9/21 11:46 AM, Michael Olbrich wrote: > On Thu, Dec 09, 2021 at 10:58:03AM +0100, Michael Riesch wrote: >> On 12/9/21 9:53 AM, Michael Olbrich wrote: >>> On Thu, Dec 09, 2021 at 08:20:05AM +0100, Michael Riesch wrote: >>>> On 12/8/21 9:31 AM, Michael Olbrich wrote: >>>>> On Tue, Dec 07, 2021 at 06:30:54PM +0100, Christian Melki wrote: >>>>>> I like this take on dtbos! >>>>>> >>>>>> On 12/7/21 16:39, Michael Riesch wrote: >>>>>>> Make ptxd_make_dtb more general and provide suitable wrappers to >>>>>>> support the generation of device tree overlays. >>>>>>> >>>>>>> Signed-off-by: Michael Riesch >>>>>>> --- >>>>>>> rules/post/ptxd_make_world_dtbo.make | 21 +++++++ >>>>>>> scripts/lib/ptxd_make_world_dtb.sh | 82 ++++++++++++++++++++-------- >>>>>>> 2 files changed, 80 insertions(+), 23 deletions(-) >>>>>>> create mode 100644 rules/post/ptxd_make_world_dtbo.make >>>>>>> >>>>>>> diff --git a/rules/post/ptxd_make_world_dtbo.make b/rules/post/ptxd_make_world_dtbo.make >>>>>>> new file mode 100644 >>>>>>> index 000000000..61babc653 >>>>>>> --- /dev/null >>>>>>> +++ b/rules/post/ptxd_make_world_dtbo.make >>>>>>> @@ -0,0 +1,21 @@ >>>>>>> +# -*-makefile-*- >>>>>>> +# >>>>>>> +# Copyright (C) 2020 by Michael Tretter >>>>>>> +# >>>>>>> +# For further information about the PTXdist project and license conditions >>>>>>> +# see the README file. >>>>>>> +# >>>>>>> + >>>>>>> +world/dtbo/env = \ >>>>>>> + $(call world/env, $(1)) \ >>>>>>> + pkg_dtso_path="$($(1)_DTSO_PATH)" \ >>>>>>> + pkg_dtso="$($(1)_DTSO)" \ >>>>>>> + pkg_dtbo_dir="$($(1)_DTBO_DIR)" \ >>>>>>> + pkg_kernel_src="$($(1)_KERNEL_DIR)" \ >>>>> >>>>> Right, reaching into the source tree of another package is always ugly. >>>>> Make sure that _DEVPKG is set to 'NO' for the package. It's already >>>>> set for the generic kernel package (out-of-tree modules need it as well) >>>>> but not for the kernel package template. >>>> >>>> Could you elaborate a bit on why this is required? >>>> >>>> What action should be carried out if this variable is not set to 'NO' or >>>> must this not happen in the first place? >>> >>> If pre-built archives[1] are used are used then the source tree may not be >>> available. So if the source/build tree of a package is used by any other >>> package then _DEVPKG must be set to ensure that the package is always >>> built. >>> >>> It's a somewhat obscure feature of PTXdist. >>> >>> Michael >>> >>> [1] https://www.ptxdist.org/doc/daily_work_section.html#using-pre-built-archives >>> >> >> Thanks for the explanation, now I understand why this is necessary. >> However, I am still not sure what I can do about it in this patch series. >> >> Can I really change the _DEVPKG (e.g., KERNEL_CUSTOM_DEVPKG where >> KERNEL_CUSTOM is derived from the kernel template) at the time >> world/dtbo is called (from MY_OVERLAY package)? Would it have any effect? >> >> I guess I can output a warning, but as far as I understand the damage is >> already done at this point and if there are no kernel sources in >> MY_OVERLAY_KERNEL_DIR the dtc command might fail miserably. >> >> How would I determine the kernel package name from the kernel directory >> to begin with? > > Ah, sorry. I didn't mean that there is anything for you to change. Just > something to keep in mind when you use it. OK, that's alright then :-) Thanks for the valuable pointer! v2 will follow soon. Best regards, Michael > > Michael > >>>>>>> + pkg_arch="$(GENERIC_KERNEL_ARCH)" >>>>>>> + >>>>>>> +world/dtbo = \ >>>>>>> + $(call world/dtbo/env,$(strip $(1))) \ >>>>>>> + ptxd_make_world_dtbo >>>>>>> + >>>>>>> +# vim: syntax=make >>>>>>> diff --git a/scripts/lib/ptxd_make_world_dtb.sh b/scripts/lib/ptxd_make_world_dtb.sh >>>>>>> index f5e796b9d..c1ded5ffb 100644 >>>>>>> --- a/scripts/lib/ptxd_make_world_dtb.sh >>>>>>> +++ b/scripts/lib/ptxd_make_world_dtb.sh >>>>>>> @@ -9,18 +9,10 @@ >>>>>>> ptxd_make_dtb() { >>>>>>> local dtc dts tmp_dts dtb deps tmp_deps >>>>>>> >>>>>>> - if [[ "${dts_dts}" =~ ^/.* ]]; then >>>>>>> - ptxd_bailout "'${dts_dts}' must not be an absolute path!" \ >>>>>>> - "Use _DTS_PATH to specify the search path." >>>>>>> - fi >>>>>>> - >>>>>>> - if ! ptxd_in_path pkg_dts_path "${dts_dts}"; then >>>>>>> - ptxd_bailout "Device-tree '${dts_dts}' not found in '${pkg_dts_path}'." >>>>>>> - fi >>>>>>> - dts="${ptxd_reply}" >>>>>>> - dtb="${dtb_dir}/$(basename ${dts/%.dts/.dtb})" >>>>>>> + dts="${dtb_source}" >>>>>>> + dtb="${dtb_target}" >>>>>>> >>>>>>> - dtc="${pkg_build_dir}/scripts/dtc/dtc" >>>>>>> + dtc="${dtb_kernel_dir}/scripts/dtc/dtc" >>>>>>> if [ ! -x "${dtc}" ]; then >>>>>>> dtc=dtc >>>>>>> fi >>>>>>> @@ -39,16 +31,16 @@ ptxd_make_dtb() { >>>>>>> -Wp,-MT,${dtb_deps_target} \ >>>>>>> -nostdinc \ >>>>>>> -I"$(dirname "${dts}")" \ >>>>>>> - -I${pkg_dir}/arch/${pkg_arch}/boot/dts \ >>>>>>> - -I${pkg_dir}/arch/${pkg_arch}/boot/dts/include \ >>>>>>> - -I${pkg_dir}/scripts/dtc/include-prefixes \ >>>>>>> - -I${pkg_dir}/drivers/of/testcase-data \ >>>>>>> - -I${pkg_dir}/include \ >>>>>>> + -I${dtb_kernel_dir}/arch/${pkg_arch}/boot/dts \ >>>>>>> + -I${dtb_kernel_dir}/arch/${pkg_arch}/boot/dts/include \ >>>>>>> + -I${dtb_kernel_dir}/scripts/dtc/include-prefixes \ >>>>>>> + -I${dtb_kernel_dir}/drivers/of/testcase-data \ >>>>>>> + -I${dtb_kernel_dir}/include \ >>>>>>> -undef -D__DTS__ -x assembler-with-cpp \ >>>>>>> -o ${tmp_dts} \ >>>>>>> ${dts} && >>>>>>> >>>>>>> - sed -e "\;^ ${pkg_dir}[^ ]*;d" \ >>>>>>> + sed -e "\;^ ${dtb_kernel_dir}[^ ]*;d" \ >>>>>>> -e 's;^ \([^ \]*\); $(wildcard \1);' "${tmp_deps}" > "${deps}" && >>>>>>> # empty line in case all dependencies were removed >>>>>>> echo >> "${deps}" && >>>>>>> @@ -57,9 +49,9 @@ ptxd_make_dtb() { >>>>>>> echo "DTC $(ptxd_print_path "${dtb}")" && >>>>>>> ptxd_eval \ >>>>>>> "${dtc}" \ >>>>>>> - $(ptxd_get_ptxconf PTXCONF_DTC_EXTRA_ARGS) \ >>>>>>> + "${dtb_extra_args}" \ >>>>>>> -i "$(dirname "${dts}")" \ >>>>>>> - -i "${pkg_dir}/arch/${pkg_arch}/boot/dts" \ >>>>>>> + -i "${dtb_kernel_dir}/arch/${pkg_arch}/boot/dts" \ >>>>>>> -d "${tmp_deps}" \ >>>>>>> -I dts -O dtb -b 0 \ >>>>>>> -o "${dtb}" "${tmp_dts}" && >>>>>>> @@ -81,17 +73,61 @@ ptxd_make_dtb() { >>>>>>> export -f ptxd_make_dtb >>>>>>> >>>>>>> >>>>>>> +ptxd_make_world_dtbo() { >>>>>>> + local dtb_deps_target dtb_extra_args dtb_kernel_dir dtb_source dtb_target >>>>>>> + >>>>>>> + ptxd_make_world_init || break >>>>>>> + >>>>>>> + dtb_deps_target="${ptx_state_dir}/${pkg_stamp}" >>>>>>> + dtb_extra_args="-@" >>>>>> >>>>>> Looks ok. Do we need to do a dtc version check? >>>>>> 1.4.4+ I think. Maybe a bit excessive? >>>>> >>>>> We cannot build dtbos if that's not supported, so a check won't really >>>>> help. >>>> >>>> Ack. >>>> >>>>> >>>>>>> + dtb_kernel_dir="${pkg_kernel_src}" >>>>>>> + if [ -z $dtb_kernel_dir ]; then >>>>>>> + dtb_kernel_dir="${pkg_dir}" >>>>>>> + fi >>>>> >>>>> dtb_kernel_dir="${pkg_kernel_src:-${pkg_dir}}" >>>>> >>>>> should work. And I think this can be moved to the shared code above. It >>>>> works just fine because pkg_kernel_src is never set for the dts case (but >>>>> we might want to allow it in the future). >>>> >>>> Ack. >>>> >>>>> >>>>>>> + >>>>>>> + echo -e "\nBuilding device tree overlays..." >>>>>>> + >>>>>>> + for overlay in ${pkg_dtso}; do >>>>>>> + if [[ "${overlay}" =~ ^/.* ]]; then >>>>>>> + ptxd_bailout "'${overlay}' must not be an absolute path!" \ >>>>>>> + "Use _DTSO_PATH to specify the search path." >>>>>>> + fi >>>>>>> + >>>>>>> + if ! ptxd_in_path pkg_dtso_path "${overlay}"; then >>>>>>> + ptxd_bailout "Overlay '${overlay}' not found in '${pkg_dtso_path}'." >>>>>>> + fi >>>>>>> + dtb_source="${ptxd_reply}" >>>>>>> + dtb_target="${pkg_pkg_dir}/${pkg_dtbo_dir}/$(basename ${overlay/%.dts*/.dtbo})" >>>>>>> + >>>>>>> + ptxd_make_dtb || break >>>>>>> + done >>>>>>> +} >>>>>>> +export -f ptxd_make_world_dtbo >>>>>>> + >>>>>>> + >>>>>>> ptxd_make_world_dtb() { >>>>>>> - local dtb_deps_target dtb_dir >>>>>>> + local dtb_deps_target dtb_extra_args dtb_kernel_dir dtb_source dtb_target >>>>>>> >>>>>>> ptxd_make_world_init || break >>>>>>> >>>>>>> dtb_deps_target="${ptx_state_dir}/${pkg_stamp}" >>>>>>> - dtb_dir="${pkg_pkg_dir}/boot" >>>>>>> + dtb_extra_args="$(ptxd_get_ptxconf PTXCONF_DTC_EXTRA_ARGS)" >>>>>> >>>>>> Not sure I follow here. Must not the dtb itself be built with -@ for >>>>>> symbols if dtbos are used? Does EXTRA_ARGS default to -@ or something? >>>>> >>>>> I don't know much about dtbos. If -@ is required for the dtb to make dtbos >>>>> work, then this should be propagated automatically. Add something to >>>>> world/dtb/env, maybe with a noprompt kernel options >>>>> KERNEL_DTS_SUPPORT_OVERLAYS or something like that. And select it as >>>>> needed. >>>> >>>> Will change this in v2. >>>> >>>> Thanks and regards, >>>> Michael >>>> >>>>> >>>>>>> + dtb_kernel_dir="${pkg_dir}" >>>>>>> + >>>>>>> + echo -e "\nBuilding device trees..." >>>>>>> + >>>>>>> + for tree in ${pkg_dts}; do >>>>> >>>>> Please keep the dts_dts variable name. >>>>> >>>>> Michael >>>>> >>>>>>> + if [[ "${tree}" =~ ^/.* ]]; then >>>>>>> + ptxd_bailout "'${tree}' must not be an absolute path!" \ >>>>>>> + "Use _DTS_PATH to specify the search path." >>>>>>> + fi >>>>>>> >>>>>>> - echo -e "\nBuilding Device trees..." >>>>>>> + if ! ptxd_in_path pkg_dts_path "${tree}"; then >>>>>>> + ptxd_bailout "Overlay '${tree}' not found in '${pkg_dts_path}'." >>>>>>> + fi >>>>>>> + dtb_source="${ptxd_reply}" >>>>>>> + dtb_target="${pkg_pkg_dir}/boot/$(basename ${tree/%.dts/.dtb})" >>>>>> >>>>>> Static output dir path? >>>>>> >>>>>>> >>>>>>> - for dts_dts in ${pkg_dts}; do >>>>>>> ptxd_make_dtb || break >>>>>>> done >>>>>>> } >>>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> ptxdist mailing list >>>>>> ptxdist@pengutronix.de >>>>>> To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de >>>>>> >>>>> >>>> >>>> _______________________________________________ >>>> ptxdist mailing list >>>> ptxdist@pengutronix.de >>>> To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de >>>> >>> >> >> _______________________________________________ >> ptxdist mailing list >> ptxdist@pengutronix.de >> To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de >> > _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de