All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] cam_enc_4xx build failure
Date: Wed, 07 Mar 2012 08:10:11 +0100	[thread overview]
Message-ID: <4F5709D3.1070800@denx.de> (raw)
In-Reply-To: <201203050713.51779.marex@denx.de>

Hello Marek,

added Tom Rini to cc...

Marek Vasut wrote:
> Dear Heiko Schocher,
> 
> cam_enc_4xx does not build with ELDK4.2 . Can you please come up with a patch?
> 
> Thanks in advance!
> 
> Copyright (C) 2007 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> 
> Configuring for cam_enc_4xx board...
> cam_enc_4xx.c: In function 'menu_handle':
> cam_enc_4xx.c:609: warning: dereferencing type-punned pointer will break strict-
> aliasing rules
> arm-linux-ld: u-boot-spl: Not enough room for program headers, try linking with 
> -N
> arm-linux-ld: final link failed: Bad value

If I try a SPL_TEXT_BASE = 0x00000000 or SPL_TEXT_BASE = 0x00000080
it compiles fine with ELDK-4.2, but I need SPL_TEXT_BASE = 0x00000020
as the RBL copies code from nand to 0x00000020 ...

I can fix this with this patch:

diff --git a/board/ait/cam_enc_4xx/config.mk b/board/ait/cam_enc_4xx/config.mk
index b1f9b6c..744b927 100644
--- a/board/ait/cam_enc_4xx/config.mk
+++ b/board/ait/cam_enc_4xx/config.mk
@@ -12,4 +12,11 @@ PAD_TO       := 12320
 UBL_CONFIG = $(SRCTREE)/board/$(BOARDDIR)/ublimage.cfg
 ifndef CONFIG_SPL_BUILD
 ALL-y += $(obj)u-boot.ubl
+else
+# as SPL_TEXT_BASE is not page-aligned, we need for some
+# linkers the -n flag (Do not page align data), to prevent
+# the following error message:
+# arm-linux-ld: u-boot-spl: Not enough room for program headers, try linking
+# with -N
+LDFLAGS_u-boot-spl += -n
 endif

I must admit, that I do not really understand, whats the real problem
is.

Can somebody help here?

bye,
Heiko
-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

      parent reply	other threads:[~2012-03-07  7:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-05  6:13 [U-Boot] cam_enc_4xx build failure Marek Vasut
2012-03-05  8:39 ` Heiko Schocher
2012-03-05 14:30   ` Jason Hobbs
2012-03-05 15:36     ` Marek Vasut
2012-03-05 16:32   ` Wolfgang Denk
2012-03-07  7:10 ` Heiko Schocher [this message]

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=4F5709D3.1070800@denx.de \
    --to=hs@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.