From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Fri, 25 Aug 2023 14:00:45 +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 1qZVUc-008Q9Y-Jp for lore@lore.pengutronix.de; Fri, 25 Aug 2023 14:00:45 +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 1qZVUa-0000hK-1U; Fri, 25 Aug 2023 14:00:44 +0200 Received: from pty.hi.pengutronix.de ([2001:67c:670:100:1d::c5]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qZVUU-0000gu-Us; Fri, 25 Aug 2023 14:00:38 +0200 Received: from rsc by pty.hi.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1qZVUU-00EVhH-Hp; Fri, 25 Aug 2023 14:00:38 +0200 Date: Fri, 25 Aug 2023 14:00:38 +0200 From: Robert Schwebel To: Juergen Borleis Message-ID: References: <20230825111056.32801-1-jbe@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230825111056.32801-1-jbe@pengutronix.de> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-Accept-Language: de,en X-Accept-Content-Type: text/plain Subject: Re: [DistroKit] [PATCH v2] v7a: barebox: enable loading kernel, dtb and initrd via fastboot 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: distrokit@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 Applied to next On Fri, Aug 25, 2023 at 01:10:56PM +0200, Juergen Borleis wrote: > This change is similar to: > > 2732f93bcf4ee011cecca3518aec7e523c311d7a > "v8a: barebox: enable loading kernel, dtb and initrd via fastboot" > > but for some of the v7a platforms. Due to the absence of a common environment > it only can be added for the i.MX6 based systems for now. > > This change prepares all v7a platforms to load kernel, dtb and initrd as > sparse images to RAM-files for rapid development. > It exposes mmc{1,2,3} as 'fastboot' partitions and add init script to > force barebox to detect these devices and have them available for > 'fastboot'. > > It autostarts the USB gadget and network capability to use 'fastboot' out of > the box. > > Signed-off-by: Juergen Borleis > --- > .../barebox-mx6-defaultenv/boot/ram-fastboot | 7 +++++++ > .../barebox-mx6-defaultenv/init/detect-mmcs | 3 +++ > .../barebox-mx6-defaultenv/nv/fastboot.acm | 1 + > .../barebox-mx6-defaultenv/nv/fastboot.bbu | 1 + > .../barebox-mx6-defaultenv/nv/fastboot.net.autostart | 1 + > .../barebox-mx6-defaultenv/nv/fastboot.partitions | 1 + > .../barebox-mx6-defaultenv/nv/usbgadget.autostart | 1 + > configs/platform-v7a/kernelconfig | 11 ++++++++++- > configs/platform-v7a/platformconfig | 10 +++++++++- > 9 files changed, 34 insertions(+), 2 deletions(-) > create mode 100755 configs/platform-v7a/barebox-mx6-defaultenv/boot/ram-fastboot > create mode 100644 configs/platform-v7a/barebox-mx6-defaultenv/init/detect-mmcs > create mode 100644 configs/platform-v7a/barebox-mx6-defaultenv/nv/fastboot.acm > create mode 100644 configs/platform-v7a/barebox-mx6-defaultenv/nv/fastboot.bbu > create mode 100644 configs/platform-v7a/barebox-mx6-defaultenv/nv/fastboot.net.autostart > create mode 100644 configs/platform-v7a/barebox-mx6-defaultenv/nv/fastboot.partitions > create mode 100644 configs/platform-v7a/barebox-mx6-defaultenv/nv/usbgadget.autostart > > diff --git a/configs/platform-v7a/barebox-mx6-defaultenv/boot/ram-fastboot b/configs/platform-v7a/barebox-mx6-defaultenv/boot/ram-fastboot > new file mode 100755 > index 0000000..ff17b26 > --- /dev/null > +++ b/configs/platform-v7a/barebox-mx6-defaultenv/boot/ram-fastboot > @@ -0,0 +1,7 @@ > +#!/bin/sh > + > +global.bootm.image=/tmp/ram-kernel > +global.bootm.initrd=/tmp/ram-initramfs > +global.bootm.oftree=/tmp/ram-oftree > + > +global.linux.bootargs.dyn.root="rdinit=/sbin/init" > diff --git a/configs/platform-v7a/barebox-mx6-defaultenv/init/detect-mmcs b/configs/platform-v7a/barebox-mx6-defaultenv/init/detect-mmcs > new file mode 100644 > index 0000000..0db902d > --- /dev/null > +++ b/configs/platform-v7a/barebox-mx6-defaultenv/init/detect-mmcs > @@ -0,0 +1,3 @@ > +#!/bin/sh > + > +detect mmc1 mmc2 mmc3 > diff --git a/configs/platform-v7a/barebox-mx6-defaultenv/nv/fastboot.acm b/configs/platform-v7a/barebox-mx6-defaultenv/nv/fastboot.acm > new file mode 100644 > index 0000000..d00491f > --- /dev/null > +++ b/configs/platform-v7a/barebox-mx6-defaultenv/nv/fastboot.acm > @@ -0,0 +1 @@ > +1 > diff --git a/configs/platform-v7a/barebox-mx6-defaultenv/nv/fastboot.bbu b/configs/platform-v7a/barebox-mx6-defaultenv/nv/fastboot.bbu > new file mode 100644 > index 0000000..d00491f > --- /dev/null > +++ b/configs/platform-v7a/barebox-mx6-defaultenv/nv/fastboot.bbu > @@ -0,0 +1 @@ > +1 > diff --git a/configs/platform-v7a/barebox-mx6-defaultenv/nv/fastboot.net.autostart b/configs/platform-v7a/barebox-mx6-defaultenv/nv/fastboot.net.autostart > new file mode 100644 > index 0000000..d00491f > --- /dev/null > +++ b/configs/platform-v7a/barebox-mx6-defaultenv/nv/fastboot.net.autostart > @@ -0,0 +1 @@ > +1 > diff --git a/configs/platform-v7a/barebox-mx6-defaultenv/nv/fastboot.partitions b/configs/platform-v7a/barebox-mx6-defaultenv/nv/fastboot.partitions > new file mode 100644 > index 0000000..15c7d42 > --- /dev/null > +++ b/configs/platform-v7a/barebox-mx6-defaultenv/nv/fastboot.partitions > @@ -0,0 +1 @@ > +/dev/mmc1(mmc1)o,/dev/mmc2(mmc2)o,/dev/mmc3(mmc3)o,/tmp/ram-kernel(ram-kernel)c,/tmp/ram-initramfs(ram-initramfs)c,/tmp/ram-oftree(ram-oftree)c > diff --git a/configs/platform-v7a/barebox-mx6-defaultenv/nv/usbgadget.autostart b/configs/platform-v7a/barebox-mx6-defaultenv/nv/usbgadget.autostart > new file mode 100644 > index 0000000..d00491f > --- /dev/null > +++ b/configs/platform-v7a/barebox-mx6-defaultenv/nv/usbgadget.autostart > @@ -0,0 +1 @@ > +1 > diff --git a/configs/platform-v7a/kernelconfig b/configs/platform-v7a/kernelconfig > index ef19091..228358a 100644 > --- a/configs/platform-v7a/kernelconfig > +++ b/configs/platform-v7a/kernelconfig > @@ -190,7 +190,15 @@ CONFIG_NET_NS=y > # CONFIG_CHECKPOINT_RESTORE is not set > # CONFIG_SCHED_AUTOGROUP is not set > # CONFIG_RELAY is not set > -# CONFIG_BLK_DEV_INITRD is not set > +CONFIG_BLK_DEV_INITRD=y > +CONFIG_INITRAMFS_SOURCE="" > +CONFIG_RD_GZIP=y > +# CONFIG_RD_BZIP2 is not set > +# CONFIG_RD_LZMA is not set > +# CONFIG_RD_XZ is not set > +# CONFIG_RD_LZO is not set > +# CONFIG_RD_LZ4 is not set > +# CONFIG_RD_ZSTD is not set > # CONFIG_BOOT_CONFIG is not set > CONFIG_INITRAMFS_PRESERVE_MTIME=y > CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y > @@ -4089,6 +4097,7 @@ CONFIG_XZ_DEC_ARM=y > # CONFIG_XZ_DEC_MICROLZMA is not set > CONFIG_XZ_DEC_BCJ=y > # CONFIG_XZ_DEC_TEST is not set > +CONFIG_DECOMPRESS_GZIP=y > CONFIG_GENERIC_ALLOCATOR=y > CONFIG_ASSOCIATIVE_ARRAY=y > CONFIG_HAS_IOMEM=y > diff --git a/configs/platform-v7a/platformconfig b/configs/platform-v7a/platformconfig > index 1ecbda0..29a884b 100644 > --- a/configs/platform-v7a/platformconfig > +++ b/configs/platform-v7a/platformconfig > @@ -261,7 +261,15 @@ PTXCONF_IMAGE_KERNEL_INSTALL_EARLY=y > PTXCONF_IMAGE_LXA_MC1=y > # PTXCONF_IMAGE_RAUC is not set > PTXCONF_IMAGE_RIOTBOARD=y > -# PTXCONF_IMAGE_ROOT_CPIO is not set > +PTXCONF_IMAGE_ROOT_CPIO=y > +# PTXCONF_IMAGE_ROOT_CPIO_COMPRESSION_MODE_NONE is not set > +PTXCONF_IMAGE_ROOT_CPIO_COMPRESSION_MODE_GZ=y > +# PTXCONF_IMAGE_ROOT_CPIO_COMPRESSION_MODE_ZSTD is not set > +# PTXCONF_IMAGE_ROOT_CPIO_COMPRESSION_MODE_XZ is not set > +# PTXCONF_IMAGE_ROOT_CPIO_COMPRESSION_MODE_LZOP is not set > +# PTXCONF_IMAGE_ROOT_CPIO_CUSTOM_COMPRESSION is not set > +PTXCONF_IMAGE_ROOT_CPIO_COMPRESSION_SUFFIX=".gz" > +PTXCONF_IMAGE_ROOT_CPIO_COMPRESSION_UTIL="gzip" > PTXCONF_IMAGE_ROOT_EXT=y > PTXCONF_IMAGE_ROOT_EXT_SIZE="125%" > # PTXCONF_IMAGE_ROOT_EXT_EXT2 is not set > -- > 2.30.2 > > > -- Pengutronix e.K. | Dipl.-Ing. Robert Schwebel | Steuerwalder Str. 21 | https://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |