DistroKit Mailinglist
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Johannes Zink <j.zink@pengutronix.de>, distrokit@pengutronix.de
Cc: jzi@pengutronix.de
Subject: Re: [DistroKit] [PATCH 3/3] v7a: stm32mp1: autostart usb fastboot and ACM gadget on AM335x boards
Date: Fri, 24 Mar 2023 19:42:10 +0100	[thread overview]
Message-ID: <daaf10d3-485c-673b-37cf-8269a84a360d@pengutronix.de> (raw)
In-Reply-To: <20230324182845.500894-4-j.zink@pengutronix.de>

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 <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

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 |




      reply	other threads:[~2023-03-24 18:42 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 ` [DistroKit] [PATCH 3/3] v7a: stm32mp1: " Johannes Zink
2023-03-24 18:42   ` Ahmad Fatoum [this message]

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=daaf10d3-485c-673b-37cf-8269a84a360d@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=distrokit@pengutronix.de \
    --cc=j.zink@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