From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Fri, 24 Mar 2023 19:28:58 +0100 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pfm9p-00DRXG-8N for lore@lore.pengutronix.de; Fri, 24 Mar 2023 19:28:58 +0100 Received: from localhost ([127.0.0.1] helo=metis.ext.pengutronix.de) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1pfm9o-0007zL-Gj; Fri, 24 Mar 2023 19:28:56 +0100 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pfm9i-0007yR-9s; Fri, 24 Mar 2023 19:28:50 +0100 Received: from [2a0a:edc0:0:1101:1d::39] (helo=dude03.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pfm9h-006RZw-MI; Fri, 24 Mar 2023 19:28:49 +0100 Received: from jzi by dude03.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pfm9g-0026Jy-Qv; Fri, 24 Mar 2023 19:28:48 +0100 From: Johannes Zink To: distrokit@pengutronix.de Date: Fri, 24 Mar 2023 19:28:45 +0100 Message-Id: <20230324182845.500894-4-j.zink@pengutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230324182845.500894-1-j.zink@pengutronix.de> References: <20230324182845.500894-1-j.zink@pengutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [DistroKit] [PATCH 3/3] v7a: stm32mp1: autostart usb fastboot and ACM gadget on AM335x boards X-BeenThere: distrokit@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: DistroKit Mailinglist List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Johannes Zink , jzi@pengutronix.de Sender: "DistroKit" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: distrokit-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false 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 --- 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