All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mattijs Korpershoek <mkorpershoek@baylibre.com>
To: Guillaume La Roque <glaroque@baylibre.com>,
	Bryan Brattlof <bb@ti.com>, Tom Rini <trini@konsulko.com>,
	Joe Hershberger <joe.hershberger@ni.com>,
	Nishanth Menon <nm@ti.com>,
	Robert Nelson <robertcnelson@gmail.com>,
	Vignesh Raghavendra <vigneshr@ti.com>
Cc: u-boot@lists.denx.de, Vishal Mahaveer <vishalm@ti.com>,
	Guillaume La Roque <glaroque@baylibre.com>
Subject: Re: [PATCH 1/3] board: ti: am62x_evm: Add android bootflow
Date: Tue, 03 Sep 2024 09:25:17 +0200	[thread overview]
Message-ID: <875xrd8ahu.fsf@baylibre.com> (raw)
In-Reply-To: <20240902-sitaraupstream-v1-1-0c478c33c08b@baylibre.com>

Hi Guillaume,

Thank you for the patch.

On lun., sept. 02, 2024 at 18:31, Guillaume La Roque <glaroque@baylibre.com> wrote:

> Add Android bootflow support for AM62X SK EVM board with
> new android boot method.

Maybe add some lines here on how to enable this. I know it's in the docs
but it would be helpful to have it here as well.

>
> Co-developed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
> Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
> Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
> ---
>  board/ti/am62x/am62x.env         |  5 +++++
>  configs/am62x_a53_android.config | 34 ++++++++++++++++++++++++++++++++++
>  doc/board/ti/am62x_sk.rst        | 14 ++++++++++++++
>  include/env/ti/android.env       | 31 +++++++++++++++++++++++++++++++
>  4 files changed, 84 insertions(+)
>
> diff --git a/board/ti/am62x/am62x.env b/board/ti/am62x/am62x.env
> index 09b9b16a3e58..078cc4b5ac96 100644
> --- a/board/ti/am62x/am62x.env
> +++ b/board/ti/am62x/am62x.env
> @@ -19,3 +19,8 @@ splashfile=ti_logo_414x97_32bpp.bmp.gz
>  splashimage=0x80200000
>  splashpos=m,m
>  splashsource=sf
> +
> +#if CONFIG_BOOTMETH_ANDROID
> +#include <env/ti/android.env>
> +adtb_idx=0
> +#endif
> \ No newline at end of file
> diff --git a/configs/am62x_a53_android.config b/configs/am62x_a53_android.config
> new file mode 100644
> index 000000000000..0be6fdd1620f
> --- /dev/null
> +++ b/configs/am62x_a53_android.config
> @@ -0,0 +1,34 @@
> +# Defconfig fragment for enabling Android boot flow
> +# to apply on top of am62x_evm_a53_defconfig or am62x_lpsk_a53_defconfig
> +# Enable fastboot
> +CONFIG_USB_FUNCTION_FASTBOOT=y
> +CONFIG_FASTBOOT_BUF_ADDR=0xC0000000
> +CONFIG_FASTBOOT_BUF_SIZE=0x2F000000
> +CONFIG_FASTBOOT_FLASH=y
> +CONFIG_FASTBOOT_FLASH_MMC_DEV=0
> +CONFIG_CMD_GPT=y # Needed for FASTBOOT_CMD_OEM_FORMAT
> +CONFIG_RANDOM_UUID=y # Needed for FASTBOOT_CMD_OEM_FORMAT
> +CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
> +# Enable Android boot flow
> +CONFIG_BOOTMETH_ANDROID=y
> +CONFIG_SYS_BOOTM_LEN=0x4000000
> +CONFIG_SYS_MALLOC_LEN=0x08000000
> +CONFIG_AVB_VERIFY=y
> +CONFIG_LIBAVB=y
> +CONFIG_CMD_ADTIMG=y
> +CONFIG_CMD_ABOOTIMG=y
> +CONFIG_CMD_AB_SELECT=y
> +CONFIG_CMD_AVB=y
> +# Store env in eMMC for dtbo overlays
> +CONFIG_DEFAULT_ENV_IS_RW=y
> +CONFIG_ENV_SIZE=0x20000
> +CONFIG_ENV_OFFSET=0x100000
> +CONFIG_ENV_IS_IN_MMC=y
> +CONFIG_ENV_IS_NOWHERE=n
> +CONFIG_SYS_MMC_ENV_PART=1
> +CONFIG_SPL_ENV_IS_NOWHERE=y

I don't think it's necessary to have the environment in the eMMC
at this point.
We do not support dtbo in bootmeth_android. (as of today)

> +# Disable splashscreen
> +CONFIG_SPL_VIDEO=n
> +CONFIG_VIDEO=n
> +CONFIG_SPL_BMP=n
> +CONFIG_BMP=n

Same for this section, are you sure this is needed?

> diff --git a/doc/board/ti/am62x_sk.rst b/doc/board/ti/am62x_sk.rst
> index b9d35244d446..51dab839ddd9 100644
> --- a/doc/board/ti/am62x_sk.rst
> +++ b/doc/board/ti/am62x_sk.rst
> @@ -132,6 +132,20 @@ DFU support (and disable storage support)
>  .. include::  ../ti/k3.rst
>      :start-after: .. k3_rst_include_start_build_steps_uboot
>      :end-before: .. k3_rst_include_end_build_steps_uboot
> +
> +* 3.2.1 Alternative build of A53 for Android bootflow:
> +
> +Since the Android requires many more dependencies, it is disabled by default.
> +An extra config fragment should be used to enable Android bootflow support.
> +
> +.. prompt:: bash $
> +
> +  export UBOOT_CFG_CORTEXR="${UBOOT_CFG_CORTEXA} am62x_a53_android.config"
> +
> +.. include::  ../ti/k3.rst
> +    :start-after: .. k3_rst_include_start_build_steps_uboot
> +    :end-before: .. k3_rst_include_end_build_steps_uboot
> +
>  .. am62x_evm_rst_include_end_build_steps
>  
>  Target Images
> diff --git a/include/env/ti/android.env b/include/env/ti/android.env
> new file mode 100644
> index 000000000000..a058beb7fc42
> --- /dev/null
> +++ b/include/env/ti/android.env
> @@ -0,0 +1,31 @@
> +/* Android partitions
> + * += is needed because \n is converted by space in .env files */
> +partitions=name=bootloader,start=5M,size=8M,uuid=${uuid_gpt_bootloader};
> +partitions+=name=tiboot3,start=4M,size=1M,uuid=${uuid_gpt_tiboot3};
> +partitions+=name=misc,start=13824K,size=512K,uuid=${uuid_gpt_misc};
> +partitions+=name=frp,size=512K,uuid=${uuid_gpt_frp};
> +partitions+=name=boot_a,size=40M,uuid=${uuid_gpt_boot_a};
> +partitions+=name=boot_b,size=40M,uuid=${uuid_gpt_boot_b};
> +partitions+=name=vendor_boot_a,size=32M,uuid=${uuid_gpt_vendor_boot_a};
> +partitions+=name=vendor_boot_b,size=32M,uuid=${uuid_gpt_vendor_boot_b};
> +partitions+=name=init_boot_a,size=8M,uuid=${uuid_gpt_init_boot_a};
> +partitions+=name=init_boot_b,size=8M,uuid=${uuid_gpt_init_boot_b};
> +partitions+=name=dtbo_a,size=8M,uuid=${uuid_gpt_dtbo_a};
> +partitions+=name=dtbo_b,size=8M,uuid=${uuid_gpt_dtbo_b};
> +partitions+=name=vbmeta_a,size=64K,uuid=${uuid_gpt_vbmeta_a};
> +partitions+=name=vbmeta_b,size=64K,uuid=${uuid_gpt_vbmeta_b};
> +partitions+=name=vbmeta_vendor_dlkm_a,size=64K,uuid=${uuid_gpt_vbmeta_vendor_dlkm_a};
> +partitions+=name=vbmeta_vendor_dlkm_b,size=64K,uuid=${uuid_gpt_vbmeta_vendor_dlkm_b};
> +partitions+=name=super,size=4608M,uuid=${uuid_gpt_super};
> +partitions+=name=metadata,size=64M,uuid=${uuid_gpt_metadata};
> +partitions+=name=persist,size=32M,uuid=${uuid_gpt_persist};
> +partitions+=name=userdata,size=-,uuid=${uuid_gpt_userdata}
> +
> +fastboot_raw_partition_bootenv=0x800 0x400 mmcpart 1
> +fastboot.partition-type:metadata=f2fs
> +
> +boot_targets=mmc0
> +mmcdev=0
> +bootmeths=android
> +vendor_boot_comp_addr_r=0xd0000000
> +bootcmd=bootflow scan -lb
>
> -- 
> 2.34.1

  reply	other threads:[~2024-09-03  7:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-02 16:31 [PATCH 0/3] Add Android 14 bootflow support for AM62X and AM62P board Guillaume La Roque
2024-09-02 16:31 ` [PATCH 1/3] board: ti: am62x_evm: Add android bootflow Guillaume La Roque
2024-09-03  7:25   ` Mattijs Korpershoek [this message]
2024-09-02 16:31 ` [PATCH 2/3] board: beagle: beagleplay: Add android bootflow support Guillaume La Roque
2024-09-03  7:27   ` Mattijs Korpershoek
2024-09-02 16:31 ` [PATCH 3/3] board: ti: am62px: " Guillaume La Roque
2024-09-03  7:40   ` Mattijs Korpershoek

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=875xrd8ahu.fsf@baylibre.com \
    --to=mkorpershoek@baylibre.com \
    --cc=bb@ti.com \
    --cc=glaroque@baylibre.com \
    --cc=joe.hershberger@ni.com \
    --cc=nm@ti.com \
    --cc=robertcnelson@gmail.com \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=vigneshr@ti.com \
    --cc=vishalm@ti.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.