[U-Boot] git-clone doesn't compile

Athanasios Silis athanasios.silis at gmail.com
Fri Sep 16 11:07:08 CEST 2011


Hello everyone,
this is my first attempt to use u-boot
on an sbc2410x board with s3c2410a arm processor (v. arm4t)

I have surfed the git repository and realised that the specific board has
been removed from the u-boot-arm branch.
commit message was : "ARM: remove broken "sbc2410x" board"

so I picked up that branch and went 'back' in history to the previous commit
named: "ARM: remove broken "netstar" board" found here
http://git.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git;a=commit;h=6ea24054897b5061efd9888989e6776b60d372af

i cloned the u-boot-arm.git and checkout the aforementioned commit.
I then tried to compile it as is, and i get this error.

make[1]: Entering directory `/home/nass/u-boot-arm/arch/arm/lib'
gcc  -g  -Os   -fno-common -ffixed-r8 -msoft-float  -D__KERNEL__
-DCONFIG_SYS_TEXT_BASE=0x33F80000 -I/home/nass/u-boot-arm/include
-fno-builtin -ffreestanding -nostdinc -isystem
/scratchbox/compilers/arm-linux-cs2010q1-202/bin/../lib/gcc/arm-none-linux-gnueabi/4.4.1/include
-pipe  -DCONFIG_ARM -D__ARM__ -marm  -mabi=aapcs-linux -mno-thumb-interwork
-march=armv4 -Wall -Wstrict-prototypes -fno-stack-protector
-Wno-format-nonliteral -Wno-format-security   -o board.o board.c -c
board.c: In function '__dram_init_banksize':
board.c:227: error: 'CONFIG_SYS_SDRAM_BASE' undeclared (first use in this
function)
board.c:227: error: (Each undeclared identifier is reported only once
board.c:227: error: for each function it appears in.)
board.c: In function 'board_init_f':
board.c:270: error: 'CONFIG_SYS_INIT_SP_ADDR' undeclared (first use in this
function)
board.c:303: error: 'CONFIG_SYS_SDRAM_BASE' undeclared (first use in this
function)
make[1]: *** [board.o] Error 1
make[1]: Leaving directory `/home/nass/u-boot-arm/arch/arm/lib'
make: *** [arch/arm/lib/libarm.o] Error 2

I am not even sure if the commit should just compile or this failure is
expected.
Should this matter, I am compiling from within scratchbox-hathor, using
codesourcery's arm toolchain 'arm-linux-cs2010q1-202'.

now it was easy to define what was missing:
I found most of these definitions (I still had to guess some values) in
include/configs/versatile.h (a header file that no one seems to include
anywhere)

and incorporated them in include/configs/sbc2410x.h

The code compiled fine afterwards, but u-boot.bin didn't start the board
when i loaded it, so i 'm wondering if
a)I have missed some important steps between compilation and loading  stage
b)If I have hardcoded some erroneous #define ..

Thank you for your help
Nass


PS: here is the patched part of sbc2410x.h : http://pastebin.com/QEivCaby


   1. [sbox-test6: ~/u-boot-arm] > git diff
   2. diff --git a/include/configs/sbc2410x.h b/include/configs/sbc2410x.h
   3. index f0f19b2..e9d7897 100644
   4. --- a/include/configs/sbc2410x.h
   5. +++ b/include/configs/sbc2410x.h
   6. @@ -164,8 +164,15 @@
   7.
   8.  #define PHYS_FLASH_1           0x00000000 /* Flash Bank #1 */
   9.
   10. +//#define CONFIG_SYS_SDRAM_BASE           PHYS_SDRAM_1 /* NASS */
   11. +//#define CONFIG_SYS_INIT_RAM_ADDR        0x00800000 /* NASS */
   12. +//#define CONFIG_SYS_INIT_RAM_SIZE        0x000FFFFF /* NASS */
   13.  #define CONFIG_SYS_FLASH_BASE          PHYS_FLASH_1
   14.
   15. +//#define CONFIG_SYS_GBL_DATA_OFFSET      (CONFIG_SYS_INIT_RAM_SIZE
   - GENERATED_GBL_DATA_SIZE) /
   16. +//#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_INIT_RAM_ADDR +
   CONFIG_SYS_GBL_DATA_OFFSET) /* NAS
   17. +
   18. +
   19.
   /*-----------------------------------------------------------------------
   20.   * FLASH and environment organization
   21.   */


More information about the U-Boot mailing list