
Dear Aneesh V,
In message 4DDE5AFE.9000404@ti.com you wrote:
I do not have any issue in having media specific files in their respective directories. However, I would like to see the 'Makefile's coming from the same directory tree irrespective of the media. So, how about something like this:
spl/ mmc/ nand/ one-nand/ board/<vendor>/<board>/Makefile
Actually that would be
board/[<vendor>/]<board>/
The idea is to have the board level Makefile in 'spl/board/<vendor> /<board>/' no matter what the SPL type is. This will help in better consolidation of SPLs.
OK.
I see 3 SPL use-cases in general:
- A single SPL that supports multiple media(suitable for SoCs with
large internal RAM) 2. A single SPL supporting a single media(the board supports only one media)
1. and 2. are actually the same (2. being the special case of N=1)
- Multiple SPLs for the same board each supporting a different
memory device(maybe preferred over 1 to keep the foot-print of each small).
Supporting (1) and (2) is straight forward with the above directory structure.
To support (3) the board level Makefile should conditionally include the respective image file in the target 'all' based on CONFIG options. For instance 'all' may include 'onenand-ipl-2k.bin' if CONFIG_ONENAND_U_BOOT is defined and so on.
I don't get this. Why don't we just pass the required make target from the top level Makefile? If we want to build "onenand-ipl-2k.bin" then this would result in running "make onenand-ipl-2k.bin" in the respective directory - this is then also independent of whether this image contains support for one specific boot device or for any set of different devices.
Best regards,
Wolfgang Denk