From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Tue, 06 Jun 2023 16:47:56 +0200 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1q6XyY-00D9t4-1k for lore@lore.pengutronix.de; Tue, 06 Jun 2023 16:47:56 +0200 Received: from localhost ([127.0.0.1] helo=metis.ext.pengutronix.de) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1q6XyV-0006ca-6S; Tue, 06 Jun 2023 16:47:55 +0200 Received: from ptz.office.stw.pengutronix.de ([2a0a:edc0:0:900:1d::77] helo=[127.0.0.1]) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1q6XyT-0006bl-8Z; Tue, 06 Jun 2023 16:47:53 +0200 Message-ID: <934f9d86-e7cb-ed58-7a0a-f27465f6b4d2@pengutronix.de> Date: Tue, 6 Jun 2023 16:47:47 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Content-Language: en-US, de-DE To: Ahmad Fatoum , distrokit@pengutronix.de References: <20230606-default_enable_fastboot_rock3a-v1-0-42195d538df2@pengutronix.de> <20230606-default_enable_fastboot_rock3a-v1-3-42195d538df2@pengutronix.de> From: Johannes Zink In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [DistroKit] [PATCH 3/5] v8a: images: generate sparse images from rock3a initramfs, kernel and dtb X-BeenThere: distrokit@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: DistroKit Mailinglist List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: patchwork-jzi@pengutronix.de Sender: "DistroKit" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: distrokit-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false On 6/6/23 16:41, Ahmad Fatoum wrote: > On 06.06.23 16:31, Johannes Zink wrote: >> This allows to load the images to barebox using android fastboot, since >> otherwise the sparse header is missing and the image size is not >> properly aligned as required by fastboot. > > IME fastboot just complains and transfers the files anyway. In that > case building sparse images just adds complication. Did your fastboot > command fail without this change? > Uploading non-sparse images failed with an error Invalid sparse file format at header magic error: write_sparse_skip_chunk: don't care size 45251584 is not a multiple of the block size 4096 at the host tool, which is why I decided to use sparse images. It saves upload time anyway, at least for the initramfs, so it's a good idea to use sparse images, anyway. Johannes >> >> Signed-off-by: Johannes Zink >> --- >> configs/platform-v8a/config/images/rock3a.config | 21 +++++++++++++++++++++ >> 1 file changed, 21 insertions(+) >> >> diff --git a/configs/platform-v8a/config/images/rock3a.config b/configs/platform-v8a/config/images/rock3a.config >> index 522d82cdc9c9..cb0c7c4e575d 100644 >> --- a/configs/platform-v8a/config/images/rock3a.config >> +++ b/configs/platform-v8a/config/images/rock3a.config >> @@ -44,3 +44,24 @@ image barebox-rock3a.norimg { >> image = "barebox-rock3a.img" >> } >> } >> + >> +image initramfs-sparse.img { >> + android-sparse { >> + image = "root.cpio.gz" >> + block-size = 4k >> + } >> +} >> + >> +image kernel-sparse.img { >> + android-sparse { >> + image = "linuximage" >> + block-size = 4k >> + } >> +} >> + >> +image dtb-rock3a-sparse.img { >> + android-sparse { >> + image = "rk3568-rock-3a.dtb" >> + block-size = 4k >> + } >> +} >> > -- Pengutronix e.K. | Johannes Zink | Steuerwalder Str. 21 | https://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686| Fax: +49-5121-206917-5555 |