ARM cross compiling question

Milan Obuch freebsd-arm at dino.sk
Sat Mar 31 13:44:20 UTC 2007


Hi,
some time ago I began studying ARM platfom and recently I got ARM board to 
test it and try to run FreeBSD on it. My board is of Chinese origin, 
description on http://www.hfrk.net/product/list.asp?id=195, my version has 
slightly different LCD, but basically it's the same (well, no english 
version, but I got it off eBay, and some translated description could be 
found there as well - maybe in completed items).
It is based on Samsung's S3C2410 ARM CPU, with 64 MB SDRAM and 64 MB NAND 
flash (contrary to description there is no NOR flash, but for my purpose it 
does not matter).
Today I tried following script based on older mail sent to freebsd-arm mailing 
list:

export TOOLDIR=/data/arm-tools

mkdir -p ${TOOLDIR}/usr/lib
mkdir -p ${TOOLDIR}/usr/share/man/man1
mkdir -p ${TOOLDIR}/usr/bin
mkdir -p ${TOOLDIR}/usr/share/info
touch ${TOOLDIR}/usr/lib/libc.a

echo ===============================================
echo Building cc ARM...
echo ===============================================

cd /usr/src/gnu/usr.bin/cc && make TARGET_ARCH=arm DESTDIR=${TOOLDIR} 
TOOLS_PREFIX=${TOOLDIR} depend all install

echo ===============================================
echo Building binutils for ARM...
echo ===============================================

cd /usr/src/gnu/usr.bin/binutils && make TARGET_ARCH=arm DESTDIR=${TOOLDIR} 
TOOLS_PREFIX=${TOOLDIR} depend all install

but it did not end, error was

===> ar (install)
install -s -o root -g wheel -m 555   ar /data/arm-tools/usr/bin
install -o root -g wheel -m 444 ar.1.gz  /data/arm-tools/usr/share/man/man1
===> as (install)
install -s -o root -g wheel -m 555   as /data/arm-tools/usr/bin
install -o root -g wheel -m 444 as.1.gz  /data/arm-tools/usr/share/man/man1
===> ld (install)
install -s -o root -g wheel -m 555   ld /data/arm-tools/usr/bin
install -o root -g wheel -m 444 ld.1.gz  /data/arm-tools/usr/share/man/man1
install -o root -g wheel -m 444  ldscripts/armelf_fbsd.x 
ldscripts/armelf_fbsd.xbn ldscripts/armelf_fbsd.xn ldscripts/armelf_fbsd.xr 
ldscripts/armelf_fbsd.xs ldscripts/armelf_fbsd.xu ldscripts/armelf_fbsd.xc 
ldscripts/armelf_fbsd.xsc ldscripts/armelf_fbsd.xd 
ldscripts/armelf_fbsd.xdc /data/arm-tools/usr/libdata/ldscripts
install: wrong number or types of arguments
usage: install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
               [-o owner] file1 file2
       install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
               [-o owner] file1 ... fileN directory
       install -d [-v] [-g group] [-m mode] [-o owner] directory ...
*** Error code 64

Stop in /usr/src/gnu/usr.bin/binutils/ld.
*** Error code 1

Stop in /usr/src/gnu/usr.bin/binutils.

when installing binutils.

Some time ago I was able to complete this step and make buildworld 
succesfully.
This is with 6.2-stable, approx. 4 hours old.

Could someone look at this problem? I need to get through, as I think I must 
have working tools to try to build anything.

Also, I have second question - from what I looked in arm kernel configs, it 
seems one needs to set following in kernel config:

options         PHYSADDR=0x10000000
options         KERNPHYSADDR=0x10200000
options         KERNVIRTADDR=0xc0200000         # Used in ldscript.arm
options         FLASHADDR=0x50000000
options         LOADERRAMADDR=0x00000000

(taken from AVILA), but I did not find description for them. For my board, 64 
MB SDRAM is at physicall address 0x3000000. NAND flash is accessed via NAND 
flash controller, somehow resembling disc access (actually, I think I try to 
make it look like disc). Any help to understand these options is greatly 
appreciated.

If anybody already did some work with Samsung's S3C2410, I would like to know 
about it.

Regards,
Milan

-- 
Address this mail is sent from is used only for this mailing list.
Do not send any messages to it directly as a response, reply only
to mailing list. For mail to me personally, use milan in address instead.


More information about the freebsd-arm mailing list