[LEDE-DEV] fixing of image file names

Mathias Kresin dev at kresin.me
Tue Dec 12 14:59:55 PST 2017


12.12.2017 23:01, Jonas Gorski:
 > On 12 December 2017 at 21:03, Jo-Philipp Wich <jo at mein.io> wrote:
 >> Hi Piotr,
 >>
 >> my rough idea was to somehow tie the manifest generation to the "define
 >> Device/*" macros present in the image building code because there you
 >> have all required information in a central place:
 >>
 >>   - unique board identifier
 >>   - image name / build steps
 >>   - default package selection
 >
 > I also think this is the easiest to achieve way for creating a way to
 > lookup board_name => image_name.

I guess we are mixing different topics here. My primary intention is to 
have unique boardnames across all targets and mainly prevent collisions 
within targets.

Using a dts compat string based manufacture and product name in the 
image filename is only meant for humans to easier find what they are 
looking for.

It might allow to do a prediction on the image filename based on the 
userspace boardname. But it is rather a side effect than something they 
I'm really targeting. Nice if it works, but fine if not. Which doesn't 
mean we should "break" it wilfully.

To do a reliable mapping, we indeed need a mapping file with userspace 
boardname and image filename(s). But creating such a global mapping file 
doesn't make much sense to me as long as the userspace boardnames are 
not unique.

 > We already define BOARD_NAME or SUPPORTED_DEVICES for many devices, we
 > just need to set these consistently for all targets. Then we can
 > easily create a manifest based on that.
 >
 > That way we also have no restrictions on how we name the images; what
 > is part of the images etc.
 >
 >
 > Regards
 > Jonas
 >
 > P.S: We should also deprecate one of these for the other, we don't
 > need two different variables for the same purpose.

NAK. They serve a different purpose and aren't necessarily set to the 
same value.

The value of the BOARD_NAME variable for example is preferred over the 
DEVICE_NAME for the subdirectory created within sysupgrade.tar archives.

If you change the DEVICE_NAME variable for boards with a sysupgrade.tar 
image file format, you need to add the BOARD_NAME variable with the 
former used name to not break sysupgrade from stable versions. I only 
changed the dependency on a correct named subdirectory recently.

Since by default the image filename is created based on the DEVICE_NAME 
contents, you need to touch this variable to have a more descriptive 
image filename.

SUPPORTED_DEVICES on the other hand is only used for the image metadata 
and should contain the current boardname as well as the boardname used 
in 17.01 if it was a different one.

So far it seems really trick to me to find the unique value that is 
required. SUPPORTED_DEVICES might contain a (global) duplicate boardname 
due backward compatibility. BOARD_NAME is definitely the wrong variable 
to look at.

Mathias



More information about the Lede-dev mailing list