From: Johannes Zink <j.zink@pengutronix.de>
To: distrokit@pengutronix.de
Cc: Johannes Zink <j.zink@pengutronix.de>, jzi@pengutronix.de
Subject: [DistroKit] [PATCH 3/3] v7a: stm32mp1: autostart usb fastboot and ACM gadget on AM335x boards
Date: Fri, 24 Mar 2023 19:28:45 +0100 [thread overview]
Message-ID: <20230324182845.500894-4-j.zink@pengutronix.de> (raw)
In-Reply-To: <20230324182845.500894-1-j.zink@pengutronix.de>
This allows the board to be booted by supplying kernel, oftree and
initramfs over usb fastboot. This is particularly useful for board bringup and
testing in situations where network boot is not possible.
Also, it may be used to flash the SD card or eMMC.
While at it: also enable the ACM USB Gadget, which exposes a serial
console over USB and enable OEM commands.
Signed-off-by: Johannes Zink <j.zink@pengutronix.de>
---
configs/platform-v7a/barebox-stm32mp-defaultenv/nv/fastboot.bbu | 1 +
.../barebox-stm32mp-defaultenv/nv/fastboot.partitions | 1 +
.../barebox-stm32mp-defaultenv/nv/global.usbgadget.autostart | 1 +
configs/platform-v7a/barebox-stm32mp.config | 2 +-
configs/platform-v7a/barebox-stm32mp.config.diff | 1 -
5 files changed, 4 insertions(+), 2 deletions(-)
create mode 100644 configs/platform-v7a/barebox-stm32mp-defaultenv/nv/fastboot.bbu
create mode 100644 configs/platform-v7a/barebox-stm32mp-defaultenv/nv/fastboot.partitions
create mode 100644 configs/platform-v7a/barebox-stm32mp-defaultenv/nv/global.usbgadget.autostart
diff --git a/configs/platform-v7a/barebox-stm32mp-defaultenv/nv/fastboot.bbu b/configs/platform-v7a/barebox-stm32mp-defaultenv/nv/fastboot.bbu
new file mode 100644
index 000000000000..d00491fd7e5b
--- /dev/null
+++ b/configs/platform-v7a/barebox-stm32mp-defaultenv/nv/fastboot.bbu
@@ -0,0 +1 @@
+1
diff --git a/configs/platform-v7a/barebox-stm32mp-defaultenv/nv/fastboot.partitions b/configs/platform-v7a/barebox-stm32mp-defaultenv/nv/fastboot.partitions
new file mode 100644
index 000000000000..6f45b2161843
--- /dev/null
+++ b/configs/platform-v7a/barebox-stm32mp-defaultenv/nv/fastboot.partitions
@@ -0,0 +1 @@
+/dev/mmc0(sd)o,/dev/mmc1(mmc),/kernel(kernel)c,/initramfs(initramfs)c,/oftree(oftree)c
diff --git a/configs/platform-v7a/barebox-stm32mp-defaultenv/nv/global.usbgadget.autostart b/configs/platform-v7a/barebox-stm32mp-defaultenv/nv/global.usbgadget.autostart
new file mode 100644
index 000000000000..d00491fd7e5b
--- /dev/null
+++ b/configs/platform-v7a/barebox-stm32mp-defaultenv/nv/global.usbgadget.autostart
@@ -0,0 +1 @@
+1
diff --git a/configs/platform-v7a/barebox-stm32mp.config b/configs/platform-v7a/barebox-stm32mp.config
index 8a6f6d9474d2..1366849a85a2 100644
--- a/configs/platform-v7a/barebox-stm32mp.config
+++ b/configs/platform-v7a/barebox-stm32mp.config
@@ -219,7 +219,7 @@ CONFIG_EXTERNAL_DTS_FRAGMENTS=""
# Android Fastboot
#
# CONFIG_FASTBOOT_SPARSE is not set
-# CONFIG_FASTBOOT_CMD_OEM is not set
+CONFIG_FASTBOOT_CMD_OEM=y
# end of Android Fastboot
# end of General Settings
diff --git a/configs/platform-v7a/barebox-stm32mp.config.diff b/configs/platform-v7a/barebox-stm32mp.config.diff
index 42950765f911..1ec6300e636d 100644
--- a/configs/platform-v7a/barebox-stm32mp.config.diff
+++ b/configs/platform-v7a/barebox-stm32mp.config.diff
@@ -49,7 +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
--
2.30.2
next prev parent reply other threads:[~2023-03-24 18:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-24 18:28 [DistroKit] [PATCH 0/3] Auto-Enable Android Fastboot Gadget for some boards Johannes Zink
2023-03-24 18:28 ` [DistroKit] [PATCH 1/3] v8a: rock3a: autostart usb fastboot and ACM gadget on ROCK 3A Johannes Zink
2023-03-24 18:42 ` Ahmad Fatoum
2023-03-24 18:28 ` [DistroKit] [PATCH 2/3] v7a: am335x: autostart usb fastboot and ACM gadget on AM335x boards Johannes Zink
2023-03-24 18:28 ` Johannes Zink [this message]
2023-03-24 18:42 ` [DistroKit] [PATCH 3/3] v7a: stm32mp1: " Ahmad Fatoum
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230324182845.500894-4-j.zink@pengutronix.de \
--to=j.zink@pengutronix.de \
--cc=distrokit@pengutronix.de \
--cc=jzi@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox