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 32737C433EF for ; Tue, 19 Apr 2022 23:01:43 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 49C6483DC5; Wed, 20 Apr 2022 01:01: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=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="LMHSZfYr"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5CF0383E04; Wed, 20 Apr 2022 01:01:40 +0200 (CEST) Received: from mail-qv1-xf36.google.com (mail-qv1-xf36.google.com [IPv6:2607:f8b0:4864:20::f36]) (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 9645480269 for ; Wed, 20 Apr 2022 01:01:37 +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-qv1-xf36.google.com with SMTP id a5so164309qvx.1 for ; Tue, 19 Apr 2022 16:01:37 -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=pwE1LIf+4mzLjqO59NZFmkPAJ/RlLGBiRHigkrgeAoc=; b=LMHSZfYrrK/e5fYArCIeQ+eo675nDesFuvAA0n3ET7rxCYxDfyDnp6cjRqcR38PnSq z/szQ7T25Ij3v+iH8IrkgoLamfYbbcpEG0xkVFUMGBmgn7FoM3HZCsiZAhdHettrIaol gqFvS3mPkHiDg+3A2kzBNs+6WXxOBKpnHveSQ= 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=pwE1LIf+4mzLjqO59NZFmkPAJ/RlLGBiRHigkrgeAoc=; b=4vBzToRE7cQ7EDf4e1PspnebK2MwgOQJNQqz1ZSeE21UkU1ncZNcjhiySn4PXjV9+b QqB6wJYjGMqNcKaQ88XRdr1YDXfRBRX1K7O4CWQ6X3H170aAzypDEPQSysxk1FzuUENy gBclebMQu85XiRpS4DZS9W+CbiWMjF/Akt7dOi4zESYv8/ASuQNMD7Czfx+ljDqOh3sm I7otdTSdzdDDeNoLMZ/JBovTR8glFK743iDO7XKSVzU3ywBiI+yeN9KSPUyZi47k0hyc nulvA16wpAfKmsWen/V5lp6pUii1ngf/QPCity2wNfaNnkOrwVx0i94ofy1pPap6p6ny l1yQ== X-Gm-Message-State: AOAM533j/+MKqOq/zdn69SgiuBZMx0YEE11AJadf4CnVKMzXS06IWFWs TYyQ6orqHFnvCtpIFHud0lFNXQ== X-Google-Smtp-Source: ABdhPJyuEPcDMa2mr8UX384O2NLoZ6y3qhaX7Nl3QH/Ll1vyxQ/WtOKIP7iVwNStg6GqESjFZkvrTA== X-Received: by 2002:ad4:5ccc:0:b0:446:6bf1:42fb with SMTP id iu12-20020ad45ccc000000b004466bf142fbmr6033810qvb.117.1650409296267; Tue, 19 Apr 2022 16:01:36 -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 z8-20020ac87f88000000b002e1cecad0e4sm760363qtj.33.2022.04.19.16.01.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Apr 2022 16:01:35 -0700 (PDT) Date: Tue, 19 Apr 2022 19:01:33 -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: <20220419230133.GX3045430@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> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="80Ds8Z/hZmemMosa" Content-Disposition: inline In-Reply-To: <2c7c9217-ad4c-3de4-da82-ca9ba3948ca3@canonical.com> 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 --80Ds8Z/hZmemMosa Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Apr 20, 2022 at 12:20:43AM +0200, Heinrich Schuchardt wrote: > On 4/19/22 23:54, Simon Glass wrote: > > Hi Heinrich, > > > > On Tue, 19 Apr 2022 at 15:14, Heinrich Schuchardt > > wrote: > >> > >> In some scenarios it is desirable to package U-Boot with other files i= nto > >> 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'. > >> > >> 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 > > > > Can this use binman to create the image and find the memdisk? >=20 > binman requires board specific layout information. I cannot see how binman > would help for a Kconfig option that can be switched on and off for any > board. >=20 > binman may provide addresses in the control device-tree which later could= be > relocated. But this seems to result in a larger image size. This is something analogous to the initrd/initramfs framework within the Linux kernel, yes? --=20 Tom --80Ds8Z/hZmemMosa Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmJfP00ACgkQFHw5/5Y0 tyzgJQv5AW3zBPBoUChCsmqdl1y1Qgg7zTwwOkMt/aTYBLkBuaNa1lkouy17pEF7 3SOBRtCLHkZ0xzEFzGQqyuxRfyYW9NngSeOWmFDY9dO7osO0c7NxfuXky0wfiW+f NuOUjzPcGdUphp0kE8gQlTuArkceoD7u2Y143Dlavfoq4lP3l5cwV5c2YsLlCJkc N3xXP424ncxEKmThmm0QFyT4ogrIU1yixGQAy6svkfJCRq2qc8saRM1hsI9NrueF DBkDd46hrPgSg6Nf1Gz7unksp4AfqFT1jMqIObiIrjgHGsAu/5642k8y7kVlnk03 nLMbuAaNM+D46zwaH+08R5Yv+218xkb+iAKCh01kLQz9XqA0HpUDPhaIzpDb4jFD cZRNaiN+JPrqYcDV1NSAWtdKUQ4d6+qhYeSPSPnB33WfZ38kcCXCaOYAgDDmLd+H GlZYzfaF17gCkqFVov3ZfKMz2dk5IuwI+CInO3Wi0tGu7gpUJMbca/zyGT304RrO HpH245yH =cgyH -----END PGP SIGNATURE----- --80Ds8Z/hZmemMosa--