[U-Boot] [PATCH 0/2] Makefile mkconfig: Ease board name maintenance on shared boards

This patch series adds CONFIG_SYS_BOARD_NAME with the boards.cfg board name. This differs from the source level board name when multiple boards share the same source using parameters set in boards.cfg.
This is used by the upcoming Allwinner sunxi (A10 & A13) SoC support
Henrik Nordstrom (2): mkconfig: Make CONFIG_SYS_BOARD_NAME default to the configured target name Makefile: Accept target names in all lower case to ease matching
Makefile | 1 + include/config_fallbacks.h | 4 ++++ mkconfig | 1 + 3 files changed, 6 insertions(+), 0 deletions(-)

On Sun, Nov 25, 2012 at 12:21:24PM +0100, Henrik Nordstr?m wrote:
This patch series adds CONFIG_SYS_BOARD_NAME with the boards.cfg board name. This differs from the source level board name when multiple boards share the same source using parameters set in boards.cfg.
This is used by the upcoming Allwinner sunxi (A10 & A13) SoC support
In the future, please thread the 0/N to the patch series, thanks.
So the root problem is that you are able to share a good amount of code between many (but lets just go with a10a and a10b for now) boards and share a common config file. When building for a10a in boards.cfg you do: a10a ... allwinner_common:PERIPHERALX=A10A,PERIPHERALY=A10A a10b ... allwinner_common:PERIPHERALX=A10B,PERIPHERALY=A10B
to handle the differences between a10a and a10b. So, what are you wanting to save the fact that we built for a10a or a10b for? Is this later passed along in the environment for run-time detection? Is there no other way to do run-time detection?

mån 2012-11-26 klockan 14:13 -0700 skrev Tom Rini:
In the future, please thread the 0/N to the patch series, thanks.
I know. Didn't notice that my git was wrongly configured in this small patch series before it was sent, and don't know what whent wrong with the threading of the cover letter in the third big sunxi patch series. Will make sure they are threaded properly next time.
So the root problem is that you are able to share a good amount of code between many (but lets just go with a10a and a10b for now) boards and share a common config file.
Yes.
When building for a10a in boards.cfg you do: a10a ... allwinner_common:PERIPHERALX=A10A,PERIPHERALY=A10A a10b ... allwinner_common:PERIPHERALX=A10B,PERIPHERALY=A10B
Yes.
to handle the differences between a10a and a10b. So, what are you wanting to save the fact that we built for a10a or a10b for? Is this later passed along in the environment for run-time detection? Is there no other way to do run-time detection?
Currently it's only for diagnostics purposes, with the board name reported by SPL at boot time to notice if someone tries to use the wrong SPL for their board. Several users have already benefitted from this when trying to figure out why their built OS image do not boot proper. It's a bit subtle as many times the wrong SPL (incorrect DRAM settings) will load u-boot just fine only hang while booting the kernel.
But it's mostly cosmetic. Not very important.
Regards Henirk
participants (2)
-
Henrik Nordström
-
Tom Rini