[OpenWrt-Devel] [PATCH 6/8] mvebu: add vendor to device names

Tomasz Maciej Nowak tomek_n at o2.pl
Sat May 4 10:01:11 EDT 2019


Hi Hauke, Petr,

W dniu 04.05.2019 o 00:38, Petr Štetiar pisze:
> Hauke Mehrtens <hauke at hauke-m.de> [2019-05-04 00:00:25]:
> 
> Hi,
> 
>> On 5/1/19 7:42 PM, Tomasz Maciej Nowak wrote:
>>> Replace SoC names with vendors in device names, in few cases, and add
>>> vendor to developemnt boards for easier identyfying potential firmware to
>>> flash.
>>
>> Will sysupgrade still work after this rename? Isn't there some script
>> which checks if the image is compatible with the currently installed image?
> 
> SUPPORTED_DEVICES variable is used for this, so it's probably going to work,
> but if we're willing to rename it, it might be a good idea to follow the DT
> compatible naming scheme as used in other targets.
> 
> So instead of this in patch 4/8:
> 
>  -  SUPPORTED_DEVICES = $$(DEVICE_DTS)
>  +  SUPPORTED_DEVICES = $$(firstword $$(DEVICE_DTS))
> 
> Tomasz should be doing following:
> 
>  -  SUPPORTED_DEVICES = $$(DEVICE_DTS)
>  +  SUPPORTED_DEVICES = $(subst _,$(comma),$(1))

Ideally that would be the case, unfortunately there is inconsistency in the upstream
dtses, for example (stand after my patch renaming device names):

linksys-wrt1200ac has compatible linksys,caiman,

marvell-armada-385-db-ap -> marvell,a385-db-ap

marvell-armada-3720-db -> marvell,armada-3720-db

marvell-macchiatobin -> marvell,armada8040-mcbin

marvell-armada-8040-db -> marvell,armada8040-db

As You can see this differs a lot. So what would be best approach, following
upstream naming or keep it as is or following upstream where possible?

> 
> as currently being used in apm821xx, ath79, ipq40xx, ipq806x, kirkwood, lantiq,
> omap, oxnas and ramips.
> 
> So this
> 
>>> -define Device/armada-3720-db
>>> +define Device/marvell-armada-3720-db
> 
> would become
> 
>>> -define Device/armada-3720-db
>>> +define Device/marvell_armada-3720-db
> 
> and this
> 
>>> -TARGET_DEVICES += armada-3720-db
>>> +TARGET_DEVICES += marvell-armada-3720-db
> 
> would become 
> 
>>> -TARGET_DEVICES += armada-3720-db
>>> +TARGET_DEVICES += marvell_armada-3720-db
>>> -SUPPORTED_DEVICES := marvell,armada-3720-db
> 
> as the SUPPORTED_DEVICES variable would be automagically set to the same value
> by the code above, following the DRY principle.
> 
> If the SUPPORTED_DEVICES variable is going to change as for example here:
> 
>>> -define Device/openblocks-ax3-4
>>> +define Device/plathome_openblocks-ax3-4
>>>    DEVICE_DTS := armada-xp-openblocks-ax3-4
>>> -  SUPPORTED_DEVICES := $(1)
>>> +  SUPPORTED_DEVICES := openblocks-ax3-4
>>>    BLOCKSIZE := 128k
>>>    PAGESIZE := 1
>>>    IMAGES += factory.img
>>>    IMAGE/factory.img := append-kernel | pad-to $$(BLOCKSIZE) | append-ubi
>>>    DEVICE_TITLE := Plat'Home OpenBlocks AX3
>>>  endef
>>> -TARGET_DEVICES += openblocks-ax3-4
>>> +TARGET_DEVICES += plathome_openblocks-ax3-4
> 
> The old `openblocks-ax3-4` name has to be added by following construct:
> 
>  SUPPORTED_DEVICES += openblocks-ax3-4
> 
> in order to support the old and new naming schemes, so the SUPPORTED_DEVICES
> would actually contain `plathome,openblocks-ax3-4 openblocks-ax3-4` and allow
> seamless sysupgrade experience.
> 
> -- ynezz
> 

Regards

-- 
TMN

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list