[OpenWrt-Devel] [PATCH v2 00/25] ramips: massive code cleanups
pepe2k at gmail.com
Tue Aug 18 03:33:25 EDT 2015
2015-08-18 6:04 GMT+02:00 郭传鈜 <gch981213 at gmail.com>:
> I just wonder why you chose to use the board name in LED
Please, take a look at first version of my series and discussion about
"device:color:led-name" convention: .
I thought that OpenWrt uses different convention:
"manufacturer:color:led-name", but if you look deeper, we have both
approaches in code.
As an example, take a look at current version of diag.sh script in
ar71xx target .
There is exactly the same mix as it was in ramips target before my
cleans - some of boards follow upstream convention and rest don't.
> Sometimes we can use the same dts file for different boards.For
> example, in ar71xx wr841nd-v3 wr941nd-v2 and wr941nd-v3 shares
> mach-tl-wr941nd-v2.c(I haven't found such examples in ramips target.)I
> think the LED name will be a bit strange in this situation:-(
Yes, that's good point and I was thinking about the same problem.
IMHO, using same LED names for different boards is a mistake (assuming
that we switch to upstream convention).
Take TL-MR3420 v2 as an example () - for me it's not a TL-WR841N v8
"clone". They are similar from hardware POV (same platform, almost the
same specification), but manufacturer gave them different model names,
not without a reason.
That means all boards should have own names for LEDs. Question is how
to do it without duplicating and increasing code size.
What's more, what should we do with boards like TL-WR841N/ND vx -
should they share same code and use something like
"tl-wr841nx-vx:color:led-name" convention or separate that too
("tl-wr841n-v8:...", "tl-wr841nd-v8...", "tl-wr841nd-v7:..:", etc.)?
And what to do with clones like Mercury or Fast?
Maybe we should have separate mach-* files for all supported boards,
but then... what about DRY (don’t repeat yourself)?
> 2015-08-17 19:24 GMT+08:00 Piotr Dymacz <pepe2k at gmail.com>:
>> 2015-08-17 8:28 GMT+02:00 John Crispin <blogic at openwrt.org>:
>>> just merged the whole lot. thanks a lot. what do you want to do next
>>> lantiq or ar71xx ? :) personally i would prefer ar71xx ;)
>> Hello John,
>> It seems that there are some people who don't like the changes (see
>> below), but they don't have enough courage to use their real name and
>> post their comments on the list.
>> I will back with answers for your and Michael Heimpold (I'm sorry, I
>> didn't spot your e-mail before!) questions in few days. Now I'm really
>> busy with other things.
>> Piotr Dymacz
>> 2015-08-17 13:05 GMT+02:00 West Fuck <deutchwrt at anonmail.de>:
>>> of all the bugs on related system you have choosen to change board and led
>>> names? why do you stick your nose into something that is not relevant? is it
>>> because your'e stupid fucking excuse for human being? you couldn't even make
>>> your uboot work without errors on some boards so why don't you stick to your
>>> own crap instead of acting like your're doing something
>> openwrt-devel mailing list
>> openwrt-devel at lists.openwrt.org
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
More information about the openwrt-devel