public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/1] at91: use pre-built object to avoid weak function problem
Date: Sun, 01 Feb 2009 20:25:41 +0100	[thread overview]
Message-ID: <20090201192542.1639F8322908@gemini.denx.de> (raw)
In-Reply-To: <1233510496-26329-1-git-send-email-plagnioj@jcrosoft.com>

Dear Jean-Christophe PLAGNIOL-VILLARD,

In message <1233510496-26329-1-git-send-email-plagnioj@jcrosoft.com> you wrote:
> add weak lowlel_init

What does "lowlel" mean?

You definitely want to add a more descriptive comment here waht you
are doing, why you are doing it, and why you are doing it this way.


> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> ---
>  config.mk                          |    3 +++
>  cpu/arm926ejs/at91/Makefile        |    2 +-
>  cpu/arm926ejs/at91/lowlevel_init.S |    2 ++
>  3 files changed, 6 insertions(+), 1 deletions(-)
> 
> diff --git a/config.mk b/config.mk
> index b1254e9..94b8c7c 100644
> --- a/config.mk
> +++ b/config.mk
> @@ -76,6 +76,9 @@ STRIP	= $(CROSS_COMPILE)strip
>  OBJCOPY = $(CROSS_COMPILE)objcopy
>  OBJDUMP = $(CROSS_COMPILE)objdump
>  RANLIB	= $(CROSS_COMPILE)RANLIB
> +cmd_link_o_target = $(if $(strip $(2)),\
> +			$(LD) $(PLATFORM_LDFLAGS) -r -o $(1) $(2) ,\
> +			rm -f $@; $(AR) rcs $(1))

Please make sure to use $(STRIP) instead of 'strip', and $ARFLAGS)
instead of 'rcs'

>  #########################################################################
>  
> diff --git a/cpu/arm926ejs/at91/Makefile b/cpu/arm926ejs/at91/Makefile
> index 2d2a888..662657c 100644
> --- a/cpu/arm926ejs/at91/Makefile
> +++ b/cpu/arm926ejs/at91/Makefile
> @@ -36,7 +36,7 @@ OBJS    := $(addprefix $(obj),$(SOBJS) $(COBJS-y))
>  all:	$(obj).depend $(LIB)
>  
>  $(LIB):	$(OBJS)
> -	$(AR) $(ARFLAGS) $@ $(OBJS)
> +	$(call cmd_link_o_target, $@, $(OBJS))
>  
>  #########################################################################
>  
> diff --git a/cpu/arm926ejs/at91/lowlevel_init.S b/cpu/arm926ejs/at91/lowlevel_init.S
> index ec6ad5d..54b3f3d 100644
> --- a/cpu/arm926ejs/at91/lowlevel_init.S
> +++ b/cpu/arm926ejs/at91/lowlevel_init.S
> @@ -30,6 +30,8 @@
>  #ifndef CONFIG_SKIP_LOWLEVEL_INIT
>  
>  .globl lowlevel_init
> +.weak lowlevel_init
> +.set lowlevel_init,function
>  lowlevel_init:

If this change is needed for AT91 only, then cmd_link_o_target should
not be added to the global config.mk - why not add it to
cpu/arm926ejs/at91/config.mk ?


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Diplomacy is the art of saying "nice doggy" until you can find a rock.

  reply	other threads:[~2009-02-01 19:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-01 17:48 [U-Boot] [PATCH 1/1] at91: use pre-built object to avoid weak function problem Jean-Christophe PLAGNIOL-VILLARD
2009-02-01 19:25 ` Wolfgang Denk [this message]
2009-02-01 19:33   ` Mike Frysinger
2009-02-01 20:06     ` Wolfgang Denk
2009-02-01 20:09       ` Mike Frysinger
2009-02-01 20:23         ` Wolfgang Denk
2009-02-04 21:17 ` [U-Boot] [PATCH V2] at91: allow the lowlevel_init to be overwrite by the board Jean-Christophe PLAGNIOL-VILLARD
2009-02-04 21:25   ` Wolfgang Denk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090201192542.1639F8322908@gemini.denx.de \
    --to=wd@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox