Linksys NSLU2 attempt
Bruce M Simpson
bms at incunabulum.net
Tue May 27 20:19:20 UTC 2008
Hi,
I tried booting a FreeBSD/arm kernel (from 7.0-RELEASE sources) on a
friend's NSLU2.
We appear to have drivers for everything except the Intersil X1205
real-time clock on iic0.
No dice yet. Configs attached.
The RedBoot implementation on this board is somewhat cut down.
"ip_address -b" and "fconfig" commands are not supported, so assigning
an IP has to be done manually.
IP addresses therefore need manual config, I suggest putting an alias of
192.168.0.2/24 on your development machine. Also, the ROM+RAM build is
in use, so RedBoot will relocate itself into low memory on boot.
RedBoot wants ELF kernels, it doesn't need the kernel.bin magic from the
ldscript:
RedBoot> load -h 192.168.0.2 /kernel.bin
Using default protocol (TFTP)
Unrecognized image type: 0xe28f7028
It also needs to be told that the ELF kernel it is loading needs to be
loaded at a physical address:
RedBoot> load -h 192.168.0.2 /kernel
Using default protocol (TFTP)
*** Abort! Attempt to load ELF data to address: 0xc02000b4 which is not
in RAM
RedBoot> load -h 192.168.0.2 -b 0x00200000 /kernel
Using default protocol (TFTP)
Address offset = 0x40000000
Entry point: 0x00200100, address range: 0x00200000-0x004e7c98
Try running:
RedBoot> exec
Using base address 0x00200000 and length 0x002e7c98
..And off into space it goes. Nothing further.
I have no ARM experience so I have no idea where to begin. "exec" turns
off the MMU before entry.
-------------- next part --------------
# NSLU2 -- Linksys NSLU-2 Network Storage Link for USB 2.0 Disk Drives
# kernel configuration file for FreeBSD/arm
#
# For more information on this file, please read the handbook section on
# Kernel Configuration Files:
#
# http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html
#
# The handbook is also available locally in /usr/share/doc/handbook
# if you've installed the doc distribution, otherwise always see the
# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the
# latest information.
#
# An exhaustive list of options and more detailed explanations of the
# device lines is also present in the ../../conf/NOTES and NOTES files.
# If you are in doubt as to the purpose or necessity of a line, check first
# in NOTES.
#
# $FreeBSD$
# TODO: RedBoot support.
# TODO: Getting the ethernet addresses out of the RedBoot config area.
# TODO: RTL8201CP PHY driver.
# TODO: Intel NOR flash (probably already handled by IXP BSP)
# TODO: GPIO LEDs (4 of them; plus power LED, power switch, reset switch,
# and buzzer) see include/asm-arm/arch-ixp4xx/nslu2.h in Linux 2.6
# for GPIO pin assignments.
# XXX The PCI controller's IRQ lines most likely need remapping
# on this platform.
# TODO: Intersil X1205 RTC+SRAM chip at iic0.
# Linux patch at: http://lwn.net/Articles/189262/
machine arm
ident NSLU2
options PHYSADDR=0x00000000 # RedBoot @ 0x01ff3000?
options KERNPHYSADDR=0x00200000 # 2MB in
options KERNVIRTADDR=0xc0200000 # Used in ldscript.arm
# XXX We won't run off flash just yet, and we need to do whatever
# is needed for RedBoot.
#options FLASHADDR=0x50000000 # 64 blocks 0x20000 each
#options LOADERRAMADDR=0x00000000
options STARTUP_PAGETABLE_ADDR=0x00000000
# XXX Currently this file depends on the IXP425 specific
# BSP stuff in the avila_machdep.c file.
# That will have to change however...
include "../xscale/ixp425/std.avila"
#To statically compile in device wiring instead of /boot/device.hints
hints "NSLU2.hints"
makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols
makeoptions CONF_CFLAGS=-mcpu=xscale
options HZ=100
options DEVICE_POLLING
options KDB
options DDB #Enable the kernel debugger
#options GDB
#options INVARIANTS #Enable calls of extra sanity checking
#options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS
#options WITNESS #Enable checks to detect deadlocks and cycles
#options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed
#options DIAGNOSTIC
options SCHED_4BSD #4BSD scheduler
options KSE
options INET #InterNETworking
options INET6 #IPv6 communications protocols
options FFS #Berkeley Fast Filesystem
options SOFTUPDATES #Enable FFS soft updates support
options UFS_ACL #Support for access control lists
options UFS_DIRHASH #Improve performance on big directories
options NFSCLIENT #Network Filesystem Client
options NFSSERVER #Network Filesystem Server
options NFS_ROOT #NFS usable as /, requires NFSCLIENT
options CD9660 #ISO 9660 Filesystem
options PSEUDOFS #Pseudo-filesystem framework
options SCSI_DELAY=5000 #Delay (in ms) before probing SCSI
options KTRACE #ktrace(1) support
options SYSVSHM #SYSV-style shared memory
options SYSVMSG #SYSV-style message queues
options SYSVSEM #SYSV-style semaphores
options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions
options KBD_INSTALL_CDEV # install a CDEV entry in /dev
options BOOTP
options BOOTP_NFSROOT
options BOOTP_NFSV3
options BOOTP_WIRED_TO=npe0
options BOOTP_COMPAT
options VERBOSE_SYSINIT
device genclock
device nexus
device mem # Memory and kernel memory devices
device md
device random
device pci
device uart
# I2C Bus
device iicbus
device iicbb
device iic
device ixpiic
device ixpwdog # watchdog timer
device npe # Network Processing Engine
device npe_fw
device firmware
device qmgr # Q Manager (required by npe)
device miibus # NB: required by npe
device ether
device bpf
device pty
device loop
options XSCALE_CACHE_READ_WRITE_ALLOCATE
#options ARM_USE_SMALL_ALLOC
# Onboard USB provided by 1x NEC uPD720101 in FBGA form factor on pci0.
device usb
options USB_DEBUG
device ohci
device ehci
-------------- next part --------------
# $FreeBSD$
#
# Device wiring for the Linksys NSLU2.
#
# 32MB SDRAM onboard.
#
# DBGU is unit 0
hint.uart.0.at="ixp0"
hint.uart.0.addr=0xc8000000
hint.uart.0.irq=15
hint.uart.0.flags=0x10
# USART0 is unit 1
hint.uart.1.at="ixp0"
hint.uart.1.addr=0xc8001000
hint.uart.1.irq=13
# NPE Hardware Queue Manager
hint.ixpqmgr.0.at="ixp0"
# Only NPE-B at PHY 0 is attached on the NSLU2.
hint.npe.0.at="ixp0"
More information about the freebsd-embedded
mailing list