From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Fri, 09 Jun 2023 12:28:53 +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 1q7ZMU-00H26O-Eu for lore@lore.pengutronix.de; Fri, 09 Jun 2023 12:28:53 +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 1q7ZMR-0001tc-L5; Fri, 09 Jun 2023 12:28:51 +0200 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q7ZMM-0001r3-U0; Fri, 09 Jun 2023 12:28:46 +0200 Received: from [2a0a:edc0:0:1101:1d::39] (helo=dude03.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1q7ZMM-006BAw-97; Fri, 09 Jun 2023 12:28:46 +0200 Received: from localhost ([::1] helo=dude03.red.stw.pengutronix.de) by dude03.red.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1q7ZMK-00CAFT-NG; Fri, 09 Jun 2023 12:28:44 +0200 From: Johannes Zink Date: Fri, 09 Jun 2023 12:28:39 +0200 Message-Id: <20230606-default_enable_fastboot_rock3a-v2-0-92606c4de9a9@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIANf+gmQC/42OSw6DIBRFt9IwLg0fpZ9R99EYw+ehpAQMoLEx7 r3UFXR4zuCeu6EMyUFGj9OGEiwuuxgqsPMJ6VGGAbAzlREjjBNBBDZg5exLD0EqD72VuagYS5+ ifnOJOWNcC0WoaK6ojiiZAaskgx7rTJi9r3JKYN16VF9d5dHlEtPnOLHQn/27t1BMcMPovTUtv xnLnhOEYS4pBrdeDKBu3/cv5d8HGeYAAAA= To: distrokit@pengutronix.de X-Mailer: b4 0.12.2 Subject: [DistroKit] [PATCH v2 0/4] enable uploading kernel, dtb and initramfs over fastboot and boot it on Rock3A 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: Johannes Zink , 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 This series enables building Android sparse images of kernel, dtb and initramfs for the Radxa Rock3A, enables mounting corresponding ram-files as fastboot partitions in the barebox fastboot gadget, and adds support for booting the image uploaded via fastboot. This can be useful in situations, where booting a Linux system is required on such target without touching the nonvolatile storage, e.g. for debugging purposes. For uploading kernel, dtb and initramfs use fastboot flash ram-kernel platform-v8a/images/linuximage -S 1 fastboot flash ram-oftree platform-v8a/images/rk3568-rock-3a.dtb -S 1 fastboot flash ram-initramfs platform-v8a/images/initramfs-sparse.img -S 1 then for booting either use the barebox command boot ram-fastboot or pass the bootcommand over fastboot from the host via fastboot oem exec boot ram-fastboot Best regards Johannes To: distrokit@pengutronix.de Cc: patchwork-jzi@pengutronix.de Signed-off-by: Johannes Zink --- Changes in v2: - worked in feedback from Ahmad, Jan and Robert (off-list). Thanks for your review and feedback! - only support zstd compressed initramfs, drop support for gzip (image generation and kernel config) - drop generation of android-sparse images. Use -S 1 parameter on fastboot command instead to avoid cut-off issues - export mmc{0,1,2} as optional partitions with generic names now, add init script to detect these partitions on boot - rename fastboot partitions {kernel,initramfs,oftree} to ram-{kernel,initramfs,oftree} to make their non-permanent state more obvious - change name of fastboot boot script to ram-fastboot for the same reason - remove unneeded root=/dev/ram from kernel cmdline for the ram-fastboot target - update commit messages and cover-letter accordingly - Link to v1: https://lore.distrokit.org/20230606-default_enable_fastboot_rock3a-v1-0-42195d538df2@pengutronix.de --- Johannes Zink (4): v8a: enable initrd generation v8a: kernel: enable initramfs in kernel config v8a: barebox: enable loading kernel, dtb and initrd via fastboot v8a: barebox: add a boot target for fastboot loaded image files .../barebox-common-defaultenv/boot/ram-fastboot | 7 +++++++ .../barebox-common-defaultenv/init/detect-mmcs | 3 +++ .../barebox-common-defaultenv/nv/fastboot.acm | 1 + .../barebox-common-defaultenv/nv/fastboot.bbu | 1 + .../barebox-common-defaultenv/nv/fastboot.partitions | 1 + .../barebox-common-defaultenv/nv/usbgadget.autostart | 1 + configs/platform-v8a/kernelconfig | 15 ++++++++++++--- configs/platform-v8a/platformconfig | 12 +++++++++++- 8 files changed, 37 insertions(+), 4 deletions(-) --- base-commit: 282b5aff9aecf141de5040f896a9a10081596350 change-id: 20230606-default_enable_fastboot_rock3a-3223c6b01647 Best regards, -- Johannes Zink