Hey Daniel,

sorry for the late reply, I totally missed your mail and only spotted it due to the recent replies.

01.12.2017 22:20, Daniel Golle:
On Wed, Nov 29, 2017 at 09:33:39AM +0100, Mathias Kresin wrote:
28.11.2017 19:24, Daniel Golle:
Hi Moritz,

thanks for stepping forward and adressing this issue.
It'd be good to include the two assertions added to your list beelow.

On Tue, Nov 28, 2017 at 07:05:23PM +0100, Moritz Warning wrote:
Hi,

I noticed that there are some image file names that do not follow the "common" 
name scheme.
Is it ok to change it? I would like to submit a patch.

Some examples:
- all lower case image names
    - lede-ipq806x-EA8500-squashfs-sysupgrade.tar => 
lede-ipq806x-ea8500-squashfs-sysupgrade.tar
- revision between -
    - lede-mvebu-linksys-wrt1900acv2-squashfs-sysupgrade.bin => 
lede-mvebu-linksys-wrt1900ac-v2-squashfs-sysupgrade.bin
- region specific images with region identifiers (us, eu, il, ...)
   - lede-ramips-rt305x-wnce2001-squashfs-factory-northamerica.bin => 
lede-ramips-rt305x-wnce2001-us-squashfs-factory.bin
- separate images for each version
    - lede-brcm47xx-mips74k-linksys-e1000-v1-v2-v2.1-squashfs.bin => 
lede-brcm47xx-mips74k-linksys-e1000-v1-squashfs.bin, ...

   - board_name (in target userspace) == profile (in imagebuilder) == DTS name

   - image_filename == 
${distro}-${target}-${subtarget}-${board_name}-${fstype}-${imgtype}

that would make identifying sysupgrade images much more straight
forward (and hence automatizable).

See also
https://github.com/aparcar/attendedsysupgrade-server/issues/80

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)

There was only board_name (with underscore), no boardname (without
underscore) in the example... (?)

boardname as well as board_name are referring in my above list to /tmp/sysinfo/board_name. Typo + missing path isn't a good combination. Sorry for the confusion.


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 used '-' to replace the ',' chars in
https://git.lede-project.org/?p=project/procd.git;a=commitdiff;h=453116e08e6a9349374bbff427b75f57ce5387c9

Oh, I wasn't aware of this code and I'm curious under which conditions the else if branch is required.

A generic preinit script which populates
/tmp/sysinfo/board_name with the values from the devicetree compat string - if the file wasn't created before - is around since April 2015 [0].

To my understanding, if a devicetree compat string exists, /tmp/sysinfo/board_name should exists as well.

The only difference is that the shell code doesn't alter the compat string as I neither intend to do.


However, it was based on a mere feeling... I wouldn't mind changing it
to '_' instead.

The comma should be only replaced for the image filename. The reason is as simple as make doesn't like "Device/manufacture,productname" due to the comma. We're using the Device define for the image filename by default.

Mathias

_______________________________________________
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev

Reply via email to