> On 27.05.2018, at 21:16, Vagrant Cascadian <vagr...@debian.org> wrote: > > 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.
Would love to to that, but couldn’t find a proper way to do it. CONFIG_DEFAULT_FDT_FILE is a Kconfig string and therefore always present in the .config. If not set by the user or a defconfig it’s just a empty string (“”). So we can’t do a #ifdef and we can’t do string compares with C macros. An option would be to have DEFAULT_FDT_FILE be hidden behind a Kconfig bool (i.e CONFIG_DEFAULT_FDT_FILE depends on CONFIG_FDT_FILE) But that change looked a bit to invasive for me. > Tested on puma-rk3399. > > Tested-By: Vagrant Cascadian <vagr...@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
signature.asc
Description: Message signed with OpenPGP
_______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot