From patchwork Tue Mar 15 16:46:27 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Ceresoli X-Patchwork-Id: 87014 X-Patchwork-Delegate: s-paulraj@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 9E622B710A for ; Wed, 16 Mar 2011 03:53:21 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id CC74D28094; Tue, 15 Mar 2011 17:53:17 +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 nASHQoDS2aY3; Tue, 15 Mar 2011 17:53:17 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 571D62808C; Tue, 15 Mar 2011 17:53:15 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5FD2C2808C for ; Tue, 15 Mar 2011 17:53:13 +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 V8QunC0KTpKf for ; Tue, 15 Mar 2011 17:53:12 +0100 (CET) X-Greylist: delayed 402 seconds by postgrey-1.27 at theia; Tue, 15 Mar 2011 17:53:10 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 smtpw2.aruba.it (smtpa1.aruba.it [62.149.128.210]) by theia.denx.de (Postfix) with SMTP id 0C1FF28086 for ; Tue, 15 Mar 2011 17:53:10 +0100 (CET) Received: (qmail 25399 invoked by uid 89); 15 Mar 2011 16:46:27 -0000 Received: from unknown (HELO aruba.it) (62.149.158.91) by smtpw2.ad.aruba.it with SMTP; 15 Mar 2011 16:46:27 -0000 Date: Tue, 15 Mar 2011 17:46:27 +0100 Message-Id: MIME-Version: 1.0 X-Sensitivity: 3 From: "Luca Ceresoli" To: u-boot@lists.denx.de X-XaM3-API-Version: V3(R2) X-SenderIP: 80.18.62.138 X-Spam-Rating: smtpw2.ad.aruba.it 1.6.2 0/1000/N Cc: Heiko Schocher , Dirk Behme Subject: [U-Boot] OMAP3 Regression after merging ARM relocation code for custom board X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list 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 Hi, I ported U-boot to a custom BeagleBoard-derivative board, which is running fine so far. Now I'm trying to upgrade from the current codebase (v2010.06) to a more recent one. My custom U-boot stopped booting after merging the ARM relocation code implemented in september 2010 by Heiko Schocher, even though I think I've changed my code where needed. More in detail, my code base works perfectly if merged with the upstream code (from git://git.denx.de/u-boot.git) until the commit before the ARM relocation series: 4fff329 nand_boot_fsl_nfc.c: make "nfc" a "static const" pointer It stops working when I merge these 3 commits (plus an arbitrarily large amount of the following ones): f1d2b31 ARM: add relocation support e48b7c0 ARM: implement relocation for ARM11 561142a ARM: implement relocation for ARM V7 (OMAP) plus this patch to my code (copied from the Beagle code changes in commit 561142a above): The result is that U-boot does not print any single character on the serial console, and I'm lost since I can't use a JTAG emulator. As I am not expert in the low-level U-boot code, I don't know where to look at. Any suggestion would be appreciated. Here are a few more details that might be relevant. The board is a BeagleBoard derivative, with the same CPU (OMAP3530, Cortex-A8) and NAND flash chip. The RAM chip is the same model, but we have only one 128 MB chip instead of two. There's also a LAN chip (SMC911x family). I started my porting from the upstream repository at git://git.denx.de/u-boot.git and created a branch. Here I added a new board, initially equal to Beagle, then I removed some unwanted features (JFFS2, board detection), added some wanted ones (UBI/UBIFS, LAN driver, CONFIG_CMD_NET) and adapdet the default environment. I also changed CONFIG_SYS_MALLOC_LEN from 128kB to 1MB, as it was not enough for UBI to work. Thanks in advance, Luca diff --git a/board/mycompany/myboard/config.mk b/board/mycompany/myboard/config.mk index 150b30c..a9c88d2 100644 --- a/board/mycompany/myboard/config.mk +++ b/board/mycompany/myboard/config.mk @@ -30,4 +30,4 @@ # (mem base + reserved) # For use with external or internal boots. -TEXT_BASE = 0x80e80000 +TEXT_BASE = 0x80008000 diff --git a/include/configs/omap3_myboard.h b/include/configs/omap3_myboard.h index c62febd..be0d9a9 100644 --- a/include/configs/omap3_myboard.h +++ b/include/configs/omap3_myboard.h @@ -333,4 +333,9 @@ extern unsigned int boot_flash_sec; extern unsigned int boot_flash_type; #endif +/* additions for new relocation code, must added to all boards */ +#undef CONFIG_SYS_ARM_WITHOUT_RELOC /* This board is tested with relocation support */ +#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1 +#define CONFIG_SYS_INIT_SP_ADDR (LOW_LEVEL_SRAM_STACK - CONFIG_SYS_GBL_DATA_SIZE) + #endif /* __CONFIG_H */