From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Thu, 09 Dec 2021 08:20:24 +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 1mvDj6-000qMU-61 for lore@lore.pengutronix.de; Thu, 09 Dec 2021 08:20:24 +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 1mvDj5-0005zD-Gw; Thu, 09 Dec 2021 08:20:23 +0100 Received: from mail-vi1eur05on2067.outbound.protection.outlook.com ([40.107.21.67] helo=EUR05-VI1-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 1mvDir-0005ys-UQ; Thu, 09 Dec 2021 08:20:11 +0100 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IiaYzAeEPQe+JKnCwNN7gD295C8evW40E7TJfpHVSEW3Sei6JLHOrm7/2bxLdcGcP8+x1hj9lx5AbCiW0WRONPQRJkvu9a7z91dRr4WVHsXHVUrUTAbcNIA23Tqh1YJJt/dhXObRUC1PlheZ7e/YtwhTRFwbSdXkrooISH1k+5QGi32Kq8KZ3/7/+OGVWERn3JSOpROxSx7xm7dRWgmyykyQQHcWx3xlKudzjasg1ymXx1zsPAifVhyIyHOg45aI4byhgFDsBMq036BSqySW0PZHGrXwu9BFeVdWR3vpmTJRX+8a7x6dWit2pcSMsJTofF0lRvUd09Y86ZHgHMoLAQ== 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=KjLdG30Y+STRnT04aDH61aW47HiGpA3MQ2CeQgqFICM=; b=atGfXXVtm3WjcZfkNTESQ2/42/WDi4iQFrzlR4+pMuoifgVdMYO1fLwjh2iz3Jb7TUTVgSPA4jOHA4QSZl25MY6iJd0CbW7PM70GHtamyxMmFkN/d1pPSstIXWb3fP/1OcizJeve/dy4NQWuj/lvPuYqwckzgqjWaPaD+iGAe4oQAZgQv2Y3XDLLkpsZD4vKRduVBfRFt0FXLMzZt6fptUWSw93hMvK1Hn4C57f4Vj9Ro+d2CXSOyGWNmBXl3Sopib8ROPfUSL8uJ59B72GugXG2QCdZsEz75MRphhPaTOBZF8wEaxDYPwZFkFHl341NSMJ/CApe4rxxKy7YFbCGAA== 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=KjLdG30Y+STRnT04aDH61aW47HiGpA3MQ2CeQgqFICM=; b=1TQQuHzCYGGmJ31cJT4bHkArSFFLhQNtFTAfVFML8ZHxtCtRISqPre7sRkeCYF8XIEFN7fOMiFK4ZHDslS/6UYW/DSl2yt/NbAElnQuTZZ2B3rxlcENC0kiy2HmCx7Y3ADS9eaZGqXeWgynnDvByvsUyQlgX62S4fl4p3LtzZ/s= 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 DB8PR08MB4012.eurprd08.prod.outlook.com (2603:10a6:10:a7::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.21; Thu, 9 Dec 2021 07:20:06 +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 07:20:06 +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> From: Michael Riesch Message-ID: <0ee4879b-13d2-44dc-e963-09b880a6f310@wolfvision.net> Date: Thu, 9 Dec 2021 08:20:05 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 In-Reply-To: <20211208083149.GF15196@pengutronix.de> Content-Language: en-US X-ClientProxiedBy: ZR0P278CA0025.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:1c::12) 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 ZR0P278CA0025.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:1c::12) with Microsoft SMTP Server (version=TLS1_2, cipher=) via Frontend Transport; Thu, 9 Dec 2021 07:20:06 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9f67ba42-45f4-43d0-c269-08d9bae45375 X-MS-TrafficTypeDiagnostic: DB8PR08MB4012:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4714; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2ZJ0lwFzxtDiCHxeHDWYWSNx8Kv0p/I9Cv5x1cQRQXBCgc99aQToYPB0OS2JpA/cdH/HWDNG/A66dBP3qR1rrWeWK82YvgBtbdoRfjje/WaLfyVShZwqcnZX0gMyNSnMdA7mUOsHDBdJIOA49UPW2rPHm5S6cUXPjUhxv4A20vZkndkK8nxccsLtiHbShEQQO1tT0jfEOQqZ0iu4bHsqfsiae/H4PcVE2JXbWt8BuIu2b72eBDgwqJA/ODUe/ucgT1NY6pQ/lObynBhL9mlbyMPYKaI8pjmtK1+7mP2HS2OKZ/386pbj3b2mqjktzQGh/ZK8xZ+w6N5Ge5Wl/Z2biHafP7j4mAGBjxHZkjmlWA3Ez0UhJzjsY++M+oo4MJ3p0r0JbjFzkUta1ZkQfyxBRKWPP0D8Ev4iDv5XMzEEf9HkuSOQyY0SspU+ru1xQGs0SX4DIhMz3sV7rXVC1T7F2kknjUNwDLQEBaZFZh0LNktI43Tm30Hacu3ytDG8quWfMQOypNpEJuN6DAmWmhrXJ1grbbqxN4YwpTDhP+vDlq6rp+2HvIRx3Ga7w2XZLBH0YEC3AADTaiDFowywlhxr3+gBc/lvXBsoJWs92hHeBsxURL8qlbLVzQ09kYqB4yzklcbbBp784sW+aWCgt0B8GPvDu4y6OXsS52Dr73k4hlNNVKfeewgpHt3XenXKSHifkUJIXnsucviprTlis8fBMVTMYXUf7RXgAmfexUkqNBKzfcFMMJT+1ycDyVqIuYPD 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)(83380400001)(53546011)(66476007)(31696002)(186003)(508600001)(66946007)(316002)(66556008)(8936002)(31686004)(36756003)(38100700002)(8676002)(5660300002)(86362001)(2616005)(52116002)(6486002)(44832011)(2906002)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?L0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TM1R2NvcmRFL09pbkR0Y3Zu?= =?utf-8?B?cll1UEJrbmdGa2h3b1JSUW5VUWVxcExNeGNFbWtzZUpVdzhTZ0tHZkw1b0sv?= =?utf-8?B?M0NnRlNjdVV6RkVCaFVYbEtnUjRPZUVlZCtKRWRGbUJQZjZYeEFNQ1VEUWZU?= =?utf-8?B?MXhndnpWeG10WTZ6M2doSFhUL1lGa2d2bmtQRU1mVUIyQ0syZlh1aEZyRVhO?= =?utf-8?B?R2VKS29TbzczRitEV21kbzE1T3FFL1NmdjlOdjRIKzZPV2EveHZUU0hBcytB?= =?utf-8?B?enZHNmZ1UDJjN2ZEcUVNV3N2bmorV1ZQdmExRkNXNk15a2krTmNQWG9UU29s?= =?utf-8?B?SnBxa3pUWXhjVmFKSjRGT0VLVDZJVVhNeUxGME5yaHRKNlcvWnQ4VUtOM3dF?= =?utf-8?B?UGhrVWZ0MlBtREdGYzk2cDRqZ1hUS3JoaEhOTzNER09STEw2VTRxdjhGbm5C?= =?utf-8?B?NmVlRVZXaEZuNEU1MVZGUVdxMjltWG0wYzRmMDNSYnRtVWFXWngzTkFJSllN?= =?utf-8?B?OUhDdVBlZnhod2cwZTBqQUFYTERBT21NZEdZdlhrQndDbWhVOFZpWFBXaXRZ?= =?utf-8?Q?7p8Ew+kMdi/JVMmk=3D?= X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: 9f67ba42-45f4-43d0-c269-08d9bae45375 X-MS-Exchange-CrossTenant-AuthSource: DBBPR08MB4523.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Dec 2021 07:20:06.6931 (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: rkizj7HOY22du67Sldty2jDkxlJR/BM+RSvQz1ZL9RdBI4sJdFRiAfjF/5sEu9oJ0f2NPsuR7pD4CQfV6IdTAeTyrwSQ0gwfK5b/Tc6SEUY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR08MB4012 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 Michael, On 12/8/21 9:31 AM, Michael Olbrich wrote: > On Tue, Dec 07, 2021 at 06:30:54PM +0100, Christian Melki wrote: >> Hi! >> >> 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? > >>> + 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