[LEDE-DEV] fixing of image file names
Luis Araneda
luaraneda at gmail.com
Wed Nov 29 19:20:30 PST 2017
Hi,
> I would like to propose something different which basically aims the same.
>
> 1. fix the compatible strings in the DTS files
> 2. use the compatible string from the DTS in userspace (boardname)
> 3. use the compatible string for the image filename (board_name in above
> example)
>
> The DTS compatible string is supposed to be unique across the whole kernel
> and this way we can prevent duplicates in big targets like ramips.
>
> The compatible string includes the vendor, which will make it way easier to
> find a particular image in directories with a lot of images. In theory, it
> should be even possible to provide all images in a single directory without
> target/subtarget prefix.
>
> Since the underscore isn't a valid character in compatible strings, we can
> use it in the image filename as replacement for the comma to split vendor
> from boardname.
>
> Due to the sync of runtime boardname and the boardname used in the image
> filename, it should be possible to guess the used image filename more
> reliably as requested.
>
> I'm working on to do so since a while, with the following status:
>
> 1. is already done for the ramips target, more fixes are in the
> boarddetection branch of my staging tree
>
> 2. done for some targets in the boarddetection branch of my staging tree;
> done for a handful of ramips boards in the ramips branch of my staging tree
>
> 3. done for a handful of ramips boards in the ramips branch of my staging
> tree
>
> Using the TP-Link TL-WR840N v5 as an example, the userspace boardname would
> be "tplink,tl-wr840n-v5" and the image filename would change from
>
> lede-ramips-mt76x8-tl-wr840n-v4-squashfs-sysupgrade.bin
>
> to
>
> lede-ramips-mt76x8-tplink_tl-wr840n-v4-squashfs-sysupgrade.bin
>
> Target and subtarget can be found in /etc/os_release of the running system.
>
> I started working on the compat string in userspace thingy to get rid of
> another layer of glue code (target/linux/ramips/base-files/lib/ramips.sh),
> to unify the creation of the userspace boardname across all targets.
>
> Initially it was meant to make the review of board support patches easier
> for me. But I noticed that it has more benefits than that as we can see with
> this mail thread.
>
> But fixing the compat strings and migrating the userspace boardname to a DTS
> compat string based one is a hugh task and time consuming.
>
> The first commits in my staging tree regarding the topic are from April this
> year and I'm still not finished. As all of us, I'm time constrained as well.
>
> Any feedback on this approach (and help in migrating exists boards of
> course) is highly welcome.
That seems like the correct way to go, but is a lot of work as you mentioned.
I can start with the ipq806x and sunxi targets, since they are the
ones I am most familiar with.
@Mathias: Should I send you the patches to be applied to your staging
tree, or to the mailing list?
Cheers,
Luis Araneda.
More information about the Lede-dev
mailing list