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 ED57DC433F5 for ; Tue, 22 Feb 2022 18:58:58 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E156383A98; Tue, 22 Feb 2022 19:58:56 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="iASwHTB0"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7580F83BCF; Tue, 22 Feb 2022 19:58:54 +0100 (CET) Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 9242A838FD for ; Tue, 22 Feb 2022 19:58:51 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=alpernebiyasak@gmail.com Received: by mail-ed1-x52c.google.com with SMTP id x5so39118165edd.11 for ; Tue, 22 Feb 2022 10:58:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=HAB1em+06baPZ+8ilrzM1F3q03+beuXiFIQ89vsxjxc=; b=iASwHTB01tdRHqkyrv0dR15xNee5cONrfnbySNcqJwFaeKweCG72kPMDe53Eihj+Nb Hy/epNKT7OLbzpsyKtxex/L8tSD2d6/qw9uSpbpZnULFcdY+5ryyTzKLKmstRiklw2+n Np737tSmAb46NLcILowVkI+5JlcCeURYI9Hv5chFSsxGGUSYvRZwURssKVxfpxezxJ3M BSye/+HjsMs/yhLVaWKQ0MV80pEeB34swIDAB9YREAZNPrqF5q30L+d4WUFv9VTOHAEo AYvivBsJZlZ3AJzGwHGelgG5UqsSoDtqVEL9JC3wobvrBT+CLZPdQxJJKiQG5LD42EhZ SOxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=HAB1em+06baPZ+8ilrzM1F3q03+beuXiFIQ89vsxjxc=; b=dEKeH3l2hWoMXkVuO21R0xv6PaJqUaAKFZwNaXvzHuXVsNxFT89CdMELPBD3p3Vq46 QucGIYopgeA6924Lzl4rsgWHdAzMWy10pbRChh06uB6KhIbeVrxKcLjWMFylCQ4X0for /Q87p3667t3CDHnFFIzEMZyRy3Rn4/0/TzujFEbEKFjFciQGX5WJK+DFbJSD9LkKm708 zRFTCnG1+03TV3NsI3vE9LC4nE14B3bMc8n56AvQrZgv4bYOhrQmJG1LMZDmsJjEvnU/ T9sQI+w2uhJMbSqNl5sGmA4MqBynAdJhAY+PL0XjFp95HaWjeeNZ01cOAYcwkiMQ9KGH FYEg== X-Gm-Message-State: AOAM533tG+I9rqENnWzx3IaHJ4+4Q9SDHeKvmqxUFd3I79Xj4XTSqnmI QXeA4UW3+hrrUZFpL+5LLbI= X-Google-Smtp-Source: ABdhPJyQpL60C2M5JFby3CSZEDe5Fcb40+jN04I++0vQv9UVMuxtnnkk54Ox3drf63aUexfWCHSSWA== X-Received: by 2002:a05:6402:d0d:b0:412:d49c:74d3 with SMTP id eb13-20020a0564020d0d00b00412d49c74d3mr19366980edb.207.1645556331101; Tue, 22 Feb 2022 10:58:51 -0800 (PST) Received: from [192.168.0.74] ([178.233.26.119]) by smtp.gmail.com with ESMTPSA id a26sm6470082ejs.143.2022.02.22.10.58.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 22 Feb 2022 10:58:50 -0800 (PST) Message-ID: Date: Tue, 22 Feb 2022 21:58:46 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: Re: [PATCH v2 4/5] binman: Convert FIT entry type to a subclass of Section entry type Content-Language: en-US To: Simon Glass Cc: Jan Kiszka , U-Boot Mailing List , Heiko Thiery References: <20220207220809.4497-1-alpernebiyasak@gmail.com> <20220207220809.4497-5-alpernebiyasak@gmail.com> <1c7e5656-87f8-7d87-cb50-aead7b9a5ff1@siemens.com> <3d176bab-dc74-3ee2-9014-81401971ba8d@siemens.com> <10793ff6-12b6-7b3b-840b-c6f49f9185da@siemens.com> From: Alper Nebi Yasak In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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.5 at phobos.denx.de X-Virus-Status: Clean On 21/02/2022 07:40, Simon Glass wrote: > On Sat, 19 Feb 2022 at 08:53, Simon Glass wrote: >> On Fri, 18 Feb 2022 at 10:34, Alper Nebi Yasak wrote: >>> I can reproduce this and tried a few things, but more issues just kept >>> popping up (outside u-boot as well). I got it to a point where the >>> command re-packs the FIT and the image but quite wrongly. The offset and >>> image-pos properties get added in the FIT, and the image main-section >>> just concatenates all entries without regard to set offsets. I'll >>> need more time to work those out, then to add tests and send patches. >> >> I am going to try to merge my fit generator series today. >> >> One issue I notice is that the conversion to use entry_Section changes >> the contents of the self._fit_entries dict. Before it was keyed by >> relative path, but entry_section keys self._entries by node name. Yeah, this causes an error in image.FindEntryPath() while trying to replace e.g. "/fit@0x280000/images/u-boot" since there is no "images" entry in the FIT. Changing the key to the node name works, but then the "binman replace" invocation needs to use e.g. "/fit@0x280000/u-boot". >> >> We may need to split it up. I will see if I can at least merge my >> series, which should not make things any worse, then see if I can come >> up with ideas. >> >> Thanks for the diff. > > I did a bit more fiddling and pushed a tree to u-boot-dm/fit-working > > It refactors the fit implementation to separate scanning from emitting > the tree and I think this might help quite a bit. I'll send out the > series when I get a chance in the next few days or so. I've also managed to somewhat fix the rest of the issues I wrote, so now I can replace a FIT entry with a modified one (having a different u-boot file), or replace a subentry of the FIT with an arbitrary file. I couldn't look at your new version much but I'll try to see how good my fixes apply on top of it, will probably take me longer to patchify things.