[U-Boot] How to create a library with already built library
Albert ARIBAUD
albert.u.boot at aribaud.net
Wed Jul 17 09:19:38 CEST 2013
Hi Julyberry,
On Tue, 16 Jul 2013 15:24:16 -0700 (PDT), Julyberry <senkoh at gmail.com>
wrote:
> Hello,
>
> I am new to U-Boot and try to add some codes for implementing some logic as
> a feature. This entry routine of this new code will be called from main_loop
> in common.
>
> To achieve this, there are some new codes that I am adding to
> u-boot/lib/libua(new folder) and I also need to link an already built
> library with my new code.
>
> I looked at the existing Makefiles and config.mk in U-Boot source root.
> It looks like the the following code is used in Makefile.
>
> $(LIB): $(obj).depend $(OBJS)
> $(call cmd_link_o_target, $(OBJS))
>
> However, it seems that the *cmd_link_o_target* routine only takes 1 argument
> as defined in config.mk.
> How can I link the already built library with the new library I am creating?
>
> Any help will be appreciated.
You don't want to link an already built library with a new library. You
want to build a target with both libraries in it. Dependencies
between the libs will be handled by the linker.
So look for the Makefile which contains the line(s) that link the
existing library, and duplicate the same lines (possibly conditional) to
link in your new library also.
Amicalement,
--
Albert.
More information about the U-Boot
mailing list