From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Fri, 24 Mar 2023 19:42:20 +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 1pfmMl-00DS0E-Q9 for lore@lore.pengutronix.de; Fri, 24 Mar 2023 19:42:20 +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 1pfmMl-0001P1-8V; Fri, 24 Mar 2023 19:42:19 +0100 Received: from ptz.office.stw.pengutronix.de ([2a0a:edc0:0:900:1d::77] helo=[127.0.0.1]) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1pfmMh-0001OG-AG; Fri, 24 Mar 2023 19:42:15 +0100 Message-ID: Date: Fri, 24 Mar 2023 19:42:10 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.2 Content-Language: en-US To: Johannes Zink , distrokit@pengutronix.de References: <20230324182845.500894-1-j.zink@pengutronix.de> <20230324182845.500894-4-j.zink@pengutronix.de> From: Ahmad Fatoum In-Reply-To: <20230324182845.500894-4-j.zink@pengutronix.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [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: 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 Hello Johannes, On 24.03.23 19:28, Johannes Zink wrote: > 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 The MC1 and EV1 have an eMMC, but the DK1/DK2 doesn't. Should we make mmc optional? Nitpick: I'd have preferred emmc instead of mmc, because mmc is sometimes used to refer to both (e.g. in the names of the barebox /dev files). > 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 Can you enable sparse support? Flashing without it can be quite slow. > -# 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 -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |