DistroKit Mailinglist
 help / color / mirror / Atom feed
* [DistroKit] [PATCH v2] v7a: barebox: enable loading kernel, dtb and initrd via fastboot
@ 2023-08-25 11:10 Juergen Borleis
  2023-08-25 12:00 ` Robert Schwebel
  0 siblings, 1 reply; 5+ messages in thread
From: Juergen Borleis @ 2023-08-25 11:10 UTC (permalink / raw)
  To: distrokit

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 <jbe@pengutronix.de>
---
 .../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




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [DistroKit] [PATCH v2] v7a: barebox: enable loading kernel, dtb and initrd via fastboot
  2023-08-25 11:10 [DistroKit] [PATCH v2] v7a: barebox: enable loading kernel, dtb and initrd via fastboot Juergen Borleis
@ 2023-08-25 12:00 ` Robert Schwebel
  2023-08-28  6:11   ` Robert Schwebel
  0 siblings, 1 reply; 5+ messages in thread
From: Robert Schwebel @ 2023-08-25 12:00 UTC (permalink / raw)
  To: Juergen Borleis; +Cc: distrokit

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 <jbe@pengutronix.de>
> ---
>  .../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    |



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [DistroKit] [PATCH v2] v7a: barebox: enable loading kernel, dtb and initrd via fastboot
  2023-08-25 12:00 ` Robert Schwebel
@ 2023-08-28  6:11   ` Robert Schwebel
  2023-08-28 12:32     ` [DistroKit] [PATCH] fixup! " Roland Hieber
  0 siblings, 1 reply; 5+ messages in thread
From: Robert Schwebel @ 2023-08-28  6:11 UTC (permalink / raw)
  To: Juergen Borleis, Jan Luebbe; +Cc: distrokit

Moin,

On Fri, Aug 25, 2023 at 02:00:38PM +0200, Robert Schwebel wrote:
> Applied to next

This patch makes our internal qa tooling unhappy:

--- reference
+++ suggested
@@ -1,5 +1,11 @@
 kernel_initrd:
+  history:
+    kernel_config.ref[0]:
+      description: Initrd support is not needed on most embedded systems.
+      analyzer: kconfig.KernelConfig()['BLK_DEV_INITRD']
+      value: False
   description: |
     Initrd support is not needed on most embedded systems.
     For v8a, we use an initrd for the fastboot usecase.
   matched: ''
+  value: True

For reference, see:
https://jenkins.stw.pengutronix.de/view/Favorites/job/ptxdist-bsps/job/DistroKit/job/next-v7a/512/testReport/junit/reason-bsp_ref/bsp/kernel_initrd/

Jan, what's the best way to catch this in 'reason'? I tried to match on
'PLATFORM' and use value: 'v7a', but this doesn't work. Matching on ARCH_ARM
isn't an option, as we have platform-rpi1.

rsc

> 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 <jbe@pengutronix.de>
> > ---
> >  .../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    |

-- 
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    |



^ permalink raw reply	[flat|nested] 5+ messages in thread

* [DistroKit] [PATCH] fixup! v7a: barebox: enable loading kernel, dtb and initrd via fastboot
  2023-08-28  6:11   ` Robert Schwebel
@ 2023-08-28 12:32     ` Roland Hieber
  2023-09-15 14:00       ` Robert Schwebel
  0 siblings, 1 reply; 5+ messages in thread
From: Roland Hieber @ 2023-08-28 12:32 UTC (permalink / raw)
  To: rsc; +Cc: distrokit, jbe, jlu, Roland Hieber

Signed-off-by: Roland Hieber <rhi@pengutronix.de>
---
On Mon, Aug 28, 2023 at 08:11:07AM +0200, Robert Schwebel wrote:         
> Jan, what's the best way to catch this in 'reason'? I tried to match on
> 'PLATFORM' and use value: 'v7a', but this doesn't work. Matching on ARCH_ARM
> isn't an option, as we have platform-rpi1.                             
                                                                         
I don't know how your condition looked, but the patch below works for    
me. A similar expression is already a few lines further above in the     
kernel_dtb_partitions check (although the .get() should not be needed    
here as PTXCONF_PLATFORM is always defined).  

 configs/bsp.ref | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configs/bsp.ref b/configs/bsp.ref
index cb91c780516f..d20eb70afd45 100644
--- a/configs/bsp.ref
+++ b/configs/bsp.ref
@@ -29,7 +29,7 @@ kernel_initrd:
     Initrd support is not needed on most embedded systems.
     For v8a, we use an initrd for the fastboot usecase.
   variants:
-    - condition: kconfig.PTXPlatformConfig()['ARCH_ARM64']
+    - condition: kconfig.PTXPlatformConfig().options['PLATFORM'] in ('v8a', 'v7a')
       value: True
     - value: False
 
-- 
2.39.2




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [DistroKit] [PATCH] fixup! v7a: barebox: enable loading kernel, dtb and initrd via fastboot
  2023-08-28 12:32     ` [DistroKit] [PATCH] fixup! " Roland Hieber
@ 2023-09-15 14:00       ` Robert Schwebel
  0 siblings, 0 replies; 5+ messages in thread
From: Robert Schwebel @ 2023-09-15 14:00 UTC (permalink / raw)
  To: Roland Hieber; +Cc: distrokit, jbe, jlu

Ported to current -next, folded into the original patch.

On Mon, Aug 28, 2023 at 02:32:48PM +0200, Roland Hieber wrote:
> Signed-off-by: Roland Hieber <rhi@pengutronix.de>
> ---
> On Mon, Aug 28, 2023 at 08:11:07AM +0200, Robert Schwebel wrote:         
> > Jan, what's the best way to catch this in 'reason'? I tried to match on
> > 'PLATFORM' and use value: 'v7a', but this doesn't work. Matching on ARCH_ARM
> > isn't an option, as we have platform-rpi1.                             
>                                                                          
> I don't know how your condition looked, but the patch below works for    
> me. A similar expression is already a few lines further above in the     
> kernel_dtb_partitions check (although the .get() should not be needed    
> here as PTXCONF_PLATFORM is always defined).  
> 
>  configs/bsp.ref | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/configs/bsp.ref b/configs/bsp.ref
> index cb91c780516f..d20eb70afd45 100644
> --- a/configs/bsp.ref
> +++ b/configs/bsp.ref
> @@ -29,7 +29,7 @@ kernel_initrd:
>      Initrd support is not needed on most embedded systems.
>      For v8a, we use an initrd for the fastboot usecase.
>    variants:
> -    - condition: kconfig.PTXPlatformConfig()['ARCH_ARM64']
> +    - condition: kconfig.PTXPlatformConfig().options['PLATFORM'] in ('v8a', 'v7a')
>        value: True
>      - value: False
>  
> -- 
> 2.39.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    |



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-09-15 14:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-25 11:10 [DistroKit] [PATCH v2] v7a: barebox: enable loading kernel, dtb and initrd via fastboot Juergen Borleis
2023-08-25 12:00 ` Robert Schwebel
2023-08-28  6:11   ` Robert Schwebel
2023-08-28 12:32     ` [DistroKit] [PATCH] fixup! " Roland Hieber
2023-09-15 14:00       ` Robert Schwebel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox