Port-arm archive

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

stuck in bringing the userland shell on a latest ARM core



Hi All,

I am trying to bring up NetBSD-5 on a latest ARM Core (which is not yet 
natively supported by NetBSD/arm port) as part of learning NetBSD. 

I do not have any previous practical exposure on NetBSD or for that matter on 
any other Unix-like OSes.

I am able to bring up the kernel in a couple of weeks (although not in a clean 
way), but I am stuck in brining up the userland.

First I ran into nbmakefs toolset problem in building the ramdisk under cygwin 
development environment. Then I bumped into version mismatch between the 
userland and kernel.

With the right ramdisk matching kernel version(got from Mr.Ken Hornstein), My 
serial console output is as below:


-------------------------------Console Output Begin--------------
NetBSD/evbarm (xxxxxemul) booting ...

initarm: Configuring system ...

physmemory: 16384 pages at 0x00000000 -> 0x03ffffff

Allocating page tables

freestart = 0x00000000, free_pages = 512 (0x00000200)

IRQ stack: p0x001f1000 v0x801f1000

ABT stack: p0x001f0000 v0x801f0000

UND stack: p0x001ef000 v0x801ef000

SVC stack: p0x001ed000 v0x801ed000

Creating L1 page table at p0x001fc000 v0x801fc000

Mapping kernel

initarm: etext 8039946b, _end 808fe44c

initarm: textsize 0x1a0000, totalsize 0x700000

pmap_map_chunk: pa=0x200000 va=0x80200000 size=0x1a0000 resid=0x1a0000 prot=0x3 
cache=1

SLLLLLLLLLL

pmap_map_chunk: pa=0x3a0000 va=0x803a0000 size=0x560000 resid=0x560000 prot=0x3 
cache=1

LLLLLLSSSSS

Constructing L2 page tables

pmap_map_chunk: pa=0x1f1000 va=0x801f1000 size=0x1000 resid=0x1000 prot=0x3 
cache=1

P

pmap_map_chunk: pa=0x1f0000 va=0x801f0000 size=0x1000 resid=0x1000 prot=0x3 
cache=1

P

pmap_map_chunk: pa=0x1ef000 va=0x801ef000 size=0x1000 resid=0x1000 prot=0x3 
cache=1

P

pmap_map_chunk: pa=0x1ed000 va=0x801ed000 size=0x2000 resid=0x2000 prot=0x3 
cache=1

PP

pmap_map_chunk: pa=0x1fc000 va=0x801fc000 size=0x4000 resid=0x4000 prot=0x3 
cache=2

PPPP

pmap_map_chunk: pa=0x1fb000 va=0x801fb000 size=0x1000 resid=0x1000 prot=0x3 
cache=2

P

pmap_map_chunk: pa=0x1fa000 va=0x801fa000 size=0x1000 resid=0x1000 prot=0x3 
cache=2

P

pmap_map_chunk: pa=0x1f9000 va=0x801f9000 size=0x1000 resid=0x1000 prot=0x3 
cache=2

P

pmap_map_chunk: pa=0x1f8000 va=0x801f8000 size=0x1000 resid=0x1000 prot=0x3 
cache=2

P

pmap_map_chunk: pa=0x1f7000 va=0x801f7000 size=0x1000 resid=0x1000 prot=0x3 
cache=2

P

pmap_map_chunk: pa=0x1f6000 va=0x801f6000 size=0x1000 resid=0x1000 prot=0x3 
cache=2

P

pmap_map_chunk: pa=0x1f5000 va=0x801f5000 size=0x1000 resid=0x1000 prot=0x3 
cache=2

P

pmap_map_chunk: pa=0x1f4000 va=0x801f4000 size=0x1000 resid=0x1000 prot=0x3 
cache=2

P

pmap_map_chunk: pa=0x1f3000 va=0x801f3000 size=0x1000 resid=0x1000 prot=0x3 
cache=2

P

pmap_map_entry called with args- l1pt=001fc000  va=ffff0000     prot=00000003   
cache=00000001

devmap: a0300000 -> a04fffff @ fd000000

pmap_map_chunk: pa=0xa0300000 va=0xfd000000 size=0x200000 resid=0x200000 
prot=0x3 cache=0

SS

devmap: 80000000 -> 801fffff @ fd200000

pmap_map_chunk: pa=0x80000000 va=0xfd200000 size=0x200000 resid=0x200000 
prot=0x3 cache=0

SS

freestart = 0x008ff000, free_pages = 14081 (0x3701)

switching to new L1 page table  @0x1fc000...bootstrap done.

init subsystems: stacks vectors undefined page pmap done.

initarm done.

pmap_postinit: Allocated 35 static L1 descriptor tables

Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,

    2006, 2007, 2008

    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_RC2 (xxxxxemul) #150: Wed Mar 25 19:30:24 RST 2009

        
newbie@xxxx:/cygdrive/c/NetBSD-5_RC/src/sys/arch/evbarm/compile/obj/xxxxxemul

total memory = 65536 KB

avail memory = 54572 KB

mainbus0 (root)

cpu0 at mainbus0: Cortex-A9 r0p1p0 (ARM11J core)

cpu0: DC enabled IC enabled WB disabled EABT branch prediction enabled

cpu0: 0KB/0B 0-way Instruction cache

cpu0: 127KB/64B 4-way write-back-locking-C Data cache

lbus0 at mainbus0: xxxxx Cortex-A9 lbus interface

gic0 at lbus0 addr 0xa0411000: interrupts 0..256

percoretmr0 at lbus0 addr 0xa0410600-0xa04115ff intr 29

 Cortex-A9 per core Timer sysbus0 at mainbus0 vx.y bus interface

xxxxxuart0 at sysbus0 addr 0x80120000-0x80120fff intr 43 xxxxxuart0: major = 
111: console

clock: hz=100 stathz=0

boot device: <unknown>

root on md0a dumps on md0b

mountroot: trying ffs...

root file system type: ffs

WARNING: no TOD clock present

WARNING: using filesystem time

WARNING: CHECK AND RESET THE DATE!

init: copying out flags `-s' 3

init: copying out path `/sbin/init' 11

-sh: media_constructor: File exists

------------- Console Outpupt End -----------------------------------------

When I intercept the system calls on the kernel side, the shell (/bin/sh) is 
exiting (sys_exit: 2.1 exiting with signal 0, exit code 1).

Also there is a sys_execve call with exec path as "/bin/sh" and a single 
argument "-sh". After this, the shell is printing output "-sh: 
media_constructor: File exists" and exiting with exit code 1. 

Why is the shell (/bin/sh) exiting with exit code 1? 

While refering to the /sbin/init source code, ideally I should see the printf 
"Enter pathname of shell or RETURN for %s: " before the shell (/bin/sh) is 
execved. 

Why am I not able to see this message on the console before the shell is 
started?

Whart are the mandatory kernel options (compile and run time) to enable a 
serial port terminal for the userland? 

I wish I could debug the userland, but I do not have any spare debugging 
transport (ethernet/serial port) on the target as of now. 
All that I have is a single serial port, which I am already using as a serial 
console. 

Regards







      


Home | Main Index | Thread Index | Old Index