DistroKit Mailinglist
 help / color / mirror / Atom feed
* [DistroKit] [PATCH 1/3] mips: linux: adapt the build rules regarding the tool 'pahole'
@ 2023-05-02  8:06 Juergen Borleis
  2023-05-02  8:06 ` [DistroKit] [PATCH 2/3] mips: linux: fixup kernel configuration Juergen Borleis
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Juergen Borleis @ 2023-05-02  8:06 UTC (permalink / raw)
  To: distrokit

Using 'pahole' needs to be disabled on MIPS as well in order to avoid
host depended config file adaptions which let the build fail.

Signed-off-by: Signed-off-by: Jürgen Borleis <jbe@pengutronix.de>
---
 configs/platform-mips/rules/kernel-ar9331.make | 1 +
 configs/platform-mips/rules/kernel-malta.make  | 1 +
 configs/platform-mips/rules/kernel.make        | 1 +
 3 files changed, 3 insertions(+)

diff --git a/configs/platform-mips/rules/kernel-ar9331.make b/configs/platform-mips/rules/kernel-ar9331.make
index 74c10ce..1ed0fa4 100644
--- a/configs/platform-mips/rules/kernel-ar9331.make
+++ b/configs/platform-mips/rules/kernel-ar9331.make
@@ -47,6 +47,7 @@ KERNEL_AR9331_PATH		:= PATH=$(CROSS_PATH)
 KERNEL_AR9331_SHARED_OPT	:= \
 	-C $(KERNEL_AR9331_DIR) \
 	O=$(KERNEL_AR9331_BUILD_DIR) \
+	PAHOLE=false \
 	$(call kernel-opts, KERNEL_AR9331)
 
 # no gcc plugins; avoid config changes depending on the host compiler
diff --git a/configs/platform-mips/rules/kernel-malta.make b/configs/platform-mips/rules/kernel-malta.make
index 41e2760..e6116de 100644
--- a/configs/platform-mips/rules/kernel-malta.make
+++ b/configs/platform-mips/rules/kernel-malta.make
@@ -47,6 +47,7 @@ KERNEL_MALTA_PATH	:= PATH=$(CROSS_PATH)
 KERNEL_MALTA_SHARED_OPT	:= \
 	-C $(KERNEL_MALTA_DIR) \
 	O=$(KERNEL_MALTA_BUILD_DIR) \
+	PAHOLE=false \
 	$(call kernel-opts, KERNEL_MALTA)
 
 # no gcc plugins; avoid config changes depending on the host compiler
diff --git a/configs/platform-mips/rules/kernel.make b/configs/platform-mips/rules/kernel.make
index 6d5ca4d..e4efb46 100644
--- a/configs/platform-mips/rules/kernel.make
+++ b/configs/platform-mips/rules/kernel.make
@@ -39,6 +39,7 @@ KERNEL_BUILD_OOT	:= KEEP
 KERNEL_CONF_OPT := \
 	-C $(KERNEL_DIR) \
 	O=$(KERNEL_BUILD_DIR) \
+	PAHOLE=false \
 	$(call kernel-opts, KERNEL)
 
 # no gcc plugins; avoid config changes depending on the host compiler
-- 
2.30.2




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

* [DistroKit] [PATCH 2/3] mips: linux: fixup kernel configuration
  2023-05-02  8:06 [DistroKit] [PATCH 1/3] mips: linux: adapt the build rules regarding the tool 'pahole' Juergen Borleis
@ 2023-05-02  8:06 ` Juergen Borleis
  2023-05-02  8:06 ` [DistroKit] [PATCH 3/3] arch: bootloader: enable 'fastboot' support over USB and network Juergen Borleis
  2023-05-08  8:08 ` [DistroKit] [PATCH 1/3] mips: linux: adapt the build rules regarding the tool 'pahole' Robert Schwebel
  2 siblings, 0 replies; 4+ messages in thread
From: Juergen Borleis @ 2023-05-02  8:06 UTC (permalink / raw)
  To: distrokit

In commit 382e4ea5aef35e748466e635845ee05d01ab96db
  "ptxdist: version bump 2022.12.0 -> 2023.02.0"

the generic kernel build rule was changed to consider disabling the use
of the tool 'pahole'. But the mips arch has their local build rules and
thus, do not consider 'pahole'.

So, commit 6401964d92d713d5ea2004f00483d006bbf9522b
  "platform-mips: kernel: version bump 5.15 -> 6.2"

does not update the 'pahole' setting and building the BPS with '-q' always
fails due to kernel configuartion file adaptions.

Signed-off-by: Jürgen Borleis <jbe@pengutronix.de>
---
 configs/platform-mips/kernelconfig-malta.diff | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/configs/platform-mips/kernelconfig-malta.diff b/configs/platform-mips/kernelconfig-malta.diff
index 54cf31d..6c000ba 100644
--- a/configs/platform-mips/kernelconfig-malta.diff
+++ b/configs/platform-mips/kernelconfig-malta.diff
@@ -1,4 +1,4 @@
-cdf0d080059fba498725589688290ed2
+9a421c3987eb59d7b790ee73d9e6a295
 # CONFIG_8139CP is not set
 # CONFIG_8139TOO is not set
 # CONFIG_ACENIC is not set
@@ -1188,6 +1188,7 @@ CONFIG_OF_MDIO=m
 # CONFIG_OVERLAY_FS_REDIRECT_DIR is undefined
 CONFIG_PAGE_SIZE_16KB=y
 # CONFIG_PAGE_SIZE_4KB is not set
+CONFIG_PAHOLE_VERSION=0
 # CONFIG_PANIC_ON_OOPS is not set
 CONFIG_PANIC_ON_OOPS_VALUE=0
 CONFIG_PANIC_TIMEOUT=0
-- 
2.30.2




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

