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 9272DC00140 for ; Thu, 18 Aug 2022 08:17:13 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DEA1B84A9C; Thu, 18 Aug 2022 10:17:04 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org 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=chromium.org header.i=@chromium.org header.b="A5wq92DU"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 099D684A96; Thu, 18 Aug 2022 10:17:01 +0200 (CEST) Received: from mail-il1-x12d.google.com (mail-il1-x12d.google.com [IPv6:2607:f8b0:4864:20::12d]) (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 4217B84A9C for ; Thu, 18 Aug 2022 10:16:56 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x12d.google.com with SMTP id b15so457776ilq.10 for ; Thu, 18 Aug 2022 01:16:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=UDcJuw9GoAtpeEgnK3CP0IaosT4iTOVlXlYMEcQFq1Y=; b=A5wq92DUZ7RaloXP8/NgdUzPgOcVP2CBA4Mbhyi4vVBhgUlxRxXDbYdFhNVSibXmzs murMVxJjXRapPNu61+EwRkwPC9LOYsUGGKD+Knw209SJPsuxJUSsn7c6P1rrqXDl6bRJ aVcM3dHW4RY0Hx58Od3hLadfT9LsJe6PAKepc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=UDcJuw9GoAtpeEgnK3CP0IaosT4iTOVlXlYMEcQFq1Y=; b=CE3F0J+TbdTDGh6GpfIi1Ya7k1CuQumM4Uh4nR+dYHh1ETKZqALm3X9KITgbRsSojY LYUxcMkCmmDwq3DKG/g51OWEtpSiy097zTIzdZo+5uoL9OofHHxIunWgeLOG1Z4B2Kpq j9iF2U0eoQ216JwUkGZuDrmky0JM2C6lvBO3fY/fTiVfaxEER0IPQc2wMEVpkduHu1wC fcWS59c/i1xmsfMuFvcuINxuS/+OA5bGsLdp4Ozv0Djzw+c/BIMdmqnVRFQg3nExdofj WFEJYQkfVKA4L8v4jn8j9FfC1CGJ9lydPqS/5Ao/5jwPblvg7Gt7dy6ir4oJUcgYw7dx aOgA== X-Gm-Message-State: ACgBeo1BygkL6edzoIuGzbh6UkLmcmWXTTDCVqHck7bMCkX9BQjukFhX yp2kjdoZrRi4A+Gx1oQMW9rz5tJw1xXWiA== X-Google-Smtp-Source: AA6agR4LB4rvBZM/BUIHH1SsJAPW/QTuBjP4uweSPgIampOl9bdmdlPZ7T+z0Vx0REyD/vDXKiS+0A== X-Received: by 2002:a05:6e02:810:b0:2e8:ee33:d475 with SMTP id u16-20020a056e02081000b002e8ee33d475mr978939ilm.9.1660810614588; Thu, 18 Aug 2022 01:16:54 -0700 (PDT) Received: from sjg1.roam.corp.google.com (c-67-190-102-125.hsd1.co.comcast.net. [67.190.102.125]) by smtp.gmail.com with ESMTPSA id p3-20020a0566022b0300b0067ba7abc4cesm540798iov.50.2022.08.18.01.16.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Aug 2022 01:16:54 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Xavier Drudis Ferran , Quentin Schulz , Alper Nebi Yasak , Simon Glass Subject: [PATCH 2/2] binman: Document how to handle dependent images Date: Thu, 18 Aug 2022 02:16:46 -0600 Message-Id: <20220818081647.210263-2-sjg@chromium.org> X-Mailer: git-send-email 2.37.1.595.g718a3a8f04-goog In-Reply-To: <20220818081647.210263-1-sjg@chromium.org> References: <20220818081647.210263-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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.6 at phobos.denx.de X-Virus-Status: Clean Binman does not support this properly at present. Add documentation about it including a work-around. Signed-off-by: Simon Glass --- tools/binman/binman.rst | 50 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/tools/binman/binman.rst b/tools/binman/binman.rst index f85d13b700a..7cfac724b84 100644 --- a/tools/binman/binman.rst +++ b/tools/binman/binman.rst @@ -858,6 +858,55 @@ allow-repack: image description to be stored in the FDT and fdtmap. +Image dependencies +------------------ + +Binman does not currently support images that depend on each other. For example, +if one image creates `fred.bin` and then the next uses this `fred.bin` to +produce a final `image.bin`, then the behaviour is undefined. It may work, or it +may produce an error about `fred.bin` being missing, or it may use a version of +`fred.bin` from a previous run. + +Often this can be handled by incorporating the dependency into the second +image. For example, instead of:: + + binman { + multiple-images; + + fred { + u-boot { + }; + fill { + size = <0x100>; + }; + }; + + image { + blob { + filename = "fred.bin"; + }; + u-boot-spl { + }; + }; + +you can do this:: + + binman { + image { + fred { + type = "section"; + u-boot { + }; + fill { + size = <0x100>; + }; + }; + u-boot-spl { + }; + }; + + + Hashing Entries --------------- @@ -1690,6 +1739,7 @@ Some ideas: Perhaps it should completely regenerate the flat tree? - Put faked files into a separate subdir and remove them on start-up, to avoid seeing them as 'real' files on a subsequent run +- Support images which depend on each other -- Simon Glass -- 2.37.1.595.g718a3a8f04-goog