From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Fri, 06 Aug 2021 13:42:48 +0200 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1mByFU-0006fs-8O for lore@lore.pengutronix.de; Fri, 06 Aug 2021 13:42:48 +0200 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 1mByFT-0000T1-Q4; Fri, 06 Aug 2021 13:42:47 +0200 Received: from mail-he1eur02on0601.outbound.protection.outlook.com ([2a01:111:f400:fe05::601] helo=EUR02-HE1-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 1mByFC-0000Sk-U6; Fri, 06 Aug 2021 13:42:32 +0200 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MteXBa+8tryrIledwrTeOIr0arx6mmk834Z7LhvSJZ3IFXWxJ/YM6GSgDB3A2xF9l/XinyUWq7sy9IP3hcytkiGtbanJxy91hLE7i5rdM45dENImYvLdYGVjt18cjhDtxRVHp0JsCKNjjXFU4dpOLdGBLIndV4rJKah0VQM3v+WiRYJXyMTc1rNKq6Aycf7qrIAaz4qUuhr7YVJ7a77hOU+lfvKrBAMvXW+95AP1M7FjhpHkBo7rM023feJ9yZaeLNIYP4Oh+eO345seSkqIH/sGEbGLYIDdyggn7AwQ/TrryzuY/VOMlJZcLKs+5WNMvmRH7BYQ6JVNj2yg09S4Ig== 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-SenderADCheck; bh=dA5jGeGREnpPyA+NpyvmadgcYuf5i4FmMYna0SMkmaQ=; b=cbnHoLQuKWqr1d+8cVxIUxcPtn6IPMV5TXqcuZz1f7uT1Y1Fw6kzqhPSVKelTMe4vn9xxWTgabmkoyYjGbpOiTK2YBTmucocWmolsGinlDi9HsFHzhtX4uDkuhDVw9XnzRVifLFt1voJPaY8dizNiAG4yYretfpoRK6JXJtsXlsnze4Xv4jG/e8yBLx/nmMj1WWES8sY1fxUGhyW/hpXuic70xBAV+67WwsVLI2Zzc5Ci+V8lQyO0el4kLvQh/UY2DxrSAZoTfrmBOf8YvVeVBBCvA9umaaFo1Qrz49zERjjAmej9tlEuXI4jOIoRAJuXyJQwU8Ogf+/t13a9qzWlg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=t2data.com; dmarc=pass action=none header.from=t2data.com; dkim=pass header.d=t2data.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=t2datacom.onmicrosoft.com; s=selector1-t2datacom-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dA5jGeGREnpPyA+NpyvmadgcYuf5i4FmMYna0SMkmaQ=; b=VMUY9Twy4rm0Q4MjDIsl/J5rhkjmW90XbZiNnBIJIBf4mPnWrLvYgwE57g0olbXP7mzdNlojh6JsdjgOLkgi0zttVOH8kVDae3SvOzUeHBBZlH78pvgGue3MD3sOQZ7SHqvqCTwScOx4j1PmPc3SCKn75NQ4/RvsqXeuV8eXTGU= Authentication-Results: pengutronix.de; dkim=none (message not signed) header.d=none;pengutronix.de; dmarc=none action=none header.from=t2data.com; Received: from AS8P251MB0167.EURP251.PROD.OUTLOOK.COM (2603:10a6:20b:403::21) by AS8P251MB0312.EURP251.PROD.OUTLOOK.COM (2603:10a6:20b:403::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4394.19; Fri, 6 Aug 2021 11:42:28 +0000 Received: from AS8P251MB0167.EURP251.PROD.OUTLOOK.COM ([fe80::a98f:7ee0:88d8:8f54]) by AS8P251MB0167.EURP251.PROD.OUTLOOK.COM ([fe80::a98f:7ee0:88d8:8f54%2]) with mapi id 15.20.4394.019; Fri, 6 Aug 2021 11:42:28 +0000 To: ptxdist@pengutronix.de, Michael Tretter References: <20210602121910.2527-1-christian.melki@t2data.com> <20210603072114.GC12967@pengutronix.de> <262ce07b-b983-75d5-1e87-ecad7fad4b3f@t2data.com> <20210804071027.GA2534932@pengutronix.de> From: Christian Melki Message-ID: Date: Fri, 6 Aug 2021 13:42:33 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 In-Reply-To: <20210804071027.GA2534932@pengutronix.de> Content-Language: en-US X-ClientProxiedBy: HE1PR0401CA0087.eurprd04.prod.outlook.com (2603:10a6:7:54::16) To AS8P251MB0167.EURP251.PROD.OUTLOOK.COM (2603:10a6:20b:403::21) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [192.168.7.217] (81.234.39.46) by HE1PR0401CA0087.eurprd04.prod.outlook.com (2603:10a6:7:54::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4394.17 via Frontend Transport; Fri, 6 Aug 2021 11:42:27 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0a7c624e-8e98-4514-d629-08d958cf4414 X-MS-TrafficTypeDiagnostic: AS8P251MB0312: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8273; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Omx8L9QS9sfCWs7MFTK2sGzt+1cR0ytrKKjM+6oip/RPXuN39IsaJhHLXHL0IoLMyf294eOBBXEvpR8QuJzH7XIlOCFf637D1hisBc+IlJwX5tv18mrGg2AXO5auyg26hMz36vneIgpRRqV35obzt13twUG+aNGvEk8+1IzUdDyjghtd9BNVvWQqA+/0VJY6IRuqsbqgfg4tWhiVsz6+8uDsq77oUX8PFMKaY/ZdJFXu5w52kMW0lAwcTVkHJ3HGdsxa3zVcbG0jhUqE6724NWyXR0fu8grDO3yQarY+yez2KaQjIeT0ClwXtK5BUD15qIL7ajJ63n2C+b8z/WWwMFpyTR1BQey3HN2wMBNuQcQ5sR/aKmukKAeySytg2ZNbId4CCPVRfyLtCgM/OEMiHkaI4L2NpIBCHX+WFBUD72R8jjsqfLHjvAiABWqju1pNIksoDYsqRhDtoB6RcWRm3PcmywR8PRF7EwaPuf7jhMVaT7HtNTDUIDhQwzHDxHkHnjeAHEOcdv7rD7DjVcFgYcuZmIB243GGAsesce3ekiAbC4f32mTPezV8xHtJ1BNnhBsovOU+yDVXW2pr7yO2eQuQo79ciQMHWS1VKtIlsd62OnLAasp0Ww33opK0wMcK1+mKwpqIXhQ7mbX5YqDExmntaGWwPVxba+FXpb8oWT+Bt/uLexZKgujw5Gt5uWqvJHRPx2nlUBtVqxqNoB+iip4lBQfj3K37O7I7ZJJfp8Yrq9wZwrtOqhS5jzud/EnYxzo2cPhzb7i5uxRjAYorAQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AS8P251MB0167.EURP251.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(42606007)(136003)(396003)(366004)(376002)(39830400003)(346002)(38100700002)(38350700002)(31686004)(6486002)(186003)(5660300002)(478600001)(52116002)(86362001)(450100002)(26005)(6916009)(53546011)(36756003)(31696002)(83380400001)(8936002)(3450700001)(8676002)(66946007)(44832011)(2616005)(956004)(66476007)(66556008)(6666004)(2906002)(30864003)(16576012)(316002)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?ZWJYellHL09rVE5C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POjI?= X-OriginatorOrg: t2data.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0a7c624e-8e98-4514-d629-08d958cf4414 X-MS-Exchange-CrossTenant-AuthSource: AS8P251MB0167.EURP251.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Aug 2021 11:42:28.0236 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 27928da5-aacd-4ba1-9566-c748a6863e6c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: UwzFAP3KsaM6lOOTVJq+JnQ92SFZyr04A14sp0BPKhCsZSR44etfyJGJp+F5xc5hFOa6Ya1x96uc3pu0NbaP5LtdnR+haewFPLBMxx5brRM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8P251MB0312 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on metis.ext.pengutronix.de X-Spam-Level: X-Spam-Status: No, score=-3.5 required=4.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,MSGID_FROM_MTA_HEADER,NICE_REPLY_A,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Subject: Re: [ptxdist] [RFC] Add DTB overlay handling to ptxdist 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, christian.melki@t2data.com 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 On 8/4/21 9:10 AM, Michael Olbrich wrote: > On Thu, Jun 03, 2021 at 12:43:10PM +0200, Christian Melki wrote: >> On 6/3/21 9:21 AM, Michael Tretter wrote: >>> On Wed, 02 Jun 2021 14:19:10 +0200, Christian Melki wrote: >>>> The only real difference here is that the symbol handling >>>> must always be present. Hence "-@" for default extra arg. >>>> Make paths variable but default to boot for the old dtb behavior. >>>> There is a lot of duplication going on here, but the main purpose >>>> is to separate dtb from dtbo handling with separate names and functions. >>> >>> I am not convinced that it is a good idea to mix the handling of dtb and dtbo >>> in one rule file. Maybe it helps, if there is a separate rule for overlays, >>> but I didn't think this through. >>> >> >> Splitting them works for me. I have no opinion here. >> I thought that this was an easy way to start a seed for refinement. > > I actually disagree with Michael here. In fact, I basically merged the dtc > package into the kernel package. And I think the overlays should be added > there as well. > The reality is, that devicetrees, cannot be built without the kernel source > tree. There are just too many includes. And once you start having multiple > kernel packages, a separate dtc package gets really messy. And the > dependencies got really complex. > > So I refactored the helper functions and they are now used by the kernel > package. I think that can be extended to allow building overlays as well. > Maybe just a different output dir? I'm not sure. > > Some comments that will still be valid for a new version: > >>>> Signed-off-by: Christian Melki >>>> >>>> diff --git a/platforms/dtc.in b/platforms/dtc.in >>>> index 5e8b35291..101d99836 100644 >>>> --- a/platforms/dtc.in >>>> +++ b/platforms/dtc.in >>>> @@ -13,10 +13,18 @@ menuconfig DTC >>>> if DTC >>>> config DTC_INSTALL_OFTREE >>>> - bool "install oftree to /boot" >>>> + bool "install oftrees to target path" >>>> help >>>> - Creates a package to install the 'oftree' file to /boot >>>> - of your target system. >>>> + Creates a package to install the 'oftree' files >>>> + to your target system. >>>> + >>>> +config DTC_INSTALL_OFTREE_OVERLAY >>>> + bool "install oftrees overlays to target path" >>>> + help >>>> + Creates a package to install the 'oftree' overlay >>>> + files to your target system. >>>> + >>>> +comment "device tree paths ---" >>>> config DTC_OFTREE_DTS_PATH >>>> string "path to source dts file" >>>> @@ -25,6 +33,15 @@ config DTC_OFTREE_DTS_PATH >>>> Define path to the dts source file. Multiple directories can be >>>> specified separated by ':'. >>>> +config DTC_OFTREE_DTO_PATH >>>> + string "path to source dto (overlay) files" >>>> + default "${PTXDIST_PLATFORMCONFIG_SUBDIR}/dts:${KERNEL_DIR}/arch/${GENERIC_KERNEL_ARCH}/boot/dts" >>>> + help >>>> + Define path to the dto source files. Multiple directories can be >>>> + specified separated by ':'. > > Hmm, the default is the same. Why not share the search path? > I was thinking that DTBO:s do not have to come from the kernel tree or the exact default dts directory. For example. Firmware functions can provide overlays placed per FPGA function. You add a function and an overlay. So it's just added flexibility as I regard overlays as very dynamic. >>>> + >>>> +comment "device tree sources ---" >>>> + >>>> config DTC_OFTREE_DTS >>>> string "source dts file" >>>> default ".dts" >>>> @@ -34,7 +51,43 @@ config DTC_OFTREE_DTS >>>> is used as a search path for the device tree files specified >>>> here. Multiple dts files can be specified, separated by spaces. >>>> +config DTC_OFTREE_DTO >>>> + string "source dto file" >>>> + default ".dto" > > 'yourboard' does not make sense to me for overlays. Maybe 'youroverlay'? > Absolutely. >>>> + help >>>> + Select the dts/dto files to use for the device tree binary overlay >>>> + blob generation. For relative file names DTC_OFTREE_DTO_PATH >>>> + is used as a search path for the device tree overlay files specified >>>> + here. Multiple dts overlay files can be specified, separated by spaces. >>>> + >>>> +if DTC_INSTALL_OFTREE >>>> + >>>> +comment "device tree binary install path ---" >>>> + >>>> +config DTC_INSTALL_OFTREE_PATH >>>> + string "oftree installation path" >>>> + default "/boot" >>>> + help >>>> + oftree target installation path > > What's the use-case for this? The kernel is still in /boot so putting the > devicetree elsewhere does not make sense to me. > Just some added flexibility I guess. Overlays often end up in /lib/firmware for example, but someone might choose another dtb placement together with the overlays somewhere else. >>>> + >>>> +endif >>>> + >>>> +if DTC_INSTALL_OFTREE_OVERLAY >>>> + >>>> +comment "device tree overlay install path ---" >>>> + >>>> +config DTC_INSTALL_OFTREE_OVERLAY_PATH >>>> + string "oftree overlay installation path" >>>> + default "/lib/firmware" > > I'm guessing, this is the path that you need, right? Do we really need an > option for this? > Michael, I what do you think? > Overlays typically end up there yes. Xilinx and a lot of other providers use /lib/firmware. For example, you can autoload a FPGA bitstream with the overlay insertion, so to reset/reload the FPGA depending on the overlays inserted. Anyway. I was just adding flexibility. If a project wants to put FPGA bitstreams and their overlays somewhere else. >>>> + help >>>> + oftree overlay target installation path >>>> + >>>> +endif >>>> + >>>> config DTC_EXTRA_ARGS >>>> string "extra options passed to dtc" >>>> + default "-@" >>> >>> Building with symbols can increase the size of the device tree quite a lot. It >>> would be better to default to building with symbols only if overlays are >>> enabled. >>> >>> Michael >>> >> >> You're right. Also I think older dtcs might have a problem with defaulting >> to symbol generation. > > ack. > >>>> + help >>>> + Defaults to -@ for compiling dtb/dtbo for resolving symbols. >>>> endif >>>> diff --git a/rules/dtc.make b/rules/dtc.make >>>> index 7c281e8f0..45543d3d4 100644 >>>> --- a/rules/dtc.make >>>> +++ b/rules/dtc.make >>>> @@ -26,11 +26,18 @@ $(call ptx/error, PTXCONF_KERNEL_ARCH_STRING is no longer defined.) >>>> $(call ptx/error, Use GENERIC_KERNEL_ARCH instead) >>>> endif >>>> +ifneq ($(subst PTXCONF_KERNEL_ARCH_STRING,,$(value PTXCONF_DTC_OFTREE_DTO_PATH)),$(value PTXCONF_DTC_OFTREE_DTO_PATH)) >>>> +$(call ptx/error, invalid value for PTXCONF_DTC_OFTREE_DTO_PATH:) >>>> +$(call ptx/error, PTXCONF_KERNEL_ARCH_STRING is no longer defined.) >>>> +$(call ptx/error, Use GENERIC_KERNEL_ARCH instead) >>>> +endif >>>> +o > > I don't think this is necessary here. For the dts path, this was just > introduced to help migrating from old versions where > PTXCONF_KERNEL_ARCH_STRING was used. > Ok. >>>> # ---------------------------------------------------------------------------- >>>> # Target-Install >>>> # ---------------------------------------------------------------------------- >>>> ptx/dtb = $(notdir $(basename $(strip $(1)))).dtb >>>> +ptx/dtbo = $(notdir $(basename $(strip $(1)))).dtbo >>>> dts/env = \ >>>> $(call ptx/env) \ >>>> @@ -40,17 +47,31 @@ dts/env = \ >>>> dts_kernel_dir="$(KERNEL_DIR)" \ >>>> dts_kernel_arch="$(GENERIC_KERNEL_ARCH)" >>>> +dto/env = \ >>>> + $(call ptx/env) \ >>>> + dts_path=$(PTXCONF_DTC_OFTREE_DTO_PATH) \ >>>> + dts_dtb="$(strip $(1))" \ >>>> + dts_dts="$(strip $(2))" \ >>>> + dts_kernel_dir="$(KERNEL_DIR)" \ >>>> + dts_kernel_arch="$(GENERIC_KERNEL_ARCH)" >>>> + >>>> %.dtb: $(STATEDIR)/dtc.install >>>> @$(call targetinfo) >>>> @$(call dts/env, $@, $(DTB_DTS)) ptxd_make_dts_dtb >>>> @$(call finish) >>>> +%.dtbo: $(STATEDIR)/dtc.install >>>> + @$(call targetinfo) >>>> + @$(call dto/env, $@, $(DTBO_DTO)) ptxd_make_dts_dtb >>>> + @$(call finish) >>>> + >>>> DTC_DTB = $(foreach dts, $(call remove_quotes,$(PTXCONF_DTC_OFTREE_DTS)), $(IMAGEDIR)/$(call ptx/dtb, $(dts))) >>>> +DTC_DTBO = $(foreach dto, $(call remove_quotes,$(PTXCONF_DTC_OFTREE_DTO)), $(IMAGEDIR)/$(call ptx/dtbo, $(dto))) >>>> # make sure "ptxdist targetinstall kernel" generates a new device trees >>>> -$(STATEDIR)/kernel.targetinstall.post: $(DTC_DTB) >>>> +$(STATEDIR)/kernel.targetinstall.post: $(DTC_DTB) $(DTC_DTBO) >>>> -$(STATEDIR)/dtc.targetinstall: $(DTC_DTB) >>>> +$(STATEDIR)/dtc.targetinstall: $(DTC_DTB) $(DTC_DTBO) >>>> @$(call targetinfo) >>>> ifdef PTXCONF_DTC_INSTALL_OFTREE >>>> @@ -61,10 +82,16 @@ ifdef PTXCONF_DTC_INSTALL_OFTREE >>>> @$(call install_fixup, dtc, DESCRIPTION, "oftree description for machine $(PTXCONF_PLATFORM)") >>>> @$(call install_copy, dtc, 0, 0, 0755, /boot); >>>> + @$(call install_copy, dtc, 0, 0, 0755, "$(PTXCONF_DTC_INSTALL_OFTREE_PATH)"); >>>> @$(foreach dtb, $(DTC_DTB), \ >>>> $(call install_copy, dtc, 0, 0, 0644, \ >>>> - "$(dtb)", "/boot/$(notdir $(dtb))")$(ptx/nl)) >>>> - >>>> + "$(dtb)", "$(PTXCONF_DTC_INSTALL_OFTREE_PATH)/$(notdir $(dtb))")$(ptx/nl)) >>>> +ifdef PTXCONF_DTC_INSTALL_OFTREE_OVERLAY >>>> + @$(call install_copy, dtc, 0, 0, 0755, "$(PTXCONF_DTC_INSTALL_OFTREE_OVERLAY_PATH)"); > > Not needed. The directory is implicitly created below. > >>>> + @$(foreach dtbo, $(DTC_DTBO), \ >>>> + $(call install_copy, dtc, 0, 0, 0644, \ >>>> + "$(dtbo)", "$(PTXCONF_DTC_INSTALL_OFTREE_OVERLAY_PATH)/$(notdir $(dtbo))")$(ptx/nl)) > > $(PTXCONF_DTC_INSTALL_OFTREE_OVERLAY_PATH) includes quotes, so this would > result in: > > ""/lib/firmware"/something.dtbo" > Ack. > Michael > >>>> +endif >>>> @$(call install_finish, dtc) >>>> endif >>>> @$(call touch) >>>> diff --git a/rules/post/dts.make b/rules/post/dts.make >>>> index ffa8bf2fc..4bb1856ff 100644 >>>> --- a/rules/post/dts.make >>>> +++ b/rules/post/dts.make >>>> @@ -8,8 +8,12 @@ >>>> # >>>> # defined in post/ to make sure PTXCONF_DTC_OFTREE_DTS is fully defined >>>> +# defined in post/ to make sure PTXCONF_DTC_OFTREE_DTO is fully defined >>>> # >>>> $(foreach dts, $(call remove_quotes,$(PTXCONF_DTC_OFTREE_DTS)), \ >>>> $(eval $(IMAGEDIR)/$(call ptx/dtb, $(dts)): DTB_DTS=$(dts))) >>>> +$(foreach dto, $(call remove_quotes,$(PTXCONF_DTC_OFTREE_DTO)), \ >>>> + $(eval $(IMAGEDIR)/$(call ptx/dtbo, $(dto)): DTBO_DTO=$(dto))) >>>> + >>>> # vim: syntax=make >>>> -- >>>> 2.31.1 >>>> >>>> >>>> _______________________________________________ >>>> 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