[PATCH] bcm4908: automatically set DEVICE_DTS from device name

Rafał Miłecki rafal at milecki.pl
Tue Jan 19 14:12:37 EST 2021


On 19.01.2021 19:53, Adrian Schmutzler wrote:
> This sets the DTS paths automatically based on their device definition
> name. Devices where this is not possible may still be served by simply
> overwriting DEVICE_DTS in their respective definition.
> 
> Cc: Rafał Miłecki <rafal at milecki.pl>
> 
> Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
> 
> ---
> 
> Of course, any paths which are not static may be moved from DTS_DIR
> to the DEVICE_DTS line.
> 
> (Note that this will break anything that would depend on DTS_DIR
> _without_ DEVICE_DTS following it. (Didn't spot anything yet.))

It should be possible to make final defines even simpler by using some
wildcard magic. You could avoid defining SOC then.

Please take a look at the:
target/linux/bcm53xx/image/Makefile

It has some magic² code as follows:
DEVICE_DTS := $(patsubst %.dtb,%,$(notdir $(wildcard $(if $(IB),$(KDIR),$(DTS_DIR))/*-$(subst _,-,$(1)).dtb)))

If you could adopt above magic to the bcm4908 it would be great. If not
your suggested solution is probably still better than what we have now.



More information about the openwrt-devel mailing list