
in the midst of current project wherein i've ported u-boot to two fairly old (and extremely similar) powerpc systems, i duplicated a lot of content just to get things up and running; now i want to go back and condense as much as possible and remove every bit of duplication i can, so a few questions about config files and so on.
first (just out of curiosity), is there any relationship between the *name* of a defconfig file and the target system it represents? i'm well aware that all the defconfig files are normally given names that represent the target system, but is that *necessary*? as in, is any part of the defconfig file name extracted and used during the build process? or could i, in an absurd example, call my two defconfig files, say, "derp_defconfig" and "gorp_defconfig", as long as all the content is correct?
next, are there any circumstances where one could reasonably use a single defconfig file to represent more than one target board? or is every distinct target board expected to have its own defconfig file? one example i see is the pair of defconfig files:
* xilinx_zynqmp_zcu102_defconfig * xilinx_zynqmp_zcu102_revB_defconfig
whose *only* difference is:
7c7 < CONFIG_DEFAULT_DEVICE_TREE="zynqmp-zcu102" ---
CONFIG_DEFAULT_DEVICE_TREE="zynqmp-zcu102-revB"
in a corner case like this, i guess one *could* have a single defconfig file, and pass "DEVICE_TREE=..." on the command line to distinguish between them, but that's an unusual case. are there *any* circumstances that would justify trying to pack more than one target board into a single defconfig file? or is that (as i suspect) just silly?
now as for defconfig files, what is the absolute minimum info they need contain? AFAICT, one needs at least three lines equivalent to:
CONFIG_ARM=y (arch) CONFIG_ARCH_MX6=y (processor) CONFIG_TARGET_XPRESS=y (board)
i realize some defconfig files contain a lot more, but it appears that any further content can go into the board definition file in include/configs, yes? i see defconfig files that define prompts, and commands, and so on, but can *all* of that go equally well into the board defn file?
next, if one pushes all the board info into the header file and two boards have much the same content, i can see several cases where a "common" header file is created, such as, say, "zynq-common.h", so that again cuts down on duplication.
finally, if i define a board vendor directory, say, board/rday/, i can define a further "common" directory, board/rday/common/, for any board common code.
is that about it? am i missing any other tricks? thanks muchly.
rday