* [DistroKit] [PATCH 3/3] arch: bootloader: enable 'fastboot' support over USB and network
  2023-05-02  8:06 [DistroKit] [PATCH 1/3] mips: linux: adapt the build rules regarding the tool 'pahole' Juergen Borleis
  2023-05-02  8:06 ` [DistroKit] [PATCH 2/3] mips: linux: fixup kernel configuration Juergen Borleis
@ 2023-05-02  8:06 ` Juergen Borleis
  2023-05-08  8:08 ` [DistroKit] [PATCH 1/3] mips: linux: adapt the build rules regarding the tool 'pahole' Robert Schwebel
  2 siblings, 0 replies; 4+ messages in thread
From: Juergen Borleis @ 2023-05-02  8:06 UTC (permalink / raw)
  To: distrokit

Enabling:

 - CONFIG_BOOTM_INITRD = y
 - CONFIG_USB_GADGET = y
 - CONFIG_USB_GADGET_FASTBOOT = y
 - CONFIG_NET_FASTBOOT = y
 - CONFIG_FASTBOOT_SPARSE = y
 - CONFIG_FASTBOOT_CMD_OEM = y

Signed-off-by: Jürgen Borleis <jbe@pengutronix.de>
---
 configs/platform-mips/barebox-ar9331.config   |  27 ++-
 .../platform-mips/barebox-ar9331.config.diff  |   2 +-
 configs/platform-mips/barebox-malta.config    |  27 ++-
 .../platform-mips/barebox-malta.config.diff   |   2 +-
 configs/platform-mips/barebox.config          |  27 ++-
 configs/platform-v7a/barebox-am335x.config    |   2 +-
 .../platform-v7a/barebox-am335x.config.diff   |   2 +-
 configs/platform-v7a/barebox-at91.config      |  27 ++-
 configs/platform-v7a/barebox-at91.config.diff |  19 +-
 configs/platform-v7a/barebox-mx6.config       |   2 +-
 configs/platform-v7a/barebox-mx6.config.diff  |   2 +-
 configs/platform-v7a/barebox-rpi2.config      |  25 ++-
 configs/platform-v7a/barebox-rpi2.config.diff |  17 +-
 configs/platform-v7a/barebox-stm32mp.config   |   7 +-
 .../platform-v7a/barebox-stm32mp.config.diff  |   5 +-
 configs/platform-v7a/barebox-vexpress.config  |   2 +-
 .../platform-v7a/barebox-vexpress.config.diff |   2 +-
 configs/platform-v7a/barebox.config           |   2 +-
 .../platform-v7a_noneon/barebox-at91.config   |  34 +++-
 .../barebox-at91.config.diff                  |  17 +-
 .../barebox-vexpress.config                   |  13 +-
 .../barebox-vexpress.config.diff              |   3 +-
 configs/platform-v7a_noneon/barebox.config    |  15 +-
 configs/platform-v8a/barebox-imx8m.config     |   9 +-
 configs/platform-v8a/barebox-rockchip.config  |   5 +-
 doc/index.rst                                 |   1 +
 doc/testing.rst                               | 163 ++++++++++++++++++
 27 files changed, 372 insertions(+), 87 deletions(-)
 create mode 100644 doc/testing.rst

diff --git a/configs/platform-mips/barebox-ar9331.config b/configs/platform-mips/barebox-ar9331.config
index 4f75964..2e72041 100644
--- a/configs/platform-mips/barebox-ar9331.config
+++ b/configs/platform-mips/barebox-ar9331.config
@@ -62,7 +62,10 @@ CONFIG_BINFMT=y
 CONFIG_UIMAGE=y
 CONFIG_LOGBUF=y
 CONFIG_STDDEV=y
+CONFIG_FILE_LIST=y
+CONFIG_USBGADGET_START=y
 CONFIG_BOOT=y
+CONFIG_FASTBOOT_BASE=y
 
 #
 # General Settings
@@ -125,7 +128,7 @@ CONFIG_TIMESTAMP=y
 CONFIG_BOOTM=y
 # CONFIG_BOOTM_SHOW_TYPE is not set
 # CONFIG_BOOTM_VERBOSE is not set
-# CONFIG_BOOTM_INITRD is not set
+CONFIG_BOOTM_INITRD=y
 # CONFIG_BOOTM_OFTREE is not set
 CONFIG_BOOTM_ELF=y
 # CONFIG_BLSPEC is not set
@@ -161,6 +164,13 @@ CONFIG_POLLER=y
 # OP-TEE loading
 #
 # end of OP-TEE loading
+
+#
+# Android Fastboot
+#
+CONFIG_FASTBOOT_SPARSE=y
+CONFIG_FASTBOOT_CMD_OEM=y
+# end of Android Fastboot
 # end of General Settings
 
 #
@@ -326,6 +336,7 @@ CONFIG_CMD_LED=y
 CONFIG_CMD_POWEROFF=y
 CONFIG_CMD_SPI=y
 CONFIG_CMD_LED_TRIGGER=y
+CONFIG_CMD_USBGADGET=y
 # end of Hardware manipulation
 
 #
@@ -357,7 +368,7 @@ CONFIG_NET_RESOLV=y
 CONFIG_NET_IFUP=y
 CONFIG_NET_DHCP=y
 CONFIG_NET_SNTP=y
-# CONFIG_NET_FASTBOOT is not set
+CONFIG_NET_FASTBOOT=y
 
 #
 # Drivers
@@ -464,8 +475,17 @@ CONFIG_MTD_SPI_NOR=y
 # CONFIG_SPI_CADENCE_QUADSPI is not set
 # CONFIG_MTD_UBI is not set
 # CONFIG_DISK is not set
+CONFIG_USB=y
 # CONFIG_USB_HOST is not set
-# CONFIG_USB_GADGET is not set
+CONFIG_USB_GADGET=y
+CONFIG_USB_GADGET_AUTOSTART=y
+
+#
+# USB Gadget drivers
+#
+# CONFIG_USB_GADGET_DFU is not set
+# CONFIG_USB_GADGET_SERIAL is not set
+CONFIG_USB_GADGET_FASTBOOT=y
 # CONFIG_USB_MUSB is not set
 # CONFIG_VIDEO is not set
 # CONFIG_MCI is not set
@@ -644,6 +664,7 @@ CONFIG_PROCESS_ESCAPE_SEQUENCE=y
 CONFIG_FNMATCH=y
 CONFIG_QSORT=y
 CONFIG_XYMODEM=y
+CONFIG_IMAGE_SPARSE=y
 # CONFIG_RATP is not set
 # CONFIG_ALLOW_PRNG_FALLBACK is not set
 # CONFIG_CRC_CCITT is not set
diff --git a/configs/platform-mips/barebox-ar9331.config.diff b/configs/platform-mips/barebox-ar9331.config.diff
index bb718c1..524a3cc 100644
--- a/configs/platform-mips/barebox-ar9331.config.diff
+++ b/configs/platform-mips/barebox-ar9331.config.diff
@@ -1,4 +1,4 @@
-0045135ec222c1efe0b77eb6a3b7e8ec
+969c2d8bca570a40257c2a71b4e37c8d
 # CONFIG_BOARD_8DEVICES_LIMA is not set
 # CONFIG_BOARD_TPLINK_WDR4300 is not set
 # CONFIG_SOC_QCA_AR9344 is undefined
diff --git a/configs/platform-mips/barebox-malta.config b/configs/platform-mips/barebox-malta.config
index 1f9ab39..9433c0a 100644
--- a/configs/platform-mips/barebox-malta.config
+++ b/configs/platform-mips/barebox-malta.config
@@ -59,7 +59,10 @@ CONFIG_BINFMT=y
 CONFIG_UIMAGE=y
 CONFIG_LOGBUF=y
 CONFIG_STDDEV=y
+CONFIG_FILE_LIST=y
+CONFIG_USBGADGET_START=y
 CONFIG_BOOT=y
+CONFIG_FASTBOOT_BASE=y
 
 #
 # General Settings
@@ -128,7 +131,7 @@ CONFIG_TIMESTAMP=y
 CONFIG_BOOTM=y
 CONFIG_BOOTM_SHOW_TYPE=y
 # CONFIG_BOOTM_VERBOSE is not set
-# CONFIG_BOOTM_INITRD is not set
+CONFIG_BOOTM_INITRD=y
 # CONFIG_BOOTM_OFTREE is not set
 CONFIG_BOOTM_ELF=y
 # CONFIG_BLSPEC is not set
@@ -165,6 +168,13 @@ CONFIG_POLLER=y
 # OP-TEE loading
 #
 # end of OP-TEE loading
+
+#
+# Android Fastboot
+#
+CONFIG_FASTBOOT_SPARSE=y
+CONFIG_FASTBOOT_CMD_OEM=y
+# end of Android Fastboot
 # end of General Settings
 
 #
@@ -334,6 +344,7 @@ CONFIG_CMD_FLASH=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 # CONFIG_CMD_POWEROFF is not set
+CONFIG_CMD_USBGADGET=y
 # end of Hardware manipulation
 
 #
@@ -365,7 +376,7 @@ CONFIG_NET_RESOLV=y
 CONFIG_NET_IFUP=y
 CONFIG_NET_DHCP=y
 # CONFIG_NET_SNTP is not set
-# CONFIG_NET_FASTBOOT is not set
+CONFIG_NET_FASTBOOT=y
 
 #
 # Drivers
@@ -478,8 +489,17 @@ CONFIG_CFI_BUFFER_WRITE=y
 # CONFIG_MTD_SPI_NOR is not set
 # CONFIG_MTD_UBI is not set
 # CONFIG_DISK is not set
+CONFIG_USB=y
 # CONFIG_USB_HOST is not set
-# CONFIG_USB_GADGET is not set
+CONFIG_USB_GADGET=y
+CONFIG_USB_GADGET_AUTOSTART=y
+
+#
+# USB Gadget drivers
+#
+# CONFIG_USB_GADGET_DFU is not set
+# CONFIG_USB_GADGET_SERIAL is not set
+CONFIG_USB_GADGET_FASTBOOT=y
 # CONFIG_USB_MUSB is not set
 # CONFIG_VIDEO is not set
 # CONFIG_MCI is not set
@@ -682,6 +702,7 @@ CONFIG_PROCESS_ESCAPE_SEQUENCE=y
 CONFIG_FNMATCH=y
 CONFIG_QSORT=y
 CONFIG_XYMODEM=y
+CONFIG_IMAGE_SPARSE=y
 # CONFIG_RATP is not set
 # CONFIG_ALLOW_PRNG_FALLBACK is not set
 # CONFIG_CRC_CCITT is not set
diff --git a/configs/platform-mips/barebox-malta.config.diff b/configs/platform-mips/barebox-malta.config.diff
index 763c0a9..596f178 100644
--- a/configs/platform-mips/barebox-malta.config.diff
+++ b/configs/platform-mips/barebox-malta.config.diff
@@ -1,4 +1,4 @@
-0045135ec222c1efe0b77eb6a3b7e8ec
+969c2d8bca570a40257c2a71b4e37c8d
 # CONFIG_AT803X_PHY is not set
 CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x400000
 CONFIG_BAUDRATE=38400
diff --git a/configs/platform-mips/barebox.config b/configs/platform-mips/barebox.config
index 6398994..689e6bc 100644
--- a/configs/platform-mips/barebox.config
+++ b/configs/platform-mips/barebox.config
@@ -64,7 +64,10 @@ CONFIG_BINFMT=y
 CONFIG_UIMAGE=y
 CONFIG_LOGBUF=y
 CONFIG_STDDEV=y
+CONFIG_FILE_LIST=y
+CONFIG_USBGADGET_START=y
 CONFIG_BOOT=y
+CONFIG_FASTBOOT_BASE=y
 
 #
 # General Settings
@@ -127,7 +130,7 @@ CONFIG_TIMESTAMP=y
 CONFIG_BOOTM=y
 # CONFIG_BOOTM_SHOW_TYPE is not set
 # CONFIG_BOOTM_VERBOSE is not set
-# CONFIG_BOOTM_INITRD is not set
+CONFIG_BOOTM_INITRD=y
 # CONFIG_BOOTM_OFTREE is not set
 CONFIG_BOOTM_ELF=y
 # CONFIG_BLSPEC is not set
@@ -163,6 +166,13 @@ CONFIG_POLLER=y
 # OP-TEE loading
 #
 # end of OP-TEE loading
+
+#
+# Android Fastboot
+#
+CONFIG_FASTBOOT_SPARSE=y
+CONFIG_FASTBOOT_CMD_OEM=y
+# end of Android Fastboot
 # end of General Settings
 
 #
@@ -328,6 +338,7 @@ CONFIG_CMD_LED=y
 CONFIG_CMD_POWEROFF=y
 CONFIG_CMD_SPI=y
 CONFIG_CMD_LED_TRIGGER=y
+CONFIG_CMD_USBGADGET=y
 # end of Hardware manipulation
 
 #
@@ -359,7 +370,7 @@ CONFIG_NET_RESOLV=y
 CONFIG_NET_IFUP=y
 CONFIG_NET_DHCP=y
 CONFIG_NET_SNTP=y
-# CONFIG_NET_FASTBOOT is not set
+CONFIG_NET_FASTBOOT=y
 
 #
 # Drivers
@@ -466,8 +477,17 @@ CONFIG_MTD_SPI_NOR=y
 # CONFIG_SPI_CADENCE_QUADSPI is not set
 # CONFIG_MTD_UBI is not set
 # CONFIG_DISK is not set
+CONFIG_USB=y
 # CONFIG_USB_HOST is not set
-# CONFIG_USB_GADGET is not set
+CONFIG_USB_GADGET=y
+CONFIG_USB_GADGET_AUTOSTART=y
+
+#
+# USB Gadget drivers
+#
+# CONFIG_USB_GADGET_DFU is not set
+# CONFIG_USB_GADGET_SERIAL is not set
+CONFIG_USB_GADGET_FASTBOOT=y
 # CONFIG_USB_MUSB is not set
 # CONFIG_VIDEO is not set
 # CONFIG_MCI is not set
@@ -646,6 +666,7 @@ CONFIG_PROCESS_ESCAPE_SEQUENCE=y
 CONFIG_FNMATCH=y
 CONFIG_QSORT=y
 CONFIG_XYMODEM=y
+CONFIG_IMAGE_SPARSE=y
 # CONFIG_RATP is not set
 # CONFIG_ALLOW_PRNG_FALLBACK is not set
 # CONFIG_CRC_CCITT is not set
diff --git a/configs/platform-v7a/barebox-am335x.config b/configs/platform-v7a/barebox-am335x.config
index 647d716..3d95040 100644
--- a/configs/platform-v7a/barebox-am335x.config
+++ b/configs/platform-v7a/barebox-am335x.config
@@ -463,7 +463,7 @@ CONFIG_NET_RESOLV=y
 CONFIG_NET_IFUP=y
 CONFIG_NET_DHCP=y
 # CONFIG_NET_SNTP is not set
-# CONFIG_NET_FASTBOOT is not set
+CONFIG_NET_FASTBOOT=y
 
 #
 # Drivers
diff --git a/configs/platform-v7a/barebox-am335x.config.diff b/configs/platform-v7a/barebox-am335x.config.diff
index 20ab680..f3f08c1 100644
--- a/configs/platform-v7a/barebox-am335x.config.diff
+++ b/configs/platform-v7a/barebox-am335x.config.diff
@@ -1,4 +1,4 @@
-68457081af06bd8377bc38ef02c7d415
+cae3c1d7fff409368cf71da28bce089f
 # CONFIG_32BIT is undefined
 # CONFIG_64BIT is undefined
 # CONFIG_AM33XX_NET_BOOT is not set
diff --git a/configs/platform-v7a/barebox-at91.config b/configs/platform-v7a/barebox-at91.config
index b9f129a..754552b 100644
--- a/configs/platform-v7a/barebox-at91.config
+++ b/configs/platform-v7a/barebox-at91.config
@@ -115,7 +115,9 @@ CONFIG_LOGBUF=y
 CONFIG_STDDEV=y
 CONFIG_MENUTREE=y
 CONFIG_UBIFORMAT=y
+CONFIG_USBGADGET_START=y
 CONFIG_BOOT=y
+CONFIG_FASTBOOT_BASE=y
 
 #
 # General Settings
@@ -232,6 +234,13 @@ CONFIG_EXTERNAL_DTS_FRAGMENTS=""
 # CONFIG_BOOTM_OPTEE is not set
 # CONFIG_PBL_OPTEE is not set
 # end of OP-TEE loading
+
+#
+# Android Fastboot
+#
+CONFIG_FASTBOOT_SPARSE=y
+CONFIG_FASTBOOT_CMD_OEM=y
+# end of Android Fastboot
 # end of General Settings
 
 #
@@ -434,6 +443,7 @@ CONFIG_CMD_NAND=y
 # CONFIG_CMD_POWEROFF is not set
 CONFIG_CMD_SPI=y
 CONFIG_CMD_LED_TRIGGER=y
+CONFIG_CMD_USBGADGET=y
 CONFIG_CMD_WD=y
 CONFIG_CMD_WD_DEFAULT_TIMOUT=0
 # end of Hardware manipulation
@@ -469,7 +479,7 @@ CONFIG_NET_RESOLV=y
 CONFIG_NET_IFUP=y
 CONFIG_NET_DHCP=y
 # CONFIG_NET_SNTP is not set
-# CONFIG_NET_FASTBOOT is not set
+CONFIG_NET_FASTBOOT=y
 
 #
 # Drivers
@@ -621,8 +631,20 @@ CONFIG_DISK_WRITE=y
 # interface types
 #
 # CONFIG_DISK_INTF_PLATFORM_IDE is not set
+CONFIG_USB=y
 # CONFIG_USB_HOST is not set
-# CONFIG_USB_GADGET is not set
+CONFIG_USB_GADGET=y
+CONFIG_USB_GADGET_DUALSPEED=y
+CONFIG_USB_GADGET_DRIVER_AT91=y
+CONFIG_USB_GADGET_AUTOSTART=y
+
+#
+# USB Gadget drivers
+#
+# CONFIG_USB_GADGET_DFU is not set
+# CONFIG_USB_GADGET_SERIAL is not set
+CONFIG_USB_GADGET_FASTBOOT=y
+# CONFIG_USB_GADGET_MASS_STORAGE is not set
 # CONFIG_USB_MUSB is not set
 # CONFIG_VIDEO is not set
 # CONFIG_SOUND is not set
@@ -904,6 +926,7 @@ CONFIG_FNMATCH=y
 CONFIG_QSORT=y
 CONFIG_LIBSCAN=y
 CONFIG_LIBUBIGEN=y
+CONFIG_IMAGE_SPARSE=y
 # CONFIG_RATP is not set
 # CONFIG_ALLOW_PRNG_FALLBACK is not set
 # CONFIG_CRC_CCITT is not set
diff --git a/configs/platform-v7a/barebox-at91.config.diff b/configs/platform-v7a/barebox-at91.config.diff
index 2b7b71b..e7550cc 100644
--- a/configs/platform-v7a/barebox-at91.config.diff
+++ b/configs/platform-v7a/barebox-at91.config.diff
@@ -1,4 +1,4 @@
-68457081af06bd8377bc38ef02c7d415
+cae3c1d7fff409368cf71da28bce089f
 # CONFIG_32BIT is undefined
 # CONFIG_64BIT is undefined
 CONFIG_ARCH_AT91=y
@@ -29,7 +29,6 @@ CONFIG_CMD_NAND=y
 CONFIG_CMD_UBI=y
 CONFIG_CMD_UBIFORMAT=y
 # CONFIG_CMD_USB is undefined
-# CONFIG_CMD_USBGADGET is undefined
 CONFIG_COMMON_CLK_AT91=y
 CONFIG_COMPILE_LOGLEVEL=6
 # CONFIG_CPU_SUPPORTS_32BIT_KERNEL is undefined
@@ -46,9 +45,6 @@ CONFIG_DRIVER_SERIAL_ATMEL=y
 # CONFIG_DRIVER_SPI_GPIO is not set
 # CONFIG_EEPROM_93XX46 is not set
 CONFIG_EEPROM_AT24=y
-# CONFIG_FASTBOOT_BASE is undefined
-# CONFIG_FASTBOOT_CMD_OEM is undefined
-# CONFIG_FASTBOOT_SPARSE is undefined
 CONFIG_FS_UBIFS=y
 # CONFIG_FS_UBIFS_COMPRESSION_LZO is not set
 # CONFIG_FS_UBIFS_COMPRESSION_ZLIB is not set
@@ -74,7 +70,6 @@ CONFIG_I2C_AT91=y
 # CONFIG_I2C_GPIO is not set
 # CONFIG_IMAGE_COMPRESSION_LZO is not set
 CONFIG_IMAGE_COMPRESSION_NONE=y
-# CONFIG_IMAGE_SPARSE is undefined
 CONFIG_IMD_TARGET=y
 # CONFIG_KEYBOARD_USB is undefined
 # CONFIG_LIBFDT is undefined
@@ -152,18 +147,14 @@ CONFIG_SRAM=y
 # CONFIG_SYSCON_REBOOT_MODE is not set
 # CONFIG_THUMB2_BAREBOX is undefined
 CONFIG_UBIFORMAT=y
-# CONFIG_USB is undefined
-# CONFIG_USBGADGET_START is undefined
 # CONFIG_USB_DWC2_GADGET is undefined
 # CONFIG_USB_DWC2_HOST is undefined
 # CONFIG_USB_DWC3 is undefined
 # CONFIG_USB_EHCI is undefined
-# CONFIG_USB_GADGET is not set
-# CONFIG_USB_GADGET_AUTOSTART is undefined
-# CONFIG_USB_GADGET_DFU is undefined
-# CONFIG_USB_GADGET_FASTBOOT is undefined
-# CONFIG_USB_GADGET_MASS_STORAGE is undefined
-# CONFIG_USB_GADGET_SERIAL is undefined
+CONFIG_USB_GADGET_DRIVER_AT91=y
+CONFIG_USB_GADGET_DUALSPEED=y
+# CONFIG_USB_GADGET_MASS_STORAGE is not set
+# CONFIG_USB_GADGET_SERIAL is not set
 # CONFIG_USB_HOST is not set
 # CONFIG_USB_HUB_USB251XB is undefined
 # CONFIG_USB_NET_AX88179_178A is undefined
diff --git a/configs/platform-v7a/barebox-mx6.config b/configs/platform-v7a/barebox-mx6.config
index f6a1003..c2e6cc1 100644
--- a/configs/platform-v7a/barebox-mx6.config
+++ b/configs/platform-v7a/barebox-mx6.config
@@ -543,7 +543,7 @@ CONFIG_NET_RESOLV=y
 CONFIG_NET_IFUP=y
 CONFIG_NET_DHCP=y
 # CONFIG_NET_SNTP is not set
-# CONFIG_NET_FASTBOOT is not set
+CONFIG_NET_FASTBOOT=y
 
 #
 # Drivers
diff --git a/configs/platform-v7a/barebox-mx6.config.diff b/configs/platform-v7a/barebox-mx6.config.diff
index 0ff150f..40a9a4f 100644
--- a/configs/platform-v7a/barebox-mx6.config.diff
+++ b/configs/platform-v7a/barebox-mx6.config.diff
@@ -1,4 +1,4 @@
-68457081af06bd8377bc38ef02c7d415
+cae3c1d7fff409368cf71da28bce089f
 # CONFIG_32BIT is undefined
 # CONFIG_64BIT is undefined
 # CONFIG_ARCH_BCM283X is not set
diff --git a/configs/platform-v7a/barebox-rpi2.config b/configs/platform-v7a/barebox-rpi2.config
index 96b416f..d562d30 100644
--- a/configs/platform-v7a/barebox-rpi2.config
+++ b/configs/platform-v7a/barebox-rpi2.config
@@ -102,7 +102,9 @@ CONFIG_UIMAGE=y
 CONFIG_LOGBUF=y
 CONFIG_STDDEV=y
 CONFIG_MENUTREE=y
+CONFIG_USBGADGET_START=y
 CONFIG_BOOT=y
+CONFIG_FASTBOOT_BASE=y
 
 #
 # General Settings
@@ -219,6 +221,13 @@ CONFIG_EXTERNAL_DTS_FRAGMENTS=""
 #
 # CONFIG_BOOTM_OPTEE is not set
 # end of OP-TEE loading
+
+#
+# Android Fastboot
+#
+CONFIG_FASTBOOT_SPARSE=y
+CONFIG_FASTBOOT_CMD_OEM=y
+# end of Android Fastboot
 # end of General Settings
 
 #
@@ -414,6 +423,7 @@ CONFIG_CMD_LED=y
 CONFIG_CMD_SPI=y
 CONFIG_CMD_LED_TRIGGER=y
 CONFIG_CMD_USB=y
+CONFIG_CMD_USBGADGET=y
 CONFIG_CMD_WD=y
 CONFIG_CMD_WD_DEFAULT_TIMOUT=0
 # end of Hardware manipulation
@@ -449,7 +459,7 @@ CONFIG_NET_RESOLV=y
 CONFIG_NET_IFUP=y
 CONFIG_NET_DHCP=y
 # CONFIG_NET_SNTP is not set
-# CONFIG_NET_FASTBOOT is not set
+CONFIG_NET_FASTBOOT=y
 
 #
 # Drivers
@@ -590,6 +600,7 @@ CONFIG_USB=y
 CONFIG_USB_HOST=y
 CONFIG_USB_DWC2=y
 CONFIG_USB_DWC2_HOST=y
+# CONFIG_USB_DWC2_GADGET is not set
 # CONFIG_USB_DWC3 is not set
 # CONFIG_USB_EHCI is not set
 # CONFIG_USB_XHCI is not set
@@ -601,7 +612,16 @@ CONFIG_USB_STORAGE=y
 # USB Miscellaneous drivers
 #
 # CONFIG_USB_HUB_USB251XB is not set
-# CONFIG_USB_GADGET is not set
+CONFIG_USB_GADGET=y
+CONFIG_USB_GADGET_AUTOSTART=y
+
+#
+# USB Gadget drivers
+#
+# CONFIG_USB_GADGET_DFU is not set
+# CONFIG_USB_GADGET_SERIAL is not set
+CONFIG_USB_GADGET_FASTBOOT=y
+# CONFIG_USB_GADGET_MASS_STORAGE is not set
 # CONFIG_USB_MUSB is not set
 # CONFIG_VIDEO is not set
 # CONFIG_SOUND is not set
@@ -884,6 +904,7 @@ CONFIG_PROCESS_ESCAPE_SEQUENCE=y
 CONFIG_LZO_DECOMPRESS=y
 CONFIG_FNMATCH=y
 CONFIG_QSORT=y
+CONFIG_IMAGE_SPARSE=y
 CONFIG_LIBFDT=y
 # CONFIG_RATP is not set
 # CONFIG_ALLOW_PRNG_FALLBACK is not set
diff --git a/configs/platform-v7a/barebox-rpi2.config.diff b/configs/platform-v7a/barebox-rpi2.config.diff
index 852c271..e3a2666 100644
--- a/configs/platform-v7a/barebox-rpi2.config.diff
+++ b/configs/platform-v7a/barebox-rpi2.config.diff
@@ -1,19 +1,14 @@
-68457081af06bd8377bc38ef02c7d415
+cae3c1d7fff409368cf71da28bce089f
 CONFIG_ARM_ASM_UNIFIED=y
 # CONFIG_CMD_NVMEM is not set
-# CONFIG_CMD_USBGADGET is undefined
 CONFIG_DRIVER_NET_BCMGENET=y
 CONFIG_DRIVER_SERIAL_NS16550=y
 # CONFIG_EEPROM_93XX46 is not set
-# CONFIG_FASTBOOT_BASE is undefined
-# CONFIG_FASTBOOT_CMD_OEM is undefined
-# CONFIG_FASTBOOT_SPARSE is undefined
 CONFIG_GENERIC_PHY=y
 CONFIG_GPIO_RASPBERRYPI_EXP=y
 # CONFIG_HWRNG is not set
 # CONFIG_I2C_ALGOBIT is undefined
 # CONFIG_I2C_GPIO is not set
-# CONFIG_IMAGE_SPARSE is undefined
 CONFIG_MACH_RPI2=y
 CONFIG_MACH_RPI4=y
 CONFIG_MACH_RPI_CM3=y
@@ -35,17 +30,11 @@ CONFIG_PINCTRL_BCM283X=y
 CONFIG_PROMPT="R-Pi> "
 CONFIG_SERIAL_AMBA_PL011=y
 CONFIG_THUMB2_BAREBOX=y
-# CONFIG_USBGADGET_START is undefined
 CONFIG_USB_DWC2=y
-# CONFIG_USB_DWC2_GADGET is undefined
 CONFIG_USB_DWC2_HOST=y
 # CONFIG_USB_EHCI is not set
-# CONFIG_USB_GADGET is not set
-# CONFIG_USB_GADGET_AUTOSTART is undefined
-# CONFIG_USB_GADGET_DFU is undefined
-# CONFIG_USB_GADGET_FASTBOOT is undefined
-# CONFIG_USB_GADGET_MASS_STORAGE is undefined
-# CONFIG_USB_GADGET_SERIAL is undefined
+# CONFIG_USB_GADGET_MASS_STORAGE is not set
+# CONFIG_USB_GADGET_SERIAL is not set
 CONFIG_USB_NOP_XCEIV=y
 CONFIG_USB_OTGDEV=y
 CONFIG_WATCHDOG_BCM2835=y
diff --git a/configs/platform-v7a/barebox-stm32mp.config b/configs/platform-v7a/barebox-stm32mp.config
index 8a6f6d9..85a40d3 100644
--- a/configs/platform-v7a/barebox-stm32mp.config
+++ b/configs/platform-v7a/barebox-stm32mp.config
@@ -218,8 +218,8 @@ CONFIG_EXTERNAL_DTS_FRAGMENTS=""
 #
 # Android Fastboot
 #
-# CONFIG_FASTBOOT_SPARSE is not set
-# CONFIG_FASTBOOT_CMD_OEM is not set
+CONFIG_FASTBOOT_SPARSE=y
+CONFIG_FASTBOOT_CMD_OEM=y
 # end of Android Fastboot
 # end of General Settings
 
@@ -451,7 +451,7 @@ CONFIG_NET_RESOLV=y
 CONFIG_NET_IFUP=y
 CONFIG_NET_DHCP=y
 # CONFIG_NET_SNTP is not set
-# CONFIG_NET_FASTBOOT is not set
+CONFIG_NET_FASTBOOT=y
 
 #
 # Drivers
@@ -868,6 +868,7 @@ CONFIG_PROCESS_ESCAPE_SEQUENCE=y
 CONFIG_LZO_DECOMPRESS=y
 CONFIG_FNMATCH=y
 CONFIG_QSORT=y
+CONFIG_IMAGE_SPARSE=y
 # CONFIG_RATP is not set
 # CONFIG_ALLOW_PRNG_FALLBACK is not set
 # CONFIG_CRC_CCITT is not set
diff --git a/configs/platform-v7a/barebox-stm32mp.config.diff b/configs/platform-v7a/barebox-stm32mp.config.diff
index 4295076..284be0e 100644
--- a/configs/platform-v7a/barebox-stm32mp.config.diff
+++ b/configs/platform-v7a/barebox-stm32mp.config.diff
@@ -1,4 +1,4 @@
-68457081af06bd8377bc38ef02c7d415
+cae3c1d7fff409368cf71da28bce089f
 # CONFIG_32BIT is undefined
 # CONFIG_64BIT is undefined
 # CONFIG_ARCH_BCM283X is not set
@@ -49,8 +49,6 @@ CONFIG_DRIVER_SERIAL_STM32=y
 # CONFIG_DRIVER_SPI_LITEX_SPIFLASH is undefined
 CONFIG_EEPROM_AT24=y
 # CONFIG_EEPROM_AT25 is undefined
-# CONFIG_FASTBOOT_CMD_OEM is not set
-# CONFIG_FASTBOOT_SPARSE is not set
 # CONFIG_FIRMWARE_ALTERA_SERIAL is undefined
 # CONFIG_FS_JFFS2 is undefined
 CONFIG_GENERIC_PHY=y
@@ -61,7 +59,6 @@ CONFIG_GENERIC_PHY=y
 # CONFIG_I2C_BCM283X is undefined
 # CONFIG_I2C_GPIO is not set
 CONFIG_I2C_STM32=y
-# CONFIG_IMAGE_SPARSE is undefined
 CONFIG_LED_PWM=y
 # CONFIG_LED_TRIGGERS is not set
 # CONFIG_LIBFDT is undefined
diff --git a/configs/platform-v7a/barebox-vexpress.config b/configs/platform-v7a/barebox-vexpress.config
index 80d446c..b85f665 100644
--- a/configs/platform-v7a/barebox-vexpress.config
+++ b/configs/platform-v7a/barebox-vexpress.config
@@ -436,7 +436,7 @@ CONFIG_NET_RESOLV=y
 CONFIG_NET_IFUP=y
 CONFIG_NET_DHCP=y
 # CONFIG_NET_SNTP is not set
-# CONFIG_NET_FASTBOOT is not set
+CONFIG_NET_FASTBOOT=y
 
 #
 # Drivers
diff --git a/configs/platform-v7a/barebox-vexpress.config.diff b/configs/platform-v7a/barebox-vexpress.config.diff
index abbea1a..d323768 100644
--- a/configs/platform-v7a/barebox-vexpress.config.diff
+++ b/configs/platform-v7a/barebox-vexpress.config.diff
@@ -1,4 +1,4 @@
-68457081af06bd8377bc38ef02c7d415
+cae3c1d7fff409368cf71da28bce089f
 # CONFIG_32BIT is undefined
 # CONFIG_64BIT is undefined
 CONFIG_AMBA_SP804=y
diff --git a/configs/platform-v7a/barebox.config b/configs/platform-v7a/barebox.config
index 2e1d844..e8989d4 100644
--- a/configs/platform-v7a/barebox.config
+++ b/configs/platform-v7a/barebox.config
@@ -458,7 +458,7 @@ CONFIG_NET_RESOLV=y
 CONFIG_NET_IFUP=y
 CONFIG_NET_DHCP=y
 # CONFIG_NET_SNTP is not set
-# CONFIG_NET_FASTBOOT is not set
+CONFIG_NET_FASTBOOT=y
 
 #
 # Drivers
diff --git a/configs/platform-v7a_noneon/barebox-at91.config b/configs/platform-v7a_noneon/barebox-at91.config
index 16f7bc4..9c18061 100644
--- a/configs/platform-v7a_noneon/barebox-at91.config
+++ b/configs/platform-v7a_noneon/barebox-at91.config
@@ -107,7 +107,9 @@ CONFIG_BINFMT=y
 CONFIG_UIMAGE=y
 CONFIG_LOGBUF=y
 CONFIG_STDDEV=y
+CONFIG_USBGADGET_START=y
 CONFIG_BOOT=y
+CONFIG_FASTBOOT_BASE=y
 
 #
 # General Settings
@@ -170,7 +172,7 @@ CONFIG_TIMESTAMP=y
 CONFIG_BOOTM=y
 CONFIG_BOOTM_SHOW_TYPE=y
 # CONFIG_BOOTM_VERBOSE is not set
-# CONFIG_BOOTM_INITRD is not set
+CONFIG_BOOTM_INITRD=y
 CONFIG_BOOTM_OFTREE=y
 CONFIG_BOOTM_OFTREE_UIMAGE=y
 # CONFIG_BOOTM_AIMAGE is not set
@@ -180,7 +182,7 @@ CONFIG_BLSPEC=y
 CONFIG_FLEXIBLE_BOOTARGS=y
 # CONFIG_MMCBLKDEV_ROOTARG is not set
 CONFIG_BAREBOX_UPDATE=y
-# CONFIG_SYSTEM_PARTITIONS is not set
+CONFIG_SYSTEM_PARTITIONS=y
 CONFIG_IMD=y
 CONFIG_CONSOLE_FULL=y
 # CONFIG_CONSOLE_SIMPLE is not set
@@ -205,7 +207,7 @@ CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW=y
 CONFIG_DEFAULT_ENVIRONMENT_PATH="$(objtree)/.ptxdist-defaultenv"
 CONFIG_HAS_SCHED=y
 CONFIG_POLLER=y
-# CONFIG_BTHREAD is not set
+CONFIG_BTHREAD=y
 # CONFIG_STATE is not set
 # CONFIG_BOOTCHOOSER is not set
 CONFIG_RESET_SOURCE=y
@@ -217,6 +219,13 @@ CONFIG_EXTERNAL_DTS_FRAGMENTS=""
 # CONFIG_BOOTM_OPTEE is not set
 # CONFIG_PBL_OPTEE is not set
 # end of OP-TEE loading
+
+#
+# Android Fastboot
+#
+CONFIG_FASTBOOT_SPARSE=y
+CONFIG_FASTBOOT_CMD_OEM=y
+# end of Android Fastboot
 # end of General Settings
 
 #
@@ -271,6 +280,7 @@ CONFIG_CMD_VERSION=y
 # CONFIG_CMD_MMC is not set
 # CONFIG_CMD_MMC_EXTCSD is not set
 # CONFIG_CMD_POLLER is not set
+# CONFIG_CMD_BTHREAD is not set
 # CONFIG_CMD_SLICE is not set
 # end of Information
 
@@ -407,6 +417,7 @@ CONFIG_CMD_LED=y
 # CONFIG_CMD_POWEROFF is not set
 CONFIG_CMD_SPI=y
 CONFIG_CMD_LED_TRIGGER=y
+CONFIG_CMD_USBGADGET=y
 # end of Hardware manipulation
 
 #
@@ -438,7 +449,7 @@ CONFIG_NET_RESOLV=y
 CONFIG_NET_IFUP=y
 CONFIG_NET_DHCP=y
 # CONFIG_NET_SNTP is not set
-# CONFIG_NET_FASTBOOT is not set
+CONFIG_NET_FASTBOOT=y
 
 #
 # Drivers
@@ -564,8 +575,20 @@ CONFIG_DISK_WRITE=y
 # interface types
 #
 # CONFIG_DISK_INTF_PLATFORM_IDE is not set
+CONFIG_USB=y
 # CONFIG_USB_HOST is not set
-# CONFIG_USB_GADGET is not set
+CONFIG_USB_GADGET=y
+CONFIG_USB_GADGET_DUALSPEED=y
+CONFIG_USB_GADGET_DRIVER_AT91=y
+CONFIG_USB_GADGET_AUTOSTART=y
+
+#
+# USB Gadget drivers
+#
+# CONFIG_USB_GADGET_DFU is not set
+CONFIG_USB_GADGET_SERIAL=y
+CONFIG_USB_GADGET_FASTBOOT=y
+# CONFIG_USB_GADGET_MASS_STORAGE is not set
 # CONFIG_USB_MUSB is not set
 # CONFIG_VIDEO is not set
 # CONFIG_SOUND is not set
@@ -824,6 +847,7 @@ CONFIG_PROCESS_ESCAPE_SEQUENCE=y
 CONFIG_LZO_DECOMPRESS=y
 CONFIG_FNMATCH=y
 CONFIG_QSORT=y
+CONFIG_IMAGE_SPARSE=y
 # CONFIG_RATP is not set
 # CONFIG_ALLOW_PRNG_FALLBACK is not set
 # CONFIG_CRC_CCITT is not set
diff --git a/configs/platform-v7a_noneon/barebox-at91.config.diff b/configs/platform-v7a_noneon/barebox-at91.config.diff
index 81bd006..d4bd071 100644
--- a/configs/platform-v7a_noneon/barebox-at91.config.diff
+++ b/configs/platform-v7a_noneon/barebox-at91.config.diff
@@ -1,4 +1,4 @@
-ce8c602a388050a3575dc69e4399836d
+503a2995018ed6b994350193b131ee59
 CONFIG_ARCH_AT91=y
 # CONFIG_ARCH_BCM283X is not set
 CONFIG_ARCH_TEXT_BASE=0x23f00000
@@ -15,7 +15,6 @@ CONFIG_AT91_MULTI_BOARDS=y
 # CONFIG_BOARD_GENERIC_DT is undefined
 CONFIG_BOOTM_OFTREE_UIMAGE=y
 # CONFIG_BOOTM_VERBOSE is not set
-# CONFIG_BTHREAD is not set
 # CONFIG_BZLIB is not set
 CONFIG_CLOCKSOURCE_ATMEL_PIT=y
 # CONFIG_CLOCKSOURCE_BCM283X is undefined
@@ -23,7 +22,7 @@ CONFIG_CLOCKSOURCE_ATMEL_PIT=y
 CONFIG_CMD_AT91CLK=y
 CONFIG_CMD_AT91_BOOT_TEST=y
 # CONFIG_CMD_BOOTZ is not set
-# CONFIG_CMD_BTHREAD is undefined
+# CONFIG_CMD_BTHREAD is not set
 # CONFIG_CMD_CLK is not set
 # CONFIG_CMD_I2C is undefined
 # CONFIG_CMD_IMD is not set
@@ -43,7 +42,6 @@ CONFIG_CMD_AT91_BOOT_TEST=y
 # CONFIG_CMD_TFTP is not set
 # CONFIG_CMD_UNCOMPRESS is not set
 # CONFIG_CMD_USB is undefined
-# CONFIG_CMD_USBGADGET is undefined
 # CONFIG_CMD_WD is undefined
 # CONFIG_CMD_WD_DEFAULT_TIMOUT is undefined
 CONFIG_COMMON_CLK_AT91=y
@@ -158,19 +156,14 @@ CONFIG_SPI_MEM=y
 # CONFIG_STATE_DRV is undefined
 # CONFIG_SYSCON_REBOOT_MODE is not set
 # CONFIG_SYSTEMD_OF_WATCHDOG is undefined
+CONFIG_SYSTEM_PARTITIONS=y
 # CONFIG_THUMB2_BAREBOX is undefined
-# CONFIG_USB is undefined
-# CONFIG_USBGADGET_START is undefined
 # CONFIG_USB_DWC2_GADGET is undefined
 # CONFIG_USB_DWC2_HOST is undefined
 # CONFIG_USB_DWC3 is undefined
 # CONFIG_USB_EHCI is undefined
-# CONFIG_USB_GADGET is not set
-# CONFIG_USB_GADGET_AUTOSTART is undefined
-# CONFIG_USB_GADGET_DFU is undefined
-# CONFIG_USB_GADGET_FASTBOOT is undefined
-# CONFIG_USB_GADGET_MASS_STORAGE is undefined
-# CONFIG_USB_GADGET_SERIAL is undefined
+CONFIG_USB_GADGET_DRIVER_AT91=y
+CONFIG_USB_GADGET_DUALSPEED=y
 # CONFIG_USB_HOST is not set
 # CONFIG_USB_HUB_USB251XB is undefined
 # CONFIG_USB_NET_AX88179_178A is undefined
diff --git a/configs/platform-v7a_noneon/barebox-vexpress.config b/configs/platform-v7a_noneon/barebox-vexpress.config
index c6037b4..2caf92d 100644
--- a/configs/platform-v7a_noneon/barebox-vexpress.config
+++ b/configs/platform-v7a_noneon/barebox-vexpress.config
@@ -84,6 +84,7 @@ CONFIG_STDDEV=y
 CONFIG_MENUTREE=y
 CONFIG_USBGADGET_START=y
 CONFIG_BOOT=y
+CONFIG_FASTBOOT_BASE=y
 
 #
 # General Settings
@@ -203,6 +204,13 @@ CONFIG_EXTERNAL_DTS_FRAGMENTS=""
 # CONFIG_BOOTM_OPTEE is not set
 # CONFIG_PBL_OPTEE is not set
 # end of OP-TEE loading
+
+#
+# Android Fastboot
+#
+CONFIG_FASTBOOT_SPARSE=y
+CONFIG_FASTBOOT_CMD_OEM=y
+# end of Android Fastboot
 # end of General Settings
 
 #
@@ -428,7 +436,7 @@ CONFIG_NET_RESOLV=y
 CONFIG_NET_IFUP=y
 CONFIG_NET_DHCP=y
 # CONFIG_NET_SNTP is not set
-# CONFIG_NET_FASTBOOT is not set
+CONFIG_NET_FASTBOOT=y
 
 #
 # Drivers
@@ -588,7 +596,7 @@ CONFIG_USB_GADGET_AUTOSTART=y
 #
 # CONFIG_USB_GADGET_DFU is not set
 CONFIG_USB_GADGET_SERIAL=y
-# CONFIG_USB_GADGET_FASTBOOT is not set
+CONFIG_USB_GADGET_FASTBOOT=y
 # CONFIG_USB_GADGET_MASS_STORAGE is not set
 # CONFIG_USB_MUSB is not set
 # CONFIG_VIDEO is not set
@@ -826,6 +834,7 @@ CONFIG_PROCESS_ESCAPE_SEQUENCE=y
 CONFIG_LZO_DECOMPRESS=y
 CONFIG_FNMATCH=y
 CONFIG_QSORT=y
+CONFIG_IMAGE_SPARSE=y
 CONFIG_LIBFDT=y
 # CONFIG_RATP is not set
 # CONFIG_ALLOW_PRNG_FALLBACK is not set
diff --git a/configs/platform-v7a_noneon/barebox-vexpress.config.diff b/configs/platform-v7a_noneon/barebox-vexpress.config.diff
index b08aa3f..ea72472 100644
--- a/configs/platform-v7a_noneon/barebox-vexpress.config.diff
+++ b/configs/platform-v7a_noneon/barebox-vexpress.config.diff
@@ -1,11 +1,10 @@
-ce8c602a388050a3575dc69e4399836d
+503a2995018ed6b994350193b131ee59
 CONFIG_AMBA_SP804=y
 # CONFIG_ARCH_BCM283X is not set
 CONFIG_ARCH_VEXPRESS=y
 # CONFIG_ARM_SCMI_PROTOCOL is undefined
 # CONFIG_ARM_SECURE_MONITOR is undefined
 # CONFIG_ARM_SMCCC is undefined
-CONFIG_BOOTM_INITRD=y
 # CONFIG_CFI_BUFFER_WRITE is not set
 # CONFIG_CLOCKSOURCE_BCM283X is undefined
 # CONFIG_CMD_GPIO is undefined
diff --git a/configs/platform-v7a_noneon/barebox.config b/configs/platform-v7a_noneon/barebox.config
index 1384d1a..8b3a2f4 100644
--- a/configs/platform-v7a_noneon/barebox.config
+++ b/configs/platform-v7a_noneon/barebox.config
@@ -96,6 +96,7 @@ CONFIG_STDDEV=y
 CONFIG_MENUTREE=y
 CONFIG_USBGADGET_START=y
 CONFIG_BOOT=y
+CONFIG_FASTBOOT_BASE=y
 
 #
 # General Settings
@@ -160,7 +161,7 @@ CONFIG_TIMESTAMP=y
 CONFIG_BOOTM=y
 CONFIG_BOOTM_SHOW_TYPE=y
 CONFIG_BOOTM_VERBOSE=y
-# CONFIG_BOOTM_INITRD is not set
+CONFIG_BOOTM_INITRD=y
 CONFIG_BOOTM_OFTREE=y
 # CONFIG_BOOTM_OFTREE_UIMAGE is not set
 # CONFIG_BOOTM_AIMAGE is not set
@@ -215,6 +216,13 @@ CONFIG_EXTERNAL_DTS_FRAGMENTS=""
 # CONFIG_BOOTM_OPTEE is not set
 # CONFIG_PBL_OPTEE is not set
 # end of OP-TEE loading
+
+#
+# Android Fastboot
+#
+CONFIG_FASTBOOT_SPARSE=y
+CONFIG_FASTBOOT_CMD_OEM=y
+# end of Android Fastboot
 # end of General Settings
 
 #
@@ -442,7 +450,7 @@ CONFIG_NET_RESOLV=y
 CONFIG_NET_IFUP=y
 CONFIG_NET_DHCP=y
 # CONFIG_NET_SNTP is not set
-# CONFIG_NET_FASTBOOT is not set
+CONFIG_NET_FASTBOOT=y
 
 #
 # Drivers
@@ -600,7 +608,7 @@ CONFIG_USB_GADGET_AUTOSTART=y
 #
 # CONFIG_USB_GADGET_DFU is not set
 CONFIG_USB_GADGET_SERIAL=y
-# CONFIG_USB_GADGET_FASTBOOT is not set
+CONFIG_USB_GADGET_FASTBOOT=y
 # CONFIG_USB_GADGET_MASS_STORAGE is not set
 # CONFIG_USB_MUSB is not set
 # CONFIG_VIDEO is not set
@@ -873,6 +881,7 @@ CONFIG_PROCESS_ESCAPE_SEQUENCE=y
 CONFIG_LZO_DECOMPRESS=y
 CONFIG_FNMATCH=y
 CONFIG_QSORT=y
+CONFIG_IMAGE_SPARSE=y
 CONFIG_LIBFDT=y
 # CONFIG_RATP is not set
 # CONFIG_ALLOW_PRNG_FALLBACK is not set
diff --git a/configs/platform-v8a/barebox-imx8m.config b/configs/platform-v8a/barebox-imx8m.config
index d28f475..ae53d93 100644
--- a/configs/platform-v8a/barebox-imx8m.config
+++ b/configs/platform-v8a/barebox-imx8m.config
@@ -246,7 +246,7 @@ CONFIG_BLSPEC=y
 CONFIG_FLEXIBLE_BOOTARGS=y
 CONFIG_MMCBLKDEV_ROOTARG=y
 CONFIG_BAREBOX_UPDATE=y
-# CONFIG_SYSTEM_PARTITIONS is not set
+CONFIG_SYSTEM_PARTITIONS=y
 CONFIG_IMD=y
 CONFIG_CONSOLE_FULL=y
 # CONFIG_CONSOLE_SIMPLE is not set
@@ -275,7 +275,7 @@ CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW_MENU=y
 CONFIG_DEFAULT_ENVIRONMENT_PATH="$(objtree)/.ptxdist-defaultenv"
 CONFIG_HAS_SCHED=y
 CONFIG_POLLER=y
-# CONFIG_BTHREAD is not set
+CONFIG_BTHREAD=y
 # CONFIG_STATE is not set
 # CONFIG_BOOTCHOOSER is not set
 CONFIG_RESET_SOURCE=y
@@ -293,7 +293,7 @@ CONFIG_EXTERNAL_DTS_FRAGMENTS=""
 # Android Fastboot
 #
 CONFIG_FASTBOOT_SPARSE=y
-# CONFIG_FASTBOOT_CMD_OEM is not set
+CONFIG_FASTBOOT_CMD_OEM=y
 # end of Android Fastboot
 # end of General Settings
 
@@ -351,6 +351,7 @@ CONFIG_CMD_VERSION=y
 # CONFIG_CMD_MMC is not set
 CONFIG_CMD_MMC_EXTCSD=y
 # CONFIG_CMD_POLLER is not set
+# CONFIG_CMD_BTHREAD is not set
 # CONFIG_CMD_SLICE is not set
 # end of Information
 
@@ -525,7 +526,7 @@ CONFIG_NET_RESOLV=y
 CONFIG_NET_IFUP=y
 CONFIG_NET_DHCP=y
 # CONFIG_NET_SNTP is not set
-# CONFIG_NET_FASTBOOT is not set
+CONFIG_NET_FASTBOOT=y
 
 #
 # Drivers
diff --git a/configs/platform-v8a/barebox-rockchip.config b/configs/platform-v8a/barebox-rockchip.config
index c063a97..60c8517 100644
--- a/configs/platform-v8a/barebox-rockchip.config
+++ b/configs/platform-v8a/barebox-rockchip.config
@@ -226,7 +226,7 @@ CONFIG_EXTERNAL_DTS_FRAGMENTS=""
 #
 # Android Fastboot
 #
-# CONFIG_FASTBOOT_SPARSE is not set
+CONFIG_FASTBOOT_SPARSE=y
 CONFIG_FASTBOOT_CMD_OEM=y
 # end of Android Fastboot
 # end of General Settings
@@ -458,7 +458,7 @@ CONFIG_NET_RESOLV=y
 CONFIG_NET_IFUP=y
 CONFIG_NET_DHCP=y
 # CONFIG_NET_SNTP is not set
-# CONFIG_NET_FASTBOOT is not set
+CONFIG_NET_FASTBOOT=y
 
 #
 # Drivers
@@ -869,6 +869,7 @@ CONFIG_PROCESS_ESCAPE_SEQUENCE=y
 # CONFIG_LZO_DECOMPRESS is not set
 CONFIG_FNMATCH=y
 CONFIG_QSORT=y
+CONFIG_IMAGE_SPARSE=y
 # CONFIG_RATP is not set
 # CONFIG_ALLOW_PRNG_FALLBACK is not set
 # CONFIG_CRC_CCITT is not set
diff --git a/doc/index.rst b/doc/index.rst
index 2ce9c75..f76f48c 100644
--- a/doc/index.rst
+++ b/doc/index.rst
@@ -9,6 +9,7 @@ Welcome to DistroKit
    intro
    hardware
    guru
+   testing
 
 * :ref:`search`
 * :ref:`genindex`
diff --git a/doc/testing.rst b/doc/testing.rst
new file mode 100644
index 0000000..afa1be8
--- /dev/null
+++ b/doc/testing.rst
@@ -0,0 +1,163 @@
+Fast development
+================
+
+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.
+
+'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.
+
+Here we want to run a Linux kernel and a corresponding root filesystem,
+without writing target system local memories againg and again for each
+development or test cycle.
+
+In this text, 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
+have some requirements to the target system's free memory. The bootloader
+keeps up to 512 MiB of memory to add files to its own RAM disk. The
+512 MiB is valid for a physical memory size of 1 GiB and above. With less
+physical memory it is always 50 % of the available physical memory.
+Keep an eye on the size of the initramfs file if it fits onto the
+bootloader's RAM disk. Reduce its size on demand.
+
+Note: the 50 % rule is only valid for the time the bootloader runs. After
+      starting the Linux kernel, 100 % of the physical memory is available.
+
+Some settings are required to make it work smoothly.
+
+Linux kernel
+------------
+
+- CONFIG_BLK_DEV_INITRD=y
+
+And one of the supported decompressors:
+
+- CONFIG_RD_GZIP
+
+Note: the required decompressor depends on the used compression method for the
+      initramfs selected in the BSP. See below.
+
+Bootloader
+----------
+
+The 'bootm' command must support initrd/initramfs:
+
+- CONFIG_BOOTM_INITRD = y
+
+If your target system has an OTG connector, you should enable 'fastboot' on
+the gadget interface:
+
+- CONFIG_USB_GADGET = y
+- CONFIG_USB_GADGET_FASTBOOT = y
+- CONFIG_CMD_USBGADGET = y
+
+If you want to use 'fastboot' via network instead (or in addition) to the
+USB interface, you should enable this channel as well:
+
+- CONFIG_NET_FASTBOOT = y
+
+Since we want to transfer large initrd/initramfs files, 'fastboot' requires
+'sparse' feature support:
+
+- CONFIG_FASTBOOT_SPARSE = y
+
+And we want run the downloaded files, so we need:
+
+- CONFIG_FASTBOOT_CMD_OEM = y
+
+BSP
+---
+
+Create a initramf of the root filesystem:
+
+- PTXCONF_IMAGE_ROOT_CPIO = y
+
+You need to select a compression method for the initramfs file in relation to
+the selected decompression support in the Linux kernel. See notes above.
+
+- PTXCONF_IMAGE_ROOT_CPIO_COMPRESSION_MODE_GZ = y
+
+The generic behaviour changes when the Linux kernel starts an initrd/initramfs
+and it tries to start '/init' instead of an init processes in subdirectories.
+If you can change the kernel's command line, you can restore the generic behaviour
+by adding 'rdinit=/sbin/init'. If not, you can create a softlink at '/init' pointing
+to '/sbin/init via:
+
+- PTXCONF_ROOTFS_INIT_LINK
+
+Optimisation
+------------
+
+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
+have it in the root filesystem as well. This will reduce the size of the
+initramfs.
+
+- PTXCONF_KERNEL_INSTALL = n
+
+Some 'rc-once' jobs are useless in an initramfs and only increase the
+boot time again and again:
+
+- PTXCONF_GLIBC_LDCONFIG_RC_ONCE = n
+- PTXCONF_MACHINE_ID_RC_ONCE = n
+
+If possible, disable the whole rc-once step:
+
+- PTXCONF_RC_ONCE = n
+
+If you don't need ssh, you can disable its key generation as well:
+
+- PTXCONF_OPENSSH_SSHD_GENKEYS = n
+
+Preparations
+------------
+
+'fastboot' requires to divide large files into smaller chunks, if their
+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
+      transfer.
+
+Most of the time the initramfs file hits the threshold. Thus, it must
+be 4 kiB aligned::
+
+   dd if=<platform-dir>/images/root.cpio.gz of=cpio.gz conv=sync bs=4096
+
+Target
+------
+
+Enable the 'fastboot' feature on the target system::
+
+   usbgadget -a -A /kernel(kernel)c,/devicetree(devicetree)c,/initrd(initrd)c
+
+Host
+----
+
+Download the three parts into the target system::
+
+   fastboot -i 7531 flash kernel <platform-dir>/images/linuximage
+   fastboot -i 7531 flash devicetree <platform-dir>/images/<devicetree>
+   fastboot -i 7531 flash initrd cpio.gz
+
+If you have no '/init' in your root filesystem, you need to define the
+init executable to be run by the Linux kernel::
+
+   fastboot -i 7531 oem exec 'global linux.bootargs.ramfs=rdinit=/sbin/init'
+
+In the final step, just start the already downloaded files::
+
+   fastboot -i 7531 oem exec -- bootm -o /devicetree -r /initrd /kernel
+
-- 
2.30.2




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

* Re: [DistroKit] [PATCH 1/3] mips: linux: adapt the build rules regarding the tool 'pahole'
  2023-05-02  8:06 [DistroKit] [PATCH 1/3] mips: linux: adapt the build rules regarding the tool 'pahole' Juergen Borleis
  2023-05-02  8:06 ` [DistroKit] [PATCH 2/3] mips: linux: fixup kernel configuration Juergen Borleis
  2023-05-02  8:06 ` [DistroKit] [PATCH 3/3] arch: bootloader: enable 'fastboot' support over USB and network Juergen Borleis
@ 2023-05-08  8:08 ` Robert Schwebel
  2 siblings, 0 replies; 4+ messages in thread
From: Robert Schwebel @ 2023-05-08  8:08 UTC (permalink / raw)
  To: Juergen Borleis; +Cc: distrokit

On Tue, May 02, 2023 at 10:06:44AM +0200, Juergen Borleis wrote:
> Using 'pahole' needs to be disabled on MIPS as well in order to avoid
> host depended config file adaptions which let the build fail.

Thx, series applied to next.

rsc
-- 
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] 4+ messages in thread

end of thread, other threads:[~2023-05-08  8:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-02  8:06 [DistroKit] [PATCH 1/3] mips: linux: adapt the build rules regarding the tool 'pahole' Juergen Borleis
2023-05-02  8:06 ` [DistroKit] [PATCH 2/3] mips: linux: fixup kernel configuration Juergen Borleis
2023-05-02  8:06 ` [DistroKit] [PATCH 3/3] arch: bootloader: enable 'fastboot' support over USB and network Juergen Borleis
2023-05-08  8:08 ` [DistroKit] [PATCH 1/3] mips: linux: adapt the build rules regarding the tool 'pahole' Robert Schwebel

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