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 57ECEC433EF for ; Wed, 20 Apr 2022 13:37:49 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7DEB483DE7; Wed, 20 Apr 2022 15:37:46 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.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=konsulko.com header.i=@konsulko.com header.b="gxsq3tmV"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D3A1F83DFB; Wed, 20 Apr 2022 15:37:44 +0200 (CEST) Received: from mail-qt1-x82b.google.com (mail-qt1-x82b.google.com [IPv6:2607:f8b0:4864:20::82b]) (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 DB0CA83DD3 for ; Wed, 20 Apr 2022 15:37:41 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qt1-x82b.google.com with SMTP id t26so942992qtn.6 for ; Wed, 20 Apr 2022 06:37:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=iNJ7FCKpi6+x7NNcQFvrie99Hpot/4BpOPyP0mMRYSw=; b=gxsq3tmVf0oQABj0bEdxQuKr7F8WmOYKMmchN7xIs7kNrzoaeV9n7Pz7oVIcByarrx st+7nnWzeIFjeOc5Lvo4ZCSQna5Uq58lwELn8yeSNipI+wBOZmrWF2evY9oWkd08B0Y3 95jpfyNVjCetaHQ27QLPnO5ZG5kVLLrgwPP+4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=iNJ7FCKpi6+x7NNcQFvrie99Hpot/4BpOPyP0mMRYSw=; b=hLK8575Bgb9QY0ldVHKEkm4pUHboLi+D/Dnf/4c5fSUtGIpo+Px7RCuFc9X4Dg+3n9 fil1oUvqvrDXmfbrOkDOyFg1U7qT0Dsd4DTCd2jFZe6s2UYVx2Ycc6PP6zC0cE4pYWno nbsiCcLKzs8ybJkm8kpN4PPUQnCFFcm2Oh5JoehFK/cgjmC0QhqxvaUXGXWGqvpjDmJB GZ8ydyci9h7mR3CpsYN/EAc3gtkyXdJHmgqnnFPnvagkOPfL6vEK/rIbxQP4lWecYoM5 qeoe7PzND9XKDLj6LzH6GnPRCBoIIGnJ+CTbQhSR0CyCtj75svwPm/iZwlRHkfc3KEwd njOQ== X-Gm-Message-State: AOAM531RRuarUWf3WrKhsGOsXv5qdaR4ZOFkmY3L8dsV+2Q3o+7x+yT6 5UeQeCOL5LbBLUP/Si2RLNeFCw== X-Google-Smtp-Source: ABdhPJxzwgOAGCR5uJS11HvKCF6JItp0nmgQNougFDTGRV4M0CTQQV1zQPY3EYXb1cRL4CMx91jwqg== X-Received: by 2002:a05:622a:2d0:b0:2f3:441b:d31c with SMTP id a16-20020a05622a02d000b002f3441bd31cmr1027111qtx.82.1650461860693; Wed, 20 Apr 2022 06:37:40 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b01-cbda-2ef0-5dff-fedb-a8ba.res6.spectrum.com. [2603:6081:7b01:cbda:2ef0:5dff:fedb:a8ba]) by smtp.gmail.com with ESMTPSA id y25-20020a05620a09d900b0069e82fb9310sm1447048qky.15.2022.04.20.06.37.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Apr 2022 06:37:39 -0700 (PDT) Date: Wed, 20 Apr 2022 09:37:38 -0400 From: Tom Rini To: Heinrich Schuchardt Cc: Simon Glass , u-boot@lists.denx.de Subject: Re: [PATCH 1/1] drivers: add memory disk support Message-ID: <20220420133738.GL3045430@bill-the-cat> References: <20220419211641.316935-1-heinrich.schuchardt@canonical.com> <20220419212651.GS3045430@bill-the-cat> <14f67fd8-623a-2054-e995-73d54898b886@canonical.com> <2c7c9217-ad4c-3de4-da82-ca9ba3948ca3@canonical.com> <20220419230133.GX3045430@bill-the-cat> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="zgr1mbP1ee4HJQ5m" Content-Disposition: inline In-Reply-To: X-Clacks-Overhead: GNU Terry Pratchett 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 --zgr1mbP1ee4HJQ5m Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Apr 20, 2022 at 08:48:28AM +0200, Heinrich Schuchardt wrote: >=20 >=20 > On 4/20/22 01:01, Tom Rini wrote: > > On Wed, Apr 20, 2022 at 12:20:43AM +0200, Heinrich Schuchardt wrote: > > > On 4/19/22 23:54, Simon Glass wrote: > > > > Hi Heinrich, > > > >=20 > > > > On Tue, 19 Apr 2022 at 15:14, Heinrich Schuchardt > > > > wrote: > > > > >=20 > > > > > In some scenarios it is desirable to package U-Boot with other fi= les into > > > > > a single blob. This patch allows to embed a memory disk into the = U-Boot > > > > > binary. This memory disk can be accessed like any other block > > > > > device as 'mem 0'. > > > > >=20 > > > > > Signed-off-by: Heinrich Schuchardt > > > > > --- > > > > > MAINTAINERS | 6 ++ > > > > > common/board_r.c | 4 + > > > > > drivers/Kconfig | 2 + > > > > > drivers/Makefile | 1 + > > > > > drivers/block/blk-uclass.c | 2 + > > > > > drivers/memdisk/Kconfig | 13 ++++ > > > > > drivers/memdisk/Makefile | 11 +++ > > > > > drivers/memdisk/memdisk-uclass.c | 22 ++++++ > > > > > drivers/memdisk/memdisk.c | 128 +++++++++++++++++++++++= ++++++++ > > > > > drivers/memdisk/memdisk_file.S | 17 ++++ > > > > > include/asm-generic/sections.h | 2 + > > > > > include/blk.h | 1 + > > > > > include/dm/uclass-id.h | 1 + > > > > > include/memdisk.h | 28 +++++++ > > > > > 14 files changed, 238 insertions(+) > > > > > create mode 100644 drivers/memdisk/Kconfig > > > > > create mode 100644 drivers/memdisk/Makefile > > > > > create mode 100644 drivers/memdisk/memdisk-uclass.c > > > > > create mode 100644 drivers/memdisk/memdisk.c > > > > > create mode 100644 drivers/memdisk/memdisk_file.S > > > > > create mode 100644 include/memdisk.h > > > >=20 > > > > Can this use binman to create the image and find the memdisk? > > >=20 > > > binman requires board specific layout information. I cannot see how b= inman > > > would help for a Kconfig option that can be switched on and off for a= ny > > > board. > > >=20 > > > binman may provide addresses in the control device-tree which later c= ould be > > > relocated. But this seems to result in a larger image size. > >=20 > > This is something analogous to the initrd/initramfs framework within the > > Linux kernel, yes? >=20 > Yes, it is like appending an initrd to a kernel. I'm not super comfortable with that concept, and want to see the use case spelled out a lot more. --=20 Tom --zgr1mbP1ee4HJQ5m Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmJgDJ4ACgkQFHw5/5Y0 tywKwAwArXGX3xDNNSER26MS3Jl/3SR39J02CgNB1WnyP0WaNctTUBHy5sKYtsc5 BAHNeWdLXKJ2Vb6TldZXAM+fsITzJjoeQzWkdsioILOjfIgykOFrmK3YvO4QGvwy GFIfSvTzNMt7c8zIILrSa7W5WxACZnfykjBl7B46bQlRXn5LdokfffCdxevChlkv 2vDbizlvahKXhWuNn2/HoNJxeCrFK3SsGOG1zW0D/zicqMFaskZGEscZvQlmH+rl zjjyfgy3Zbmy1SNYzxIYxmSCGzLY1GQI+el2K8ZDtMV3Ce6B9crx2qCNR8rz6Qah f1Nt5dUODhFUUDhvuLpE4Boy/wh5u2kE3ocqYLDjKJ6plkAidgiOqkiFt89czQdM eh6CyPaj9q0xOADogtunE40smYv16PYoCtSYdDS5tc82CsBamlhkguKXqmxM5Md1 pCP/Trj+ubIRLjolZZbO/G7otpTGQz38hQ9Q8wxsZJ2zeZyH7vudNhpOZc95LGns /nsslNQO =SoA9 -----END PGP SIGNATURE----- --zgr1mbP1ee4HJQ5m--