From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id ADABBC76196 for ; Fri, 31 Mar 2023 18:52:55 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5031C85FCD; Fri, 31 Mar 2023 20:52:53 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="B+a1WhiE"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E1D1785FD0; Fri, 31 Mar 2023 20:52:50 +0200 (CEST) Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 6605385FC1 for ; Fri, 31 Mar 2023 20:52:47 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=afd@ti.com Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 32VIqjw5042684; Fri, 31 Mar 2023 13:52:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1680288765; bh=o7x8qZrTiCQ3v5sArlC9ENI3ETDklG3cM0cQw+ulzG4=; h=Date:Subject:To:CC:References:From:In-Reply-To; b=B+a1WhiEUxyoIMl4OxIC7MP4mLheaBXTxwzvFnf9Y1Z6II9mM+Lzm6Hj1UiZA7vM4 h1Ou60XsXKaE4c/N+1JiK/n9nBtq9sxIOPr6CASmyLZzvVVwLFY1jgn9BWMJopjofW Ou8VJGvezfCkpAQDP5Idqh0jy7p1ffIFtlrJF+pE= Received: from DFLE100.ent.ti.com (dfle100.ent.ti.com [10.64.6.21]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 32VIqjrE088281 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 31 Mar 2023 13:52:45 -0500 Received: from DFLE101.ent.ti.com (10.64.6.22) by DFLE100.ent.ti.com (10.64.6.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Fri, 31 Mar 2023 13:52:44 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DFLE101.ent.ti.com (10.64.6.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Fri, 31 Mar 2023 13:52:44 -0500 Received: from [10.250.32.170] (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 32VIqiXa126509; Fri, 31 Mar 2023 13:52:44 -0500 Message-ID: <8a903e58-11d7-0c31-5085-42addda66aff@ti.com> Date: Fri, 31 Mar 2023 13:52:44 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [PATCH] include: configs: Change dtb names in fitImage to match oe-core Content-Language: en-US To: Tom Rini CC: Nishanth Menon , Ryan Eatmon , Praneeth Bajjuri , Bryan Brattlof , References: <20230330210613.17984-1-reatmon@ti.com> <20230331170416.djwalg37btxdaomm@stunned> <20230331181112.GC13222@bill-the-cat> <20230331183650.GD13222@bill-the-cat> From: Andrew Davis In-Reply-To: <20230331183650.GD13222@bill-the-cat> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean On 3/31/23 1:36 PM, Tom Rini wrote: > On Fri, Mar 31, 2023 at 01:23:23PM -0500, Andrew Davis wrote: >> On 3/31/23 1:11 PM, Tom Rini wrote: >>> On Fri, Mar 31, 2023 at 12:19:14PM -0500, Andrew Davis wrote: >>>> On 3/31/23 12:04 PM, Nishanth Menon wrote: >>>>> On 16:06-20230330, Ryan Eatmon wrote: >>>>>> The oe-core class for assembling the fitImage includes the vendor >>>>>> sub-directory (with the / changed to _) in the config sections of >>>>>> the fitImage. Our env var settings for chosing which section to >>>>>> boot from needs to be updated to agree with the fitImage. >>>>>> >>>>>> Signed-off-by: Ryan Eatmon >>>>>> --- >>>>>> include/configs/am64x_evm.h | 4 ++-- >>>>>> include/configs/am65x_evm.h | 2 +- >>>>>> include/configs/j721e_evm.h | 6 +++--- >>>>>> include/configs/j721s2_evm.h | 6 +++--- >>>>>> 4 files changed, 9 insertions(+), 9 deletions(-) >>>>>> >>>>>> diff --git a/include/configs/am64x_evm.h b/include/configs/am64x_evm.h >>>>>> index 26a7f2521e..456a44730c 100644 >>>>>> --- a/include/configs/am64x_evm.h >>>>>> +++ b/include/configs/am64x_evm.h >>>>>> @@ -26,9 +26,9 @@ >>>>>> #define EXTRA_ENV_AM642_BOARD_SETTINGS \ >>>>>> "findfdt=" \ >>>>>> "if test $board_name = am64x_gpevm; then " \ >>>>>> - "setenv fdtfile k3-am642-evm.dtb; fi; " \ >>>>>> + "setenv fdtfile ti_k3-am642-evm.dtb; fi; " \ >>>>>> "if test $board_name = am64x_skevm; then " \ >>>>>> - "setenv fdtfile k3-am642-sk.dtb; fi;" \ >>>>>> + "setenv fdtfile ti_k3-am642-sk.dtb; fi;" \ >>>>> >>>>> >>>>> Kernel.org builds k3-am642-sk.dtb >>>>> >>>> >>>> Nope, kernel.org build ti/k3-am642-sk.dtb >>>> >>>>> Why would we want to go and fix it with non-standard? >>>>> >>>> >>>> The dtbs need to have their dir prefixed or there could be collisions >>> >>> The key here is we're talking about what's used in FIT images, and not >>> just loaded directly. All of the cases where fdtfile is used on arm64 >>> platforms in tree today use "/" because it's loading a literal. In this >>> case, why again is OE mangling the name, and what are we using it for >>> again here? In other words, why can't it be treated as "/" to match the >>> load a file case? And if it _must_ be mangled, must we still use fdtfile >>> and not something else? >>> >> >> So to match other plats, we should: >> >> setenv fdtfile ti/k3-am642-sk.dtb >> >> That way loading works in the non-FIT case (and we just need to stop moving >> all the DTBs out of the ti/ to the root dir (which is probably broken on our >> part anyway..)) > > Yes, this sounds right for the non-FIT case to match other platforms / > etc. > >> Then when we use "fdtfile" in the FIT case, we just mangle ("/"->"_") it >> at that point only before use. That work for everyone? > > Well, what _is_ the FIT case and how does it go exactly? I still want to > know why we're mangling things and come up with something that'll work > for when someone says "I've got an imx8mm and I'm using a FIT image from > OE and this doesn't work!". > So what happens is when OE is packaging a dtb file into the FIT image it names the node based on the dtb filename. Node names can't have / so it is turned into _ [0]. We select our FIT config using the "fdtfile" env var so we don't duplicate the above board_name to fdt logic. Result is fdtfile needs mangled when used to select a config node from OE made FIT image. Andrew [0] https://git.openembedded.org/openembedded-core/tree/meta/classes-recipe/kernel-fitimage.bbclass#n425