[U-Boot] [PATCH v2 2/2] MarSBoard: add new board
Eric Bénard
eric at eukrea.com
Thu Mar 27 08:40:05 CET 2014
Hi Stefan,
Le Thu, 27 Mar 2014 08:05:10 +0100,
Stefan Roese <sr at denx.de> a écrit :
> Yes, I agree. #ifdef's are ugly. But code duplication is also a problem
> as Wolfgang has mentioned.
>
> Isn't there a way to detect the board type at runtime somehow (via CPU
> type or GPIO input, ...)? And then dynamically configure the board
> either for "RiOT" or "MarS"? This would make the code a bit more complex
> of course. But there would be no #ifdef's and no code duplication. And
> you would only have to maintain one U-Boot binary / version for both boards.
>
> So, what do you think? Is this possible?
>
Thanks for the idea, that's possible by detecting i.MX6Solo
vs i.MX6Dual.
I'll try to implement that.
Eric
More information about the U-Boot
mailing list