From patchwork Wed Mar 7 07:10:11 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiko Schocher X-Patchwork-Id: 145160 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 39BFCB6EEE for ; Wed, 7 Mar 2012 18:10:28 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 4BAC728082; Wed, 7 Mar 2012 08:10:24 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WMxQqf5kgoKo; Wed, 7 Mar 2012 08:10:24 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C321B28078; Wed, 7 Mar 2012 08:10:20 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8F8BA28078 for ; Wed, 7 Mar 2012 08:10:15 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id k14wYpv38roR for ; Wed, 7 Mar 2012 08:10:14 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from a.relay.invitel.net (a.relay.invitel.net [62.77.203.3]) by theia.denx.de (Postfix) with ESMTP id 2AC6428077 for ; Wed, 7 Mar 2012 08:10:13 +0100 (CET) Received: from mail.invitel.hu (mail.invitel.hu [213.163.59.4]) by a.relay.invitel.net (Invitel Core SMTP Transmitter) with ESMTP id 6FA9511A0B3; Wed, 7 Mar 2012 08:10:11 +0100 (CET) Received: from [192.168.1.6] ([91.82.147.116]) by mail.invitel.hu (Invitel Messaging Server) with ESMTPA id <0M0I00BUL6KZLQ70@invitel.hu>; Wed, 07 Mar 2012 08:10:11 +0100 (CET) Date: Wed, 07 Mar 2012 08:10:11 +0100 From: Heiko Schocher In-reply-to: <201203050713.51779.marex@denx.de> To: Marek Vasut Message-id: <4F5709D3.1070800@denx.de> Organization: DENX Software Engineering MIME-version: 1.0 References: <201203050713.51779.marex@denx.de> User-Agent: Thunderbird 2.0.0.6 (X11/20070801) Cc: Tom Rini , u-boot@lists.denx.de Subject: Re: [U-Boot] cam_enc_4xx build failure X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list Reply-To: hs@denx.de List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.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: I must admit, that I do not really understand, whats the real problem is. Can somebody help here? bye, Heiko 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