[PATCH v1 4/4] configs: rcar3: Add shell function to select the linux devicetree

Marek Vasut marek.vasut at mailbox.org
Sat Jun 17 02:45:31 CEST 2023


On 6/16/23 17:21, Detlev Casanova wrote:
> This function uses the sysinfo command to determine which linux device
> tree is selected for the running board.
> 
> Signed-off-by: Detlev Casanova <detlev.casanova at collabora.com>
> ---
>   configs/rcar3_ulcb_defconfig       | 1 +
>   include/configs/rcar-gen3-common.h | 9 ++++++++-
>   2 files changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/configs/rcar3_ulcb_defconfig b/configs/rcar3_ulcb_defconfig
> index b8fdb5e3826..bb5f8f742ea 100644
> --- a/configs/rcar3_ulcb_defconfig
> +++ b/configs/rcar3_ulcb_defconfig
> @@ -47,6 +47,7 @@ CONFIG_CMD_EXT4=y
>   CONFIG_CMD_EXT4_WRITE=y
>   CONFIG_CMD_FAT=y
>   CONFIG_CMD_FS_GENERIC=y
> +CONFIG_CMD_SYSINFO=y
>   CONFIG_OF_CONTROL=y
>   CONFIG_OF_LIST="r8a77950-ulcb-u-boot r8a77960-ulcb-u-boot r8a77965-ulcb-u-boot"
>   CONFIG_MULTI_DTB_FIT_LZO=y
> diff --git a/include/configs/rcar-gen3-common.h b/include/configs/rcar-gen3-common.h
> index 213caa75238..b278eb85a81 100644
> --- a/include/configs/rcar-gen3-common.h
> +++ b/include/configs/rcar-gen3-common.h
> @@ -33,6 +33,13 @@
>   /* ENV setting */
>   
>   #define CFG_EXTRA_ENV_SETTINGS	\
> -	"bootm_size=0x10000000\0"
> +	"bootm_size=0x10000000\0"					\
> +	"set_board_fdt=sysinfo revision board_rev; "			\
> +	"sysinfo id board_id; "						\
> +	"if test ${board_rev} = 2.1 && test ${board_id} = 0x0b; then "	\
> +		"setenv fdtfile renesas/r8a779m1-ulcb.dtb; "		\
> +	"elif test ${board_rev} = 2.0 && test ${board_id} = 0x0b; then "\
> +		"setenv fdtfile renesas/r8a77951-ulcb.dtb; "		\
> +	"fi\0"								\

You must also consider M3W and M3N ULCB, i.e. 77960/77965 ones.

You must also consider all the other boards which use this header file, 
salvator-xs comes to mind. That one also comes with M3W/M3N SoC. Also, 
all the other Gen3 boards use this header, E3 Ebise, V3* Condor/Eagle ...


More information about the U-Boot mailing list