CNX11XX/STR91XX FreeBSD Progress

Last weekend I continued my work on FreeBSD port. I am concentrating on the network speed improvement, and I made a good progress with it. The network speed is now about 2.1 Mbps (FTP upload from device), this is still slower than the Linux version but i think it already reach a usable state (I think I should be able to stream some DivX files through HTTP from it). I will ask around in the freebsd-arm/freebsd-net mailing list so I can do more improvement on the driver.

I am still a bit worried playing around with the Flash, since I don’t have anything to restore it back in case I made a mistake. So I think I will leave this part for a while.

For everyone who have NSD-100 with Serial Port attached to it, you can try a precompiled binary thah I have prepared, or you can compile from source. To use the binary version, you will need a USB disk (at least 2GB in size), and a TFTP server. Actually you only need about 256 megabyte if you prepare your own disk instead of using my image.

Here are the steps for the binary version:

  1. Download the disk image from here
  2. Decompress (bunzip) the disk image, use dd to write to your USB disk
  3. Since there is no boot menu, entering single or multi user mode is done by booting different kernel. Download the multi user kernel or single user kernel and put it in your tftpserver
  4. Boot the kernel

To boot the kernel, you need to access your device using serial port. I think You need to hold the reset button to enter the boot prompt (mine always goes to the boot prompt because Bruce did something with the configuration area). You should see

STR9100>

prompt.

setenv serverip 192.168.1.1
(you can also 'saveenv' to save the TFTP server address permanently)
tftpboot 0x1000000 name-of-kernel.bin
go 0x1000000

To build your own disk image, make an empty disk.img with the size that you want. Goto /usr/src and then (modified from instruction to make i386 image by Warner Losh)

export TARGET_ARCH=arm
make buildworld
mdconfig -a -t vnode -f disk.img
fdisk -I md0
fdisk -B md0
bsdlabel -w md0s1 auto
bsdlabel -B md0s1
newfs /dev/md0s1a
mount /dev/md0s1a /mnt/
make installworld DESTDIR=/mnt
make distrib-dirs DESTDIR=/mnt
make distribution DESTDIR=/mnt
echo /dev/da0s1a / ufs rw 1 1 > /mnt/etc/fstab
echo ifconfig_DEFAULT=DHCP > /mnt/etc/rc.conf
echo hostname=demo >> /mnt/etc/rc.conf

To compare your boot experience here is is the bootlog for the multi user mode, and the single user mode.

For the latest kernel source, you can see the perforce depot at:

http://p4db.freebsd.org/depotTreeBrowser.cgi?FSPC=//depot/projects/str91xx&HIDEDEL=NO

2 thoughts on “CNX11XX/STR91XX FreeBSD Progress”

  1. Hi, Yohanes!

    I have AgeStar NSB3AST device and I am trying to boot BSD kernel you gave in this post. Both kernels (multi user and single user) stop booting on the same point. Here is the log for multi user kernel:

    ## Starting application at 0x01000000 …
    KDB: debugger backends: ddb
    KDB: current backend: ddb
    Copyright (c) 1992-2009 The FreeBSD Project.
    Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
    The Regents of the University of California. All rights reserved.
    FreeBSD is a registered trademark of The FreeBSD Foundation.
    FreeBSD 9.0-CURRENT #204: Mon Sep 28 22:08:53 UTC 2009
    [email protected]:/usr/home/yohanes/work/src/sys/arm/compile/CNS11XXNAS
    Preloaded elf kernel “elf kernel” at 0xc129ec18.
    unknown CPU (ID = 0x66015261)
    WB enabled LABT
    8KB/16B 2-way Instruction cache
    8KB/16B 2-way write-back-locking-B Data cache
    real memory = 67108864 (64 MB)
    Physical memory chunk(s):
    00000000 – 0xffffff, 16777216 bytes (4096 pages)
    0x1303000 – 0x3e9efff, 45727744 bytes (11164 pages)
    avail memory = 61865984 (59 MB)
    ULE: setup cpu 0
    null:
    random:
    nfslock: pseudo-device
    mem:
    econaarm0: on motherboard
    econa_alloc_resource start 00000000 end ffffffff, count = 00000008
    econa_alloc_resource start 00000000 end ffffffff, count = 00000008
    sys_res_memory
    econa_alloc_resource start 00000000 end ffffffff, count = 00000008
    econa_alloc_resource start 00000000 end ffffffff, count = 00000008
    sys_res_memory
    uart0: mem 0x78000000-0x78ffffff irq 10 on econaarm0
    econa_alloc_resource start 00000000 end ffffffff, count = 00000008
    sys_res_memory
    econa_alloc_resource start 00000000 end ffffffff, count = 00000001
    sys_res_irq
    uart0: [FILTER]
    uart0: fast interrupt
    uart0: console (23668,n,8,1)
    timer0: mem 0x79000000-0x79ffffff irq 0,1 on econaarm0
    econa_alloc_resource start 00000000 end ffffffff, count = 00000001
    sys_res_memory
    econa_alloc_resource start 00000000 end ffffffff, count = 00000001
    sys_res_irq
    econa_alloc_resource start 00000000 end ffffffff, count = 00000001
    sys_res_irq
    System clock 00017fffReset conf 1402f9c0STR9100 CPU Clock: 250 MHz
    IRQ Timer1 at int #0x0 clock 125000000(Hz)
    timer0: [FILTER]
    timer0: [FILTER]
    ohci0: mem 0xf0000000-0xf7ffffff irq 23 on econaarm0
    econa_alloc_resource start 00000000 end ffffffff, count = 00000001
    sys_res_memory
    econa_alloc_resource start 00000000 end ffffffff, count = 00000001
    sys_res_irq
    ohci0: [MPSAFE]
    ohci0: [ITHREAD]
    usbus0 on ohci0
    ehci probe
    ehci probe
    ehci0: mem 0xf8000000-0xffffffff irq 24 on econaarm0
    econa_alloc_resource start 00000000 end ffffffff, count = 00000001
    sys_res_memory
    econa_alloc_resource start 00000000 end ffffffff, count = 00000001
    sys_res_irq
    ehci0: [MPSAFE]
    ehci0: [ITHREAD]
    usbus1: EHCI version 1.0
    usbus1: on ehci0
    ece0: mem 0xe0000000-0xe0ffffff irq 18,19,20,21,22 on econaarm0
    econa_alloc_resource start 00000000 end ffffffff, count = 00000001
    sys_res_memory
    econa_alloc_resource start 00000000 end ffffffff, count = 00000001
    sys_res_irq
    econa_alloc_resource start 00000000 end ffffffff, count = 00000001
    sys_res_irq
    econa_alloc_resource start 00000000 end ffffffff, count = 00000001
    sys_res_irq
    _________________________________________________________

    Can you please give me any advice on what am I doing wrong?

    Also linux kernel you provided in previous posts doesn’t work for me. Log says:

    ## Starting application at 0x01020000 …
    Uncompressing Linux……………………………………………………………………………………………………………………………………………………………………………………………… done, booting the kernel.

    And that is all.

    Thank you in advance.

Leave a Reply

Your email address will not be published.