Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: installing netbsd on an emulated connex gumstix.



On Thu, Jan 14, 2010 at 11:17:06PM +0000, Michael Litchard wrote:
> I've got the u-boot binary running. How do I discover what address the
> netbsd kernel expects to boot from?

Use objdump on the kernel elf image like so:

$ arm-unknown-linux-gnueabi-objdump -x netbsd-GUMSTIX | less

netbsd-GUMSTIX:     file format elf32-littlearm
netbsd-GUMSTIX
architecture: arm, flags 0x00000112:
EXEC_P, HAS_SYMS, D_PAGED
start address 0xa0200000

Program Header:
    LOAD off    0x00008000 vaddr 0xc0200000 paddr 0xa0200000 align 2**15
         filesz 0x00348d94 memsz 0x00348d94 flags r-x
    LOAD off    0x00358000 vaddr 0xc0550000 paddr 0xa0550000 align 2**15
         filesz 0x0006d35c memsz 0x0006d35c flags rw-
    LOAD off    0x003bd380 vaddr 0xc05bd380 paddr 0xc05bd380 align 2**15
         filesz 0x00000000 memsz 0x0005223c flags rw-
private flags = 602: [APCS-32] [VFP float format] [software FP] [has entry 
point]

<snip>

This indicates that the physical address that the image expects to at is
0xa0200000.

Here's a short excerpt from some mostly self explanatory and quick
experimentation that should be of help:

$ wget 
http://ftp.NetBSD.org/pub/NetBSD/NetBSD-5.0.1/evbarm/binary/kernel/netbsd-sm0.bin-GUMSTIX.gz
$ gunzip netbsd-sm0.bin-GUMSTIX.gz
$ wget http://www.gumstix.net/feeds/u-boot/u-boot-connex-200-r1604.bin
$ dd of=flash bs=1k count=16k if=/dev/zero
$ dd of=flash bs=1k conv=notrunc if=u-boot-connex-400-r1604.bin
$ dd of=flash bs=1k conv=notrunc if=netbsd-sm0.bin-GUMSTIX seek=11264
$ qemu-system-arm -M connex -pflash ~/CodeBox/tmp/netbsd-gumstix/flash 
-nographic -m 289

pxa2xx_clkpwr_write: CPU frequency change attempt


U-Boot 1.2.0 (May 10 2008 - 13:33:03) - 400 MHz - 1604

*** Welcome to Gumstix ***

DRAM:  64 MB
pflash_write: Unimplemented flash cmd sequence (offset 0000000000000000, wcycle 
0x0 cmd 0x0 value 0x90)
Flash: 16 MB
Using default environment

SMC91C1111-0
pflash_write: Unimplemented flash cmd sequence (offset 0000000000000000, wcycle 
0x0 cmd 0x0 value 0x90)
Net:   SMC91C1111-0
Hit any key to stop autoboot:  0 
GUM> cp.l b00000 a0200000 3bd35c
GUM> go a0200000
## Starting application at 0xA0200000 ...

NetBSD/evbarm (gumstix) booting ...
pflash_write: Unimplemented flash cmd sequence (offset 0000000000000000, wcycle 
0x0 cmd 0x0 value 0x90)
system serial: 0x0000000000000000
not specified 'busheader=' in the boot args.
configure default expansion (netCF)
[ Kernel symbol table missing! ]
pmap_postinit: Allocated 35 static L1 descriptor tables
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
    2006, 2007, 2008, 2009
    The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 5.0.1 (GUMSTIX) #0: Thu Jul 30 02:40:24 UTC 2009
        
builds%b6.netbsd.org@localhost:/home/builds/ab/netbsd-5-0-1-RELEASE/evbarm/200907292356Z-obj/home/builds/ab/netbsd-5-0-1-RELEASE/src/sys/arch/evbarm/compile/GUMSTIX
total memory = 65536 KB
avail memory = 57516 KB
mainbus0 (root)
cpu0 at mainbus0: PXA255/26x rev 0 (XScale core)
cpu0: DC enabled IC enabled WB enabled LABT branch prediction enabled
cpu0: 16KB/32B 64-way Instruction cache
cpu0: 16KB/32B 64-way write-back-locking-A Data cache
pxaip0 at mainbus0: PXA2x0 Onchip Peripheral Bus
pxa2xx_clkpwr_read: Bad register 0x0
pxa2xx_clkpwr_write: Bad register 0x0
pxa2xx_clkpwr_read: Bad register 0x1
pxa2xx_clkpwr_read: Bad register 0x1
pxa2xx_clkpwr_write: Bad register 0x0
pxaip0: CPU clock = 0.000 MHz
pxaip0: kernel is configured for PXA250, cpu type is PXA250
pxaintc0 at pxaip0 addr 0x40d00000-0x40d0000f: Interrupt Controller
pxagpio0 at pxaip0 addr 0x40e00000-0x40e0000f: GPIO Controller
com0 at pxaip0 addr 0x40100000-0x4010001f intr 22: ns16550a, working fifo
com0: console
saost0 at pxaip0 addr 0x40a00000-0x40a0001f
saost0: SA-11x0 OS Timer
pxadmac0 at pxaip0 addr 0x40000000-0x400002ff intr 25: DMA Controller
qemu: hardware error: pxa2xx_dma_write: Bad offset 00000000000000f0

CPU #0:
R00=00000000 R01=c212b000 R02=000000f0 R03=00000000
R04=c05bcc68 R05=c2129040 R06=c2129000 R07=00000040
R08=00000000 R09=a3ee0230 R10=c01eed78 R11=c01eed38
R12=c05bcc68 R13=c01eece0 R14=c04bff4c R15=c048e0b0
PSR=60000153 -ZC- A svc32
Abort trap

Cheers,
Robin


Home | Main Index | Thread Index | Old Index