1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

OpenWRT on the NAS200

Discussion in 'Cisco/Linksys Network Storage Devices' started by dINIs, Mar 4, 2009.

  1. dINIs

    dINIs LI Guru Member

    OpenWRT provides support for rdc321x platform. It is runnable on the NAS200?
    Any chance to run the OpenWRT on the NAS200? What the "pros and cons" of porting and running the OpenWRT on it?
    I think it would be great to see the OpenWRT running on NAS200. :)
     
  2. jac_goudsmit

    jac_goudsmit Super Moderator Staff Member Member

    Not quite yet. All the RDC321x targets in OpenWRT are routers, so they are not configured to have SATA drivers. And of course, many router-specific packages are not going to be interesting on the NAS200 because only one of the two network adapters is populated.

    The good news is that now I have a kernel config, it should be pretty easy to start a new target configuration for the NAS200 in OpenWRT.

    I'm 100% certain that it's possible (and not very hard) to port OpenWRT to the NAS200. After all, it's already been ported to other NAS devices such as the NSLU2 (so there must be a way to optimize the package list for a NAS-type device), and as you noticed, it has support for the RDC3211 CPU. LZMA, Squashfs and JFFS2 are all supported by OpenWRT because many routers have way simpler hardware than the NAS200. For example, some routers only have 2MB RAM, the NAS200 has 32MB. Most routers have 8MB flash and that's all the non-volatile space they can use, the NAS200 not only has 8MB flash but also tons of space on the hard disks.

    The most important "pro" of running OpenWRT on the NAS200 is that OpenWRT is a well-maintained, stable code base. There are many people in the OpenWRT community, and of course a lot more developers. As soon as OpenWRT -- the operating system -- runs, there will be an avalanche of other software available that's already known to run. Compare that to the many requests I see in this forum and in private message of people who are asking if I can add feature XYZ or program ABC to my custom firmware -- all those programs are already available and can be installed with a simple command.

    Another "pro" would be that it's possible that the NAS200 will become a more popular device if it can run OpenWRT. Who knows maybe Linksys will keep it in production a little longer (although I don't know what their current life expectancy is of course).

    As "cons", first of all, there's the fact that OpenWRT doesn't offer the Linksys web GUI we all know and love, and I don't know how compatible their web GUI is with a NAS-type device. I had it running on one of my WRT54G's for a while but I decided it wasn't ready yet so I returned to the original firmware. That was over two years ago.

    Secondly, I expect the discussions on NAS200 software to shift away from here to the OpenWRT forum where it might be swamped under a flood of questions from people who are using different hardware. Especially in the beginning there will not be many users that specifically run OpenWRT on the NAS200 so questions for that specific platform may not get answered as quickly as for other devices.

    Nevertheless, I'm pretty enthousiastic about how OpenWRT's code is organized and I expect that the port will be easy. After more than a year's ownership of my NAS200 I think I have a good grasp of what this baby can do and how. And hopefully once the NAS200 runs OpenWRT, it will be easier for me to answer user support questions with "Yes it can do that, just type this opkg command" instead of "welllllll, theoretically it could do it but you have to figure a way to compile application XYZ yourself first and I have no time to help you, sorry".

    ===Jac
     
  3. dINIs

    dINIs LI Guru Member

    Any plans to submit it to OpenWRT to integrate it into their code?
    In my previous experience with WRT300N and OpenWRT I found x-wrt very friendly, powerful and nice looked web management console. Of course there is some NAS relative things is missed, but if it possible to implement it will be great! BTW, what webif suitable for the NSLU2 under OpenWRT?

    Jac, I am ready to help you in your works on porting OpenWRT to NAS200 if you want, anyway.
     
  4. jac_goudsmit

    jac_goudsmit Super Moderator Staff Member Member

    Most definitely! Hopefully I'll find some time this weekend to put a patch together.

    No idea, I don't have an NSLU2...

    Thanks!

    ===Jac
     
  5. oferta.cerere

    oferta.cerere Addicted to LI Member

    any news?
     
  6. jac_goudsmit

    jac_goudsmit Super Moderator Staff Member Member

    I will be extremely busy for the next 3 weeks or so, meeting a deadline at work. I will probably have to work weekends too, so I expect to have no time at all until the end of April.

    I promise, as soon as I have news, you will hear about it in the forums.

    ===Jac
     
  7. jac_goudsmit

    jac_goudsmit Super Moderator Staff Member Member

    Making progress

    I got the NAS200 to boot OpenWRT with no significant modifications.

    I configured OpenWRT for the RDC8610 evaluation board target and made numerous changes to the configuration via make menuconfig and make kernel_menuconfig but I didn't edit any files. As you can see below, it boots and the network and disk hardware and most other significant stuff (including USB as it seems) is recognized. No LED support yet (so all LEDs and the fan stay on) and no Real-time clock yet either (I'll have to figure out how to get the I2C bus to work; on the Linksys kernel it uses the Velleman driver but I'm pretty sure that's been replaced with a generic bit-banging driver).

    I would have liked to be able to boot with a hard disk as root file system but for some reason I can't figure out how to get that to work yet (for some reason the kernel refuses to try ext2 or XFS as file system when it tries to mount the root FS). I don't want to flash my ROM yet because (surprise surprise) the system is in use as a NAS whenever I'm not working on the software (besides, I haven't made the mtd driver work yet). So for now, I boot from the network by using a macro in the Teraterm terminal program to stuff some commands into the Redboot prompt via the serial port. The commands load a kernel with initrd from my Linux machine and run it. The total compressed size of kernel plus initrd is almost 4MB.

    ===Jac

    Here's (part of) the log for the first session that actually booted successfully:

    Code:
    +Ethernet eth0: MAC address 00:01:02:03:04:05
    IP: 192.168.21.249/255.255.254.0, Gateway: 192.168.20.254
    Default server: 0.0.0.0
    
    RedBoot(tm) bootstrap and debug environment [ROM]
    Non-certified release, version v2_0 - built 10:54:50, Jun 22 2007
    
    Platform: PC (I386)
    Copyright (C) 2000, 2001, 2002, Red Hat, Inc.
    
    RAM: 0x00000000-0x000f0000, 0x000720b0-0x000a0000 available
    R3210    00:0012 11-01-2006
    <press Ctrl+C to enter prompt mode>
    
    RedBoot> ^C
    RedBoot> ip_address -l 192.168.1.7
    IP: 192.168.1.7/255.255.254.0, Gateway: 192.168.20.254
    Default server: 0.0.0.0
    RedBoot> load -r -v -h 192.168.1.112 -m tftp -b 0x400000 kamikaze
    /
    Raw file loaded 0x00400000-0x007d2b2f, assumed entry at 0x00400000
    RedBoot> help linux
    Execute a Linux image
       linux [-w timeout] [-b <base address> [-l <image length>]]
            [-r <ramdisk addr> [-s <ramdisk length>]]
            [-c "kernel command line"]
    RedBoot> linux -b 0x400000 -l 0x3d2b30
    
    mem_size: 2000000
    initrd 1a00000 len 0012
    BIOS EBDA/lowmem at: 000999c0/00040800
    Linux version 2.6.28.10 (jac@coppertoo) (gcc version 4.1.2) #2 Sun May 24 10:28:32 MST 2009
    KERNEL supported cpus:
      Intel GenuineIntel
      AMD AuthenticAMD
      NSC Geode by NSC
      Cyrix CyrixInstead
      Centaur CentaurHauls
      Transmeta GenuineTMx86
      Transmeta TransmetaCPU
      UMC UMC UMC UMC
    BIOS-provided physical RAM map:
     BIOS-e801: 0000000000000000 - 000000000009f000 (usable)
     BIOS-e801: 0000000000100000 - 0000000002000000 (usable)
    DMI not present or invalid.
    last_pfn = 0x2000 max_arch_pfn = 0x100000
    RAMDISK: 01a00000 - 02000000
    32MB LOWMEM available.
      mapped low ram: 0 - 02000000
      low ram: 00000000 - 02000000
      bootmap 00001000 - 00001400
    (7 early reservations) ==> bootmem [0000000000 - 0002000000]
      #0 [0000000000 - 0000001000]   BIOS data page ==> [0000000000 - 0000001000]
      #1 [0000100000 - 0000673660]    TEXT DATA BSS ==> [0000100000 - 0000673660]
      #2 [0001a00000 - 0002000000]          RAMDISK ==> [0001a00000 - 0002000000]
      #3 [0000674000 - 0000677000]    INIT_PG_TABLE ==> [0000674000 - 0000677000]
      #4 [0000040800 - 0000100000]    BIOS reserved ==> [0000040800 - 0000100000]
      #5 [0000007000 - 000000d000]          PGTABLE ==> [0000007000 - 000000d000]
      #6 [0000001000 - 0000002000]          BOOTMAP ==> [0000001000 - 0000002000]
    Zone PFN ranges:
      DMA      0x00000000 -> 0x00001000
      Normal   0x00001000 -> 0x00002000
    Movable zone start PFN for each node
    early_node_map[2] active PFN ranges
        0: 0x00000000 -> 0x0000009f
        0: 0x00000100 -> 0x00002000
    Allocating PCI resources starting at 10000000 (gap: 2000000:fe000000)
    Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8031
    Kernel command line: console=ttyS0,38400 auto
    Initializing CPU#0
    PID hash table entries: 128 (order: 7, 512 bytes)
    console [ttyS0] enabled
    Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
    Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
    Memory: 19948k/32768k available (2036k kernel code, 12428k reserved, 518k data, 2880k init, 0k highmem)
    virtual kernel memory layout:
        fixmap  : 0xfffed000 - 0xfffff000   (  72 kB)
        vmalloc : 0xc2800000 - 0xfffeb000   ( 983 MB)
        lowmem  : 0xc0000000 - 0xc2000000   (  32 MB)
          .init : 0xc0382000 - 0xc0652000   (2880 kB)
          .data : 0xc02fd061 - 0xc037ea7c   ( 518 kB)
          .text : 0xc0100000 - 0xc02fd061   (2036 kB)
    Checking if this processor honours the WP bit even in supervisor mode...Ok.
    Calibrating delay loop... 49.40 BogoMIPS (lpj=98816)
    Mount-cache hash table entries: 512
    CPU: Cyrix Cx486SLC
    Checking 'hlt' instruction... OK.
    Freeing SMP alternatives: 0k freed
    net_namespace: 480 bytes
    NET: Registered protocol family 16
    PCI: Using configuration type 1 for base access
    SCSI subsystem initialized
    usbcore: registered new interface driver usbfs
    usbcore: registered new interface driver hub
    usbcore: registered new device driver usb
    PCI: Probing PCI hardware
    bus: 00 index 0 io port: [0x00-0xffff]
    bus: 00 index 1 mmio: [0x000000-0xffffffff]
    NET: Registered protocol family 2
    IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
    TCP established hash table entries: 1024 (order: 1, 8192 bytes)
    TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
    TCP: Hash tables configured (established 1024 bind 1024)
    TCP reno registered
    NET: Registered protocol family 1
    checking if image is initramfs...it isn't (junk in compressed archive); looks like an initrd
    Freeing initrd memory: 6144k freed
    platform rtc_cmos: registered platform RTC device (no PNP device found)
    HugeTLB registered 4 MB page size, pre-allocated 0 pages
    VFS: Disk quotas dquot_6.5.1
    Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
    squashfs: version 3.0 (2006/03/15) Phillip Lougher
    Registering mini_fo version $Id$
    NTFS driver 2.1.29 [Flags: R/W].
    JFFS2 version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
    SGI XFS with security attributes, large block numbers, no debug enabled
    SGI XFS Quota Management subsystem
    msgmni has been set to 50
    io scheduler noop registered
    io scheduler cfq registered (default)
    Non-volatile memory driver v1.2
    Serial: 8250/16550 driver2 ports, IRQ sharing disabled
    serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
    brd: module loaded
    Uniform Multi-Platform E-IDE driver
    ide-gd driver 1.18
    Driver 'sd' needs updating - please use bus_type methods
    sata_sil 0000:00:04.0: enabling device (0005 -> 0007)
    sata_sil 0000:00:04.0: cache line size not set.  Driver may not function
    sata_sil 0000:00:04.0: Applying R_ERR on DMA activate FIS errata fix
    scsi0 : sata_sil
    scsi1 : sata_sil
    ata1: SATA max UDMA/100 mmio m512@0x10080000 tf 0x10080080 irq 9
    ata2: SATA max UDMA/100 mmio m512@0x10080000 tf 0x100800c0 irq 9
    ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
    ata1.00: ATA-7: ST3500630AS, 3.AAE, max UDMA/133
    ata1.00: 976773168 sectors, multi 0: LBA48 NCQ (depth 0/32)
    ata1.00: configured for UDMA/100
    ata2: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
    ata2.00: ATA-8: WDC WD10EACS-65D6B0, 01.01A01, max UDMA/133
    ata2.00: 1953525168 sectors, multi 0: LBA48 NCQ (depth 0/32)
    ata2.00: configured for UDMA/100
    scsi 0:0:0:0: Direct-Access     ATA      ST3500630AS      3.AA PQ: 0 ANSI: 5
    sd 0:0:0:0: [sda] 976773168 512-byte hardware sectors: (500 GB/465 GiB)
    sd 0:0:0:0: [sda] Write Protect is off
    sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
    sd 0:0:0:0: [sda] 976773168 512-byte hardware sectors: (500 GB/465 GiB)
    sd 0:0:0:0: [sda] Write Protect is off
    sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
     sda: sda1 sda2 sda3
    sd 0:0:0:0: [sda] Attached SCSI disk
    scsi 1:0:0:0: Direct-Access     ATA      WDC WD10EACS-65D 01.0 PQ: 0 ANSI: 5
    sd 1:0:0:0: [sdb] 1953525168 512-byte hardware sectors: (1.00 TB/931 GiB)
    sd 1:0:0:0: [sdb] Write Protect is off
    sd 1:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
    sd 1:0:0:0: [sdb] 1953525168 512-byte hardware sectors: (1.00 TB/931 GiB)
    sd 1:0:0:0: [sdb] Write Protect is off
    sd 1:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
     sdb: sdb1 sdb2 sdb3
    sd 1:0:0:0: [sdb] Attached SCSI disk
    flash device: 400000 at ffc00000
    RDC3210 Flash: Found 1 x16 devices at 0x0 in 16-bit bank
    NOR chip too large to fit in mapping. Attempting to cope...
    Support for command set 0001 not present
    gen_probe: No supported Vendor Command Set found
    ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
    ehci_hcd 0000:00:0a.1: EHCI Host Controller
    ehci_hcd 0000:00:0a.1: new USB bus registered, assigned bus number 1
    ehci_hcd 0000:00:0a.1: irq 14, io mem 0xc1000000
    ehci_hcd 0000:00:0a.1: USB 2.0 started, EHCI 1.00
    usb usb1: configuration #1 chosen from 1 choice
    hub 1-0:1.0: USB hub found
    hub 1-0:1.0: 2 ports detected
    ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
    ohci_hcd 0000:00:0a.0: OHCI Host Controller
    ohci_hcd 0000:00:0a.0: new USB bus registered, assigned bus number 2
    ohci_hcd 0000:00:0a.0: irq 15, io mem 0xc1001000
    usb usb2: configuration #1 chosen from 1 choice
    hub 2-0:1.0: USB hub found
    hub 2-0:1.0: 2 ports detected
    Initializing USB Mass Storage driver...
    usbcore: registered new interface driver usb-storage
    USB Mass Storage support registered.
    TCP westwood registered
    NET: Registered protocol family 17
    802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
    All bugs added by David S. Miller <davem@redhat.com>
    Using IPI Shortcut mode
    Freeing unused kernel memory: 2880k freed
    [sighandler]: No more events to be processed, quitting.
    [cleanup]: Waiting for children.
    [cleanup]: All children terminated.
    - preinit -
    Press CTRL-C for failsafe
    
    Please press Enter to activate this console. PPP generic driver version 2.4.2
    ip_tables: (C) 2000-2006 Netfilter Core Team
    nf_conntrack version 0.5.0 (512 buckets, 2048 max)
    i2c /dev entries driver
    <6>r6040: RDC R6040 NAPI net driver,version 0.22 (25Mar2009)
    r6040: MAC address not initialized, generating random
    <6>r6040: RDC R6040 NAPI net driver,version 0.22 (25Mar2009)
    r6040: MAC address not initialized, generating random
    device eth1 entered promiscuous mode
    br-lan: topology change detected, propagating
    br-lan: port 1(eth1) entering forwarding state
    br-lan: port 1(eth1) entering disabled state
    br-lan: topology change detected, propagating
    br-lan: port 1(eth1) entering forwarding state
    
    
    
    BusyBox v1.11.3 (2009-05-24 08:57:19 MST) built-in shell (ash)
    Enter 'help' for a list of built-in commands.
    
      _______                     ________        __
     |       |.-----.-----.-----.|  |  |  |.----.|  |_
     |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
     |_______||   __|_____|__|__||________||__|  |____|
              |__| W I R E L E S S   F R E E D O M
     KAMIKAZE (bleeding edge, r16029) -------------------
      * 10 oz Vodka       Shake well with ice and strain
      * 10 oz Triple sec  mixture into 10 shot glasses.
      * 10 oz lime juice  Salute!
     ---------------------------------------------------
    root@OpenWrt:/# ip link
    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
        link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 1000
        link/ether da:40:ed:91:b0:84 brd ff:ff:ff:ff:ff:ff
    3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 1000
        link/ether c2:50:f3:b9:02:72 brd ff:ff:ff:ff:ff:ff
    4: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN
        link/ether c2:50:f3:b9:02:72 brd ff:ff:ff:ff:ff:ff
    root@OpenWrt:/# udhcpc
    udhcpc (v1.11.3) started
    Sending discover...
    Sending select for 192.168.1.115...
    Lease of 192.168.1.115 obtained, lease time 86400
    udhcpc: ifconfig eth0 192.168.1.115 netmask 255.255.255.0 broadcast +
    udhcpc: setting default routers: 192.168.1.1
    udhcpc: setting dns servers: (Redacted --JG)
    iptables v1.4.3.2: Couldn't load target `zone__notrack':/usr/lib/iptables/libipt_zone__notrack.so: cannot open shared object file: No such file or directory
    
    Try `iptables -h' or 'iptables --help' for more information.
    root@OpenWrt:/# ip addr
    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
        link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
        inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
    2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 1000
        link/ether da:40:ed:91:b0:84 brd ff:ff:ff:ff:ff:ff
        inet 192.168.1.115/24 brd 192.168.1.255 scope global eth0
    3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 1000
        link/ether c2:50:f3:b9:02:72 brd ff:ff:ff:ff:ff:ff
    4: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN
        link/ether c2:50:f3:b9:02:72 brd ff:ff:ff:ff:ff:ff
        inet 192.168.1.7/24 brd 192.168.1.255 scope global br-lan
    root@OpenWrt:/# ip route del 192.168.1.0/24 dev br-lan
    root@OpenWrt:/# ip route
    192.168.1.0/24 dev eth0  proto kernel  scope link  src 192.168.1.115
    default via 192.168.1.1 dev eth0
    root@OpenWrt:/# ping 192.168.1.112
    PING 192.168.1.112 (192.168.1.112): 56 data bytes
    64 bytes from 192.168.1.112: seq=0 ttl=64 time=45.201 ms
    64 bytes from 192.168.1.112: seq=1 ttl=64 time=2.261 ms
    64 bytes from 192.168.1.112: seq=2 ttl=64 time=1.835 ms
    64 bytes from 192.168.1.112: seq=3 ttl=64 time=2.607 ms
    64 bytes from 192.168.1.112: seq=4 ttl=64 time=3.068 ms
    64 bytes from 192.168.1.112: seq=5 ttl=64 time=1.812 ms
    64 bytes from 192.168.1.112: seq=6 ttl=64 time=2.881 ms
    ^C
    --- 192.168.1.112 ping statistics ---
    7 packets transmitted, 7 packets received, 0% packet loss
    round-trip min/avg/max = 1.812/8.523/45.201 ms
    root@OpenWrt:/# mkdir /disk/1/1
    root@OpenWrt:/# mount -t XFS /dev/sda1 /disk/1/1
    root@OpenWrt:/# ls /disk/1/1 -la
    drwxrwxrwx   37 502      501          4096 May 23 23:29 .
    drwxr-xr-x    3 root     root            0 Aug  7 04:05 ..
    drwxrwxrwx    7 root     root         4096 Jan  3  2000 .TwonkyMediaServer
    drwxrwxrwx    4 2001     501            33 Dec 25  2008 Archives
    drwxrwxrwx    3 2001     501            24 Dec 15  2008 Backup
    drwxrwxrwx    5 2001     501            41 Dec 25  2008 Media
    drwxrwxrwx   10 root     501          4096 May 17 06:08 rc.d
    ... snip ...
    root@OpenWrt:/# cat /proc/meminfo
    MemTotal:          28972 kB
    MemFree:            9568 kB
    Buffers:               0 kB
    Cached:            14216 kB
    SwapCached:            0 kB
    Active:             3324 kB
    Inactive:          11896 kB
    Active(anon):       1064 kB
    Inactive(anon):        0 kB
    Active(file):       2260 kB
    Inactive(file):    11896 kB
    SwapTotal:             0 kB
    SwapFree:              0 kB
    Dirty:                 0 kB
    Writeback:             0 kB
    AnonPages:          1032 kB
    Mapped:             1048 kB
    Slab:               2568 kB
    SReclaimable:        648 kB
    SUnreclaim:         1920 kB
    PageTables:          184 kB
    NFS_Unstable:          0 kB
    Bounce:                0 kB
    WritebackTmp:          0 kB
    CommitLimit:       14484 kB
    Committed_AS:       4884 kB
    VmallocTotal:    1007532 kB
    VmallocUsed:        1176 kB
    VmallocChunk:     997448 kB
    HugePages_Total:       0
    HugePages_Free:        0
    HugePages_Rsvd:        0
    HugePages_Surp:        0
    Hugepagesize:       4096 kB
    DirectMap4k:       32768 kB
    DirectMap4M:           0 kB
    root@OpenWrt:/# cat /proc/cpuinfo
    processor       : 0
    vendor_id       : CyrixInstead
    cpu family      : 4
    model           : 1
    model name      : Cx486SLC
    stepping        : unknown
    fdiv_bug        : yes
    hlt_bug         : no
    f00f_bug        : no
    coma_bug        : no
    fpu             : no
    fpu_exception   : no
    cpuid level     : -1
    wp              : yes
    flags           :
    bogomips        : 49.40
    clflush size    : 32
    power management:
    root@OpenWrt:/# uname -a
    Linux OpenWrt 2.6.28.10 #2 Sun May 24 10:28:32 MST 2009 i486 unknown
    
     
  8. dINIs

    dINIs LI Guru Member

    Wow! Congratulations! Great work, Jac! It significant step to make NAS200 better, keep so!
     
  9. Pa0l0ne

    Pa0l0ne Addicted to LI Member

    Great work!:thumbup:
    If you need some help/testing or whatelse i'm here..... (I think leds status and fan control is not much important for now...)
     
  10. Pa0l0ne

    Pa0l0ne Addicted to LI Member

    ...any new good new?
     
  11. jac_goudsmit

    jac_goudsmit Super Moderator Staff Member Member

    I did some work on OpenWRT this weekend. Mostly I got more familiar with how the build system works.

    Here's a rough to-do list:
    • Add NAS200 as a new RDC target, with proper kernel configuration changes to support the hardware. It appears that profile-specific kernel configurations are not used at this time (see OpenWRT bug 5243) which is blocking this.
    • CONFIG_SATA_SFF and CONFIG_SATA_SIL should be enabled and/or should be made available as installable modules. There is no kmod-sata-sil at this time.
    • Figure out which kernel drivers are needed to successfully use the entire flash as MTD device so OpenWRT can be flashed. Currently I download the image to RAM as a kernel with initrd piggyback, using Redboot commands (see above).
    • Figure out how to add image building steps to the build system. I have a good idea of how the target is built now, but I haven't looked much at image building steps yet although I know that we can probably use some code that's in use for NSLU2 because I used the upslug program to load my image once. Keeping compatibility with Linksys images also makes it possible for users to flash back to the Linksys firmware if they wish.
    • Once it's possible to run from flash and to build a backwards-compatible image files, I'd say the NAS200 OpenWRT port is ready for the public.
    • Figure out how to make secondary devices work e.g. I2C, RTC, GPIO/LEDS. These aren't essential for the main functionality of the system so I'm not concentrating on them at this time.
    • Set up OpenWRT in such a way that it uses the on-board Redboot and so that it's backwards-compatible with the Linksys firmware. I should make a patch to the R6040 network driver so it reads the MAC address from the same ROM location as the Linksys software.
    • Have a preinit that can mount the config partitions of the hard disks and allow us to init from them. On the other hand we should also give people the opportunity to decide to break backwards compatibility with the Linksys partitioning scheme.
    • Should modify the network settings that are based on requirements for a router so they are more appropriate for a NAS. Also, it would be nice to prevent the kernel from detecting eth1 -- it's not connected.

    Meanwhile, here's an untested OpenWRT for NAS200 mini cookbook if you have a serial port and you want to play around:
    1. Download OpenWRT trunk from SVN
    2. run "make menuconfig"
    3. In menuconfig, select RDC as target and the R8610 evaluation board as profile
    4. In menuconfig, select "Ram Disk" as image. Other image options (Bzip2, Gzip, ext2) will disappear from the menu
    5. Other options in menuconfig are mostly irrelevant, change them as desired.
    6. Exit menuconfig, save your config
    7. run "make kernel_menuconfig"
    8. Set Device Drivers ---> <*> Serial ATA (prod) and Parallel ATA drivers ---> <*> ATA SFF support / <*> Sillicon Image SATA support
    9. Set File Systems ---> <*> Second Extended FS support
    10. Set File Systems ---> <*> Ext3 journalling file system support
    11. Set File Systems ---> <*> XFS file system support
    12. Exit kernel_menuconfig
    13. run make
    14. The kernel/initrd image is stored in trunk/build_dir/linux-rdc/bzImage, it should be a little under 4MB. You will need to copy this to a TFTP or HTTP (web) server.
    15. Connect to the NAS200 Redboot system via serial port (Telnet should also work if you use one of the methods described here but I haven't tried this)
    16. You can use the help command to learn more about Redboot commands. Do not ever use the FLASH command, it will instantly brick your NAS200
    17. Unless you're using Telnet, set up the NAS200 address using the ip_address command
    18. Use the load -r command to download the bzImage file, use -b 0x400000 to load it to the correct location, you can use -m tftp or -m http, whichever is easier for you to set up on your development system
    19. Use the linux command to start the kernel. The default command line that's built into the kernel will set the serial port to the console; if you want to override the kernel command line, make sure there's a parameter "console=ttyS0,38400" in there. The OpenWRT kernel has some patches that won't allow you to override the root device and file system: OpenWRT always loads from the initrd and the preinit code is supposed to determine the "real" root device and mount it.
    20. eth0 is configured as LAN via the br-lan bridge (use brctl to control the bridge), eth1 is not populated and can be ignored safely. The udhcpd DHCP client is on board to reconfigure the network. You can mount the hard disks and do whatever you like with them; installing packages on them should be possible but I haven't tried this.
    21. When you shut down or reboot, the system will crash (so it's probably a good idea to unmount your disks before you do that)

    I didn't test the mini cookbook, I made lots more changes to the menuconfig and kernel_menuconfig so I may have left something out. Maybe I'll have some time later today to test and fix.

    ===Jac
     
  12. Pa0l0ne

    Pa0l0ne Addicted to LI Member

    Oh my God, all the things coming to run sweetly........like Michelangelo said many years ago: "why not talk? "........
     
  13. fabien

    fabien Networkin' Nut Member

    News

    Any progress on your work with OpenWRT? Need any help?
     

Share This Page