Previous Home Next


Observations and Comparison with Linux Porting Efforts


Porting NetBSD to this SoC turned out to be a very straightforward effort, with very few "potholes". I've done a few Linux ports before, and the adaptation of NetBSD went at least as smoothly as any of the Linux efforts. In fact, I found NetBSD to have several advantages that made it substantially easier to port to a new platform than Linux, especially for a "newbie" like myself with no previous NetBSD porting experience.
However, NetBSD has a few drawbacks (some significant), particularly for use in embedded systems.

Both Linux and NetBSD benefit tremendously from being open-source systems. As noted in the introduction, it's because of the work of others, and their openness in sharing it, that NetBSD and Linux and most other open-source systems are quite straightforward to adapt to new platforms. And there's nothing quite so satisfying as finally seeing on your console (debug messages and warts and all):


NetBSD/evbarm (Vx115 VEP) booting...
physmemory: 3840 pages at 0x24100000 -> 0x24ffffff
Allocating page tables
freestart = 0x24100000, free_pages = 512 (0x00000200)
IRQ stack: p0x242f2000 v0xc01f2000
ABT stack: p0x242f1000 v0xc01f1000
UND stack: p0x242f0000 v0xc01f0000
SVC stack: p0x242ee000 v0xc01ee000
Creating L1 page table at 0x242fc000
Mapping kernel
pmap_map_chunk: pa=0x24300000 va=0xc0200000 size=0x183000 resid=0x183000 prot=0x3 cache=1
SLLLLLLLLPPP
pmap_map_chunk: pa=0x24483000 va=0xc0383000 size=0x56d000 resid=0x56d000 prot=0x3 cache=1
PPPPPPPPPPPPPLLLLLLLSSSSLLLLLLLLLLLLLLL
Constructing L2 page tables
pmap_map_chunk: pa=0x242f2000 va=0xc01f2000 size=0x1000 resid=0x1000 prot=0x3 cache=1
P
pmap_map_chunk: pa=0x242f1000 va=0xc01f1000 size=0x1000 resid=0x1000 prot=0x3 cache=1
P
pmap_map_chunk: pa=0x242f0000 va=0xc01f0000 size=0x1000 resid=0x1000 prot=0x3 cache=1
P
pmap_map_chunk: pa=0x242ee000 va=0xc01ee000 size=0x2000 resid=0x2000 prot=0x3 cache=1
PP
pmap_map_chunk: pa=0x242fc000 va=0xc01fc000 size=0x4000 resid=0x4000 prot=0x3 cache=2
PPPP
pmap_map_chunk: pa=0x242fb000 va=0xc01fb000 size=0x1000 resid=0x1000 prot=0x3 cache=2
P
pmap_map_chunk: pa=0x242fa000 va=0xc01fa000 size=0x1000 resid=0x1000 prot=0x3 cache=2
P
pmap_map_chunk: pa=0x242f9000 va=0xc01f9000 size=0x1000 resid=0x1000 prot=0x3 cache=2
P
pmap_map_chunk: pa=0x242f8000 va=0xc01f8000 size=0x1000 resid=0x1000 prot=0x3 cache=2
P
pmap_map_chunk: pa=0x242f7000 va=0xc01f7000 size=0x1000 resid=0x1000 prot=0x3 cache=2
P
pmap_map_chunk: pa=0x242f6000 va=0xc01f6000 size=0x1000 resid=0x1000 prot=0x3 cache=2
P
pmap_map_chunk: pa=0x242f5000 va=0xc01f5000 size=0x1000 resid=0x1000 prot=0x3 cache=2
P
pmap_map_chunk: pa=0x242f4000 va=0xc01f4000 size=0x1000 resid=0x1000 prot=0x3 cache=2
P
devmap: 70000000 -> 700fffff @ fd000000
pmap_map_chunk: pa=0x70000000 va=0xfd000000 size=0x100000 resid=0x100000 prot=0x3 cache=0
S
devmap: fc000000 -> fc1fffff @ fc000000
pmap_map_chunk: pa=0xfc000000 va=0xfc000000 size=0x200000 resid=0x200000 prot=0x3 cache=0
SS
freestart = 0x249f0000, free_pages = 1552 (0x610)
switching to new L1 page table  @0x242fc000...done!
bootstrap done.
init subsystems: stacks vectors undefined page pmap done.
Loaded initial symtab at 0xc038b3f4, strtab at 0xc03b81b0, # entries 11404
abcdefg
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
    The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

pmap_postinit: Allocated 35 static L1 descriptor tables
NetBSD 3.0.1 (VX115_VEP) #8: Tue Jan  2 19:17:21 EST 2007
        root@localhost.localdomain:/home/agere/vx115_netbsd/build/usr/src/sys/arch/evbarm/compile/obj/VX115_VEP
total memory = 15360 KB
avail memory = 5404 KB
mainbus0 (root)
cpu0 at mainbus0: ARM926EJ-S rev 5 (ARM9E-S core)
cpu0: WB enabled EABT
cpu0: 16KB/32B 4-way Instruction cache
cpu0: 16KB/32B 4-way write-back-locking-C Data cache
vx115_ahb0 at mainbus0
vx115_apb0 at mainbus0
vx115_clk0 at vx115_apb0 addr 0x700c5000-0x700c5067 intr 9
vx115_pic0 at vx115_apb0 addr 0x700c1000-0x700c114b
vx115_com0 at vx115_apb0 addr 0x700e2000-0x700e207b intr 19
vx115_com0: major = 110: console
md0: internal 5000 KB image area
boot device: <unknown>
root on md0a dumps on md0b
mountroot: trying msdos...
mountroot: trying ffs...
root file system type: ffs
WARNING: CHECK AND RESET THE DATE!
init: copying out flags `-s' 3
init: copying out path `/sbin/init' 11
Jan  3 00:17:46 init: /etc/pwd.db: No such file or directory
Enter pathname of shell or RETURN for /bin/sh:
# ls
bin     dev     etc     lib     libexec sbin    usr
# ps
ps: warning: /var/run/dev.db: No such file or directory
PID TTY STAT    TIME COMMAND
  5 ?   Ss   0:00.13 -sh
  7 ?   R+   0:00.02 ps
#






Previous Home Next


Comments/questions: jsevy@cs.drexel.edu