[U-Boot] [PATCH 01/10] Move board_init_f_mem() into a common location
Simon Glass
sjg at chromium.org
Sat Apr 18 00:55:00 CEST 2015
Hi Masahiro,
On 17 April 2015 at 10:37, Masahiro Yamada
<yamada.masahiro at socionext.com> wrote:
> Hi Simon,
>
>
> 2015-04-16 10:14 GMT+09:00 Simon Glass <sjg at chromium.org>:
>> This function will be used by both SPL and U-Boot proper. So move it into
>> a common place.
>>
>> Signed-off-by: Simon Glass <sjg at chromium.org>
>> ---
>>
>> Makefile | 1 +
>> common/board_f.c | 22 +---------------------
>> common/init/Makefile | 7 +++++++
>> common/init/global_data.c | 33 +++++++++++++++++++++++++++++++++
>> scripts/Makefile.spl | 1 +
>> 5 files changed, 43 insertions(+), 21 deletions(-)
>> create mode 100644 common/init/Makefile
>> create mode 100644 common/init/global_data.c
>>
>> diff --git a/Makefile b/Makefile
>> index 343f416..7f6af72 100644
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -659,6 +659,7 @@ libs-y += drivers/usb/musb-new/
>> libs-y += drivers/usb/phy/
>> libs-y += drivers/usb/ulpi/
>> libs-y += common/
>> +libs-y += common/init/
>> libs-$(CONFIG_API) += api/
>> libs-$(CONFIG_HAS_POST) += post/
>> libs-y += test/
>
> [snip]
>
>> diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl
>> index fcacb7f..60042ea 100644
>> --- a/scripts/Makefile.spl
>> +++ b/scripts/Makefile.spl
>> @@ -51,6 +51,7 @@ HAVE_VENDOR_COMMON_LIB = $(if $(wildcard $(srctree)/board/$(VENDOR)/common/Makef
>> libs-y += $(if $(BOARDDIR),board/$(BOARDDIR)/)
>> libs-$(HAVE_VENDOR_COMMON_LIB) += board/$(VENDOR)/common/
>>
>> +libs-y += common/init/
>> libs-$(CONFIG_SPL_FRAMEWORK) += common/spl/
>> libs-$(CONFIG_SPL_LIBCOMMON_SUPPORT) += common/
>> libs-$(CONFIG_SPL_LIBDISK_SUPPORT) += disk/
>
>
> Please do not increase the top-level entry any more.
>
> How about adding "obj-y += init/" into common/Makefile ?
The problem I had was that common/ is not included for SPL unless you
enable CONFIG_SPL_LIBCOMMON_SUPPORT. Is there another way?
Regards,
Simon
More information about the U-Boot
mailing list