[U-Boot] [PATCH v4 10/11] Add u-boot-pad.bin target to the Makefile

Langer Thomas
2012-09-21T16:37:58Z

Hello Tom,

Tom Rini wrote on?2012-09-21:

>> SoC specific make rules can probably be added to the respective SoC
>> specific makefiles, thus still avoiding to clutter the top level
>> Makefile with lots of conditionals.
>
> Ideally? Yes, Possible today? Not sure. I have a hazy recollection
> that it wasn't so easy when I tried adding some build rules to one of
> the config.mk files. When I post SPI SPL for am335x support I'll try
> again since for that I need to add a rule to generate a byte-swapped
> MLO file. If that can go somewhere other than spl/Makefile that would
> be nice (but needs to be visible to a number of TI SoCs is an issue).

I have done something like this in a SoC config.mk:
<---
# only active in topdir
ifeq ($(subst $(SRCTREE),,$(CURDIR)),)

ALL-y += $(obj)u-boot-SoC-file

$(obj)u-boot-SoC-file: ...
...
endif
--->

Without the check the rule(s) become active in all subdirs.

And of course this is a hack, as it is a Makefile fragment and not only a config anymore.

But maybe this gives you or someone else a hint for implementing a cleaner framework for
SoC specific image rules?

>
> - --
> Tom

Best regards,
Thomas