* [DistroKit] [PATCH 2/3] v7a: barebox: enable loading kernel, dtb and initrd via fastboot
2023-08-25 10:15 [DistroKit] [PATCH 1/3] arch: fastboot: testing: fix typos Juergen Borleis
@ 2023-08-25 10:15 ` Juergen Borleis
2023-08-25 10:48 ` Robert Schwebel
2023-08-25 10:15 ` [DistroKit] [PATCH 3/3] doc: RIoT: mention the 'fastboot' capabilities Juergen Borleis
2023-08-25 10:49 ` [DistroKit] [PATCH 1/3] arch: fastboot: testing: fix typos Robert Schwebel
2 siblings, 1 reply; 6+ messages in thread
From: Juergen Borleis @ 2023-08-25 10:15 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 | 12 +++++++++++-
configs/platform-v7a/platformconfig | 10 +++++++++-
9 files changed, 35 insertions(+), 2 deletions(-)
create mode 100755 configs/platform-v7a/barebox-mx6-defaultenv/boot/ram-fastboot
create mode 100755 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 100755
index 0000000..e3433f6
--- /dev/null
+++ b/configs/platform-v7a/barebox-mx6-defaultenv/init/detect-mmcs
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+detect mmc0 mmc1 mmc2
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 d1ebb0f..035e1c4 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
@@ -4025,10 +4033,12 @@ CONFIG_CRC32_SLICEBY8=y
# CONFIG_CRC8 is not set
CONFIG_XXHASH=y
# CONFIG_RANDOM32_SELFTEST is not set
+CONFIG_ZLIB_INFLATE=y
CONFIG_ZSTD_COMMON=y
CONFIG_ZSTD_COMPRESS=y
CONFIG_ZSTD_DECOMPRESS=y
# CONFIG_XZ_DEC 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 89e1e18..0a90450 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] 6+ messages in thread
* Re: [DistroKit] [PATCH 2/3] v7a: barebox: enable loading kernel, dtb and initrd via fastboot
2023-08-25 10:15 ` [DistroKit] [PATCH 2/3] v7a: barebox: enable loading kernel, dtb and initrd via fastboot Juergen Borleis
@ 2023-08-25 10:48 ` Robert Schwebel
0 siblings, 0 replies; 6+ messages in thread
From: Robert Schwebel @ 2023-08-25 10:48 UTC (permalink / raw)
To: Juergen Borleis; +Cc: distrokit
Could you rebase this patch against next?
On Fri, Aug 25, 2023 at 12:15:58PM +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 | 12 +++++++++++-
> configs/platform-v7a/platformconfig | 10 +++++++++-
> 9 files changed, 35 insertions(+), 2 deletions(-)
> create mode 100755 configs/platform-v7a/barebox-mx6-defaultenv/boot/ram-fastboot
> create mode 100755 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 100755
> index 0000000..e3433f6
> --- /dev/null
> +++ b/configs/platform-v7a/barebox-mx6-defaultenv/init/detect-mmcs
> @@ -0,0 +1,3 @@
> +#!/bin/sh
> +
> +detect mmc0 mmc1 mmc2
> 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 d1ebb0f..035e1c4 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
> @@ -4025,10 +4033,12 @@ CONFIG_CRC32_SLICEBY8=y
> # CONFIG_CRC8 is not set
> CONFIG_XXHASH=y
> # CONFIG_RANDOM32_SELFTEST is not set
> +CONFIG_ZLIB_INFLATE=y
> CONFIG_ZSTD_COMMON=y
> CONFIG_ZSTD_COMPRESS=y
> CONFIG_ZSTD_DECOMPRESS=y
> # CONFIG_XZ_DEC 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 89e1e18..0a90450 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] 6+ messages in thread
* [DistroKit] [PATCH 3/3] doc: RIoT: mention the 'fastboot' capabilities
2023-08-25 10:15 [DistroKit] [PATCH 1/3] arch: fastboot: testing: fix typos Juergen Borleis
2023-08-25 10:15 ` [DistroKit] [PATCH 2/3] v7a: barebox: enable loading kernel, dtb and initrd via fastboot Juergen Borleis
@ 2023-08-25 10:15 ` Juergen Borleis
2023-08-25 10:54 ` Robert Schwebel
2023-08-25 10:49 ` [DistroKit] [PATCH 1/3] arch: fastboot: testing: fix typos Robert Schwebel
2 siblings, 1 reply; 6+ messages in thread
From: Juergen Borleis @ 2023-08-25 10:15 UTC (permalink / raw)
To: distrokit
Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
---
doc/hardware_v7a_riot.rst | 66 +++++++++++++++++++++++++++++++++++++++
doc/testing.rst | 2 ++
2 files changed, 68 insertions(+)
diff --git a/doc/hardware_v7a_riot.rst b/doc/hardware_v7a_riot.rst
index 77b48cb..a6e2365 100644
--- a/doc/hardware_v7a_riot.rst
+++ b/doc/hardware_v7a_riot.rst
@@ -24,3 +24,69 @@ The serial boot console is available at the debug-header J18 at 115200 Baud and
* J18.2: RxD
* J18.3: GND
+Fast development
+----------------
+
+For development the RIoT-Board bootloader supports 'fastboot'. Refer
+:ref:`fast_development` for Linux and BSP preparation on demand.
+
+RIoT i.MX6S
+~~~~~~~~~~~
+
+The BSP already supports 'fastboot' and prepares the target accordingly.
+The PARTITION names might differ, so you should check first, what PARTITIONs
+are exported.
+
+To get the exported PARTITION names, available via 'fastboot', you can run::
+
+ $ fastboot getvar all
+ (bootloader) version: 0.4
+ (bootloader) bootloader-version: barebox-2023.02.1
+ (bootloader) max-download-size: 8388608
+ (bootloader) partition-size:mmc1: 00000000
+ (bootloader) partition-type:mmc1: unavailable
+ (bootloader) partition-size:mmc2: 00000000
+ (bootloader) partition-type:mmc2: unavailable
+ (bootloader) partition-size:mmc3: e5000000
+ (bootloader) partition-type:mmc3: basic
+ (bootloader) partition-size:ram-kernel: 00000000
+ (bootloader) partition-type:ram-kernel: file
+ (bootloader) partition-size:ram-initramfs: 00000000
+ (bootloader) partition-type:ram-initramfs: file
+ (bootloader) partition-size:ram-oftree: 00000000
+ (bootloader) partition-type:ram-oftree: file
+ (bootloader) partition-size:bbu-emmc: 000e0000
+ (bootloader) partition-type:bbu-emmc: basic
+
+In this example, the PARTITION names are 'mmc1', 'mmc2', 'mmc3', 'ram-kernel',
+'ram-initramfs', 'ram-oftree' and 'bbu-emmc'. In this example the two possible
+SD cards are not plugged in (e.g. "unavailable").
+
+.. note:: You need to restart the fastboot usbgadget, if you probe the SD cards
+ later on.
+
+Just connect the USB OTG connector to your host and run::
+
+ $ fastboot flash ram-kernel platform-v7a/images/linuximage -S 1
+ $ fastboot flash ram-oftree platform-v7a/images/imx6dl-riotboard.dtb -S 1
+ $ fastboot flash ram-initramfs platform-v7a/images/root.cpio.gz -S 1
+ $ fastboot oem exec -- boot ram-fastboot
+
+You can populate local memory like the eMMC as well. But only full memory
+devices and no particular partitions.
+
+If inserted, the regular SD card::
+
+ $ fastboot flash mmc1 platform-v7a/images/riotboard.hdimg -S 1
+
+If inserted, the µSD card::
+
+ $ fastboot flash mmc2 platform-v7a/images/riotboard.hdimg -S 1
+
+The built-in eMMC::
+
+ $ fastboot flash mmc3 platform-v7a/images/riotboard.hdimg -S 1
+
+.. note:: If you have no USB connection to the RIoT i.MX6S, you can use
+ a network connection instead. Just run all the 'fastboot' commands
+ shown above with the additional option '-s udp:<RIoT i.MX6S IP address>'.
diff --git a/doc/testing.rst b/doc/testing.rst
index 83bdb71..ef477cb 100644
--- a/doc/testing.rst
+++ b/doc/testing.rst
@@ -1,3 +1,5 @@
+.. _fast_development:
+
Fast development
================
--
2.30.2
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [DistroKit] [PATCH 3/3] doc: RIoT: mention the 'fastboot' capabilities
2023-08-25 10:15 ` [DistroKit] [PATCH 3/3] doc: RIoT: mention the 'fastboot' capabilities Juergen Borleis
@ 2023-08-25 10:54 ` Robert Schwebel
0 siblings, 0 replies; 6+ messages in thread
From: Robert Schwebel @ 2023-08-25 10:54 UTC (permalink / raw)
To: Juergen Borleis; +Cc: distrokit
Applied to next
On Fri, Aug 25, 2023 at 12:15:59PM +0200, Juergen Borleis wrote:
> Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
> ---
> doc/hardware_v7a_riot.rst | 66 +++++++++++++++++++++++++++++++++++++++
> doc/testing.rst | 2 ++
> 2 files changed, 68 insertions(+)
>
> diff --git a/doc/hardware_v7a_riot.rst b/doc/hardware_v7a_riot.rst
> index 77b48cb..a6e2365 100644
> --- a/doc/hardware_v7a_riot.rst
> +++ b/doc/hardware_v7a_riot.rst
> @@ -24,3 +24,69 @@ The serial boot console is available at the debug-header J18 at 115200 Baud and
> * J18.2: RxD
> * J18.3: GND
>
> +Fast development
> +----------------
> +
> +For development the RIoT-Board bootloader supports 'fastboot'. Refer
> +:ref:`fast_development` for Linux and BSP preparation on demand.
> +
> +RIoT i.MX6S
> +~~~~~~~~~~~
> +
> +The BSP already supports 'fastboot' and prepares the target accordingly.
> +The PARTITION names might differ, so you should check first, what PARTITIONs
> +are exported.
> +
> +To get the exported PARTITION names, available via 'fastboot', you can run::
> +
> + $ fastboot getvar all
> + (bootloader) version: 0.4
> + (bootloader) bootloader-version: barebox-2023.02.1
> + (bootloader) max-download-size: 8388608
> + (bootloader) partition-size:mmc1: 00000000
> + (bootloader) partition-type:mmc1: unavailable
> + (bootloader) partition-size:mmc2: 00000000
> + (bootloader) partition-type:mmc2: unavailable
> + (bootloader) partition-size:mmc3: e5000000
> + (bootloader) partition-type:mmc3: basic
> + (bootloader) partition-size:ram-kernel: 00000000
> + (bootloader) partition-type:ram-kernel: file
> + (bootloader) partition-size:ram-initramfs: 00000000
> + (bootloader) partition-type:ram-initramfs: file
> + (bootloader) partition-size:ram-oftree: 00000000
> + (bootloader) partition-type:ram-oftree: file
> + (bootloader) partition-size:bbu-emmc: 000e0000
> + (bootloader) partition-type:bbu-emmc: basic
> +
> +In this example, the PARTITION names are 'mmc1', 'mmc2', 'mmc3', 'ram-kernel',
> +'ram-initramfs', 'ram-oftree' and 'bbu-emmc'. In this example the two possible
> +SD cards are not plugged in (e.g. "unavailable").
> +
> +.. note:: You need to restart the fastboot usbgadget, if you probe the SD cards
> + later on.
> +
> +Just connect the USB OTG connector to your host and run::
> +
> + $ fastboot flash ram-kernel platform-v7a/images/linuximage -S 1
> + $ fastboot flash ram-oftree platform-v7a/images/imx6dl-riotboard.dtb -S 1
> + $ fastboot flash ram-initramfs platform-v7a/images/root.cpio.gz -S 1
> + $ fastboot oem exec -- boot ram-fastboot
> +
> +You can populate local memory like the eMMC as well. But only full memory
> +devices and no particular partitions.
> +
> +If inserted, the regular SD card::
> +
> + $ fastboot flash mmc1 platform-v7a/images/riotboard.hdimg -S 1
> +
> +If inserted, the µSD card::
> +
> + $ fastboot flash mmc2 platform-v7a/images/riotboard.hdimg -S 1
> +
> +The built-in eMMC::
> +
> + $ fastboot flash mmc3 platform-v7a/images/riotboard.hdimg -S 1
> +
> +.. note:: If you have no USB connection to the RIoT i.MX6S, you can use
> + a network connection instead. Just run all the 'fastboot' commands
> + shown above with the additional option '-s udp:<RIoT i.MX6S IP address>'.
> diff --git a/doc/testing.rst b/doc/testing.rst
> index 83bdb71..ef477cb 100644
> --- a/doc/testing.rst
> +++ b/doc/testing.rst
> @@ -1,3 +1,5 @@
> +.. _fast_development:
> +
> Fast development
> ================
>
> --
> 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] 6+ messages in thread
* Re: [DistroKit] [PATCH 1/3] arch: fastboot: testing: fix typos
2023-08-25 10:15 [DistroKit] [PATCH 1/3] arch: fastboot: testing: fix typos Juergen Borleis
2023-08-25 10:15 ` [DistroKit] [PATCH 2/3] v7a: barebox: enable loading kernel, dtb and initrd via fastboot Juergen Borleis
2023-08-25 10:15 ` [DistroKit] [PATCH 3/3] doc: RIoT: mention the 'fastboot' capabilities Juergen Borleis
@ 2023-08-25 10:49 ` Robert Schwebel
2 siblings, 0 replies; 6+ messages in thread
From: Robert Schwebel @ 2023-08-25 10:49 UTC (permalink / raw)
To: Juergen Borleis; +Cc: distrokit
Applied to next.
On Fri, Aug 25, 2023 at 12:15:57PM +0200, Juergen Borleis wrote:
> Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
> ---
> doc/testing.rst | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/doc/testing.rst b/doc/testing.rst
> index afa1be8..83bdb71 100644
> --- a/doc/testing.rst
> +++ b/doc/testing.rst
> @@ -5,19 +5,19 @@ Sometimes a quick test should be done: a new kernel feature or a tool
> should be tested on a real target.
>
> If the target suports USB OTG (or peripheral mode) or network, 'fastboot'
> -can be an easy to use solution.
> +can be an easy-to-use solution.
>
> 'fastboot' support
> ------------------
>
> For a fast development or testing cycle you can use 'fastboot' via
> -USB or networt to transfer the required parts to the target system.
> +USB or network to transfer the required parts to the target system.
>
> Here we want to run a Linux kernel and a corresponding root filesystem,
> -without writing target system local memories againg and again for each
> +without writing target system local memories again and again for each
> development or test cycle.
>
> -In this text, we transfer the required files to the target system
> +In this test, we transfer the required files to the target system
> which only needs to run a 'fastboot' capable bootloader.
>
> Since we want to use an initramfs as the kernel's root filesystem, we
> @@ -76,7 +76,7 @@ And we want run the downloaded files, so we need:
> BSP
> ---
>
> -Create a initramf of the root filesystem:
> +Create an initramf of the root filesystem:
>
> - PTXCONF_IMAGE_ROOT_CPIO = y
>
> @@ -100,7 +100,7 @@ Some BPS settings do not make sense regarding used in an initramfs instead
> of a persistent target system local memory. For development or testing some
> settings should be changed, to reduce the file sizes and boot time.
>
> -The Linux kernel will be transfered separately, so it makes less sense to
> +The Linux kernel will be transferred separately, so it makes less sense to
> have it in the root filesystem as well. This will reduce the size of the
> initramfs.
>
> @@ -128,7 +128,7 @@ size hits some threshold. In this case, there are some additional requirements
> to the size of the file itself: its size must be a multiple of 4 kiB.
>
> Note: if this additional requirement isn't met, the error message is
> - missleading and states about an 'invalid value' after the first
> + misleading and states about an 'invalid value' after the first
> transfer.
>
> Most of the time the initramfs file hits the threshold. Thus, it must
> --
> 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] 6+ messages in thread