On 17 May 2017 at 21:39, Roman Yeryomin <leroi.li...@gmail.com> wrote: > On 17 May 2017 at 16:19, Mathias Kresin <d...@kresin.me> wrote: >> Hey Roman., >> >> independent of the work done by you, I worked on exactly the same >> topic. But I've pushed it a bit further by switching all targets to >> the generic boardname function and a few targets to the generic board >> detection in basefiles/preinit. >> >> Furthermore I've converted some targets to get the boardname from the >> device tree compatible string as suggested by John. Till now I wasn't >> comfortable to push it somewhere, but with my latest changes it should >> work in theory. You can find the changes at >> https://git.lede-project.org/?p=lede/mkresin/staging.git;a=shortlog;h=refs/heads/boarddetection. >> What is missing: testing!
Some of your changes would be ok to me if: - board.sh would be used instead of functions.sh (which I would like to split into several files anyway) for $(board_name) - related changes would be squashed into one commit, otherwise it's hard to perceive/track the changes, IMO more commits is not always better also this one is a fail: https://git.lede-project.org/?p=lede/mkresin/staging.git;a=commitdiff;h=af3ef20591e6e9e4ee2cf1b1fc58012df68445ba and changes like this is overkill: +. /lib/functions.sh . /lib/functions/leds.sh -. /lib/ar71xx.sh >> >> 2017-05-17 13:49 GMT+02:00 Roman Yeryomin <leroi.li...@gmail.com>: >>> Hi John, >>> >>> the reasoning is that most scripts which need board_name, don't need >>> anything else, and those which do need more, they need only a fraction >>> of functions.sh >> >> Due to the fact that I had to touch all scripts using the board name, >> I feel confident enough to reply here. I don't see any benefit in >> moving the board_name function into an extra script. Most of the >> scripts include (and require) functions.sh anyway. > > I already explained that. > functions.sh inclusion in many cases is a mistake > and in other 90% of cases only one or two functions are needed > other 10% need 3-5 functions > so all that is very far from optimal both from maintenance/development > and resource usage perspective > >> I would be happy I've you can review and runtime test the boardname >> branch from my staging tree. >> >> Mathias _______________________________________________ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev