[U-Boot] [PATCH v1] rockchip: utilize CONFIG_DEFAULT_FDT_FILE

Vagrant Cascadian vagrant at debian.org
Sun May 27 19:16:03 UTC 2018


On 2018-05-25, Klaus Goger wrote:
> Currently the fdtfile environment variable is set to
> CONFIG_DEFAULT_DEVICE_TREE which is Ñ–nternally used as U-Boot devicetree
> source. The OS can use a different filename and Kconfig gives us the
> ability to select a default devicetree via CONFIG_DEFAULT_FDT_FILE.
> This also gives user configuring U-Boot via menuconfig the behaviour
> someone would expect.

I did wonder, given that many of these boards the value for
CONFIG_DEFAULT_DEVICE_TREE and CONFIG_DEFAULT_FDT_FILE is *nearly*
identical, if it wouldn't make sense to derive CONFIG_DEFAULT_FDT_FILE
From the value of CONFIG_DEFAULT_DEVICE_TREE by default, only overriding
it in the unusual cases.

Though there is a lot to be said about being explicit and not mixing the
two similar but not identical values.

Tested on puma-rk3399.

Tested-By: Vagrant Cascadian <vagrant at debian.org>

Was hoping to also test on firefly-rk3399, but having difficulty getting
u-boot installed unreleated to this patch. Also having troubles with
firefly-rk3288 due to mmc hanging the board: https://bugs.debian.org/898520.


live well,
  vagrant

>  configs/puma-rk3399_defconfig       | 1 +
>  include/configs/rk3399_common.h     | 2 +-

> diff --git a/configs/puma-rk3399_defconfig b/configs/puma-rk3399_defconfig
> index e6539a7da8..e5753b4f20 100644
> --- a/configs/puma-rk3399_defconfig
> +++ b/configs/puma-rk3399_defconfig
> @@ -16,6 +16,7 @@ CONFIG_DEBUG_UART=y
>  CONFIG_FIT=y
>  CONFIG_SPL_LOAD_FIT=y
>  CONFIG_SPL_FIT_SOURCE="board/theobroma-systems/puma_rk3399/fit_spl_atf.its"
> +CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-puma-haikou.dtb"
>  # CONFIG_DISPLAY_CPUINFO is not set
>  CONFIG_DISPLAY_BOARDINFO_LATE=y
>  CONFIG_SPL_BOARD_INIT=y

> diff --git a/include/configs/rk3399_common.h b/include/configs/rk3399_common.h
> index a61e74bc03..ee38107ea5 100644
> --- a/include/configs/rk3399_common.h
> +++ b/include/configs/rk3399_common.h
> @@ -55,7 +55,7 @@
>  #include <config_distro_bootcmd.h>
>  #define CONFIG_EXTRA_ENV_SETTINGS \
>  	ENV_MEM_LAYOUT_SETTINGS \
> -	"fdtfile=rockchip/" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \
> +	"fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \
>  	"partitions=" PARTS_DEFAULT \
>  	BOOTENV
>  
> -- 
> 2.11.0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180527/ae4d2422/attachment.sig>


More information about the U-Boot mailing list