[LEDE-DEV] ramips: image validator and board variants

Mathias Kresin dev at kresin.me
Mon Dec 5 01:17:20 PST 2016


Hey John, Hey Felix

I'm near to finished with porting the remaining ramips devices to the 
new image build code. While doing this, I might have spotted a ramips 
specific issue with the new image validation feature in regard of build 
variants of boards.

At the moment the build code of for example 4 MByte and 8 MByte flash 
variants of a single board uses the same SUPPORTED_DEVICES string, to 
match the name exported in /lib/ramips.sh. Albeit the situation is 
already way better than without any validation, it would allow to flash 
a 8 MByte image on a the board version with only 4 MByte flash.

I can only guess this solution/workaround/hack was chosen to avoid 
touching files which setup led related stuff. No idea why this 
limitation wasn't mentioned in the commit message.

To de-duplicate stuff on ramips, the LEDs are referenced as 
$board:color:name, where $board is the name exported by /lib/ramips.sh. 
In all cases, build variants of a board are sharing the device tree led 
node, which has the leds named like "asl26555:red:power" for the 
asl26555-8M and asl26555-16M.

My question is now, how to handle such cases?

a) use a shared SUPPORTED_DEVICES string and life with the 80% solution

b) add an exception for these boards and use the asl26555:color:name 
pattern instead of $board:color:name at the relevant places

c) there is another solution that I've missed

Mathias



More information about the Lede-dev mailing list