The NDAS beta driver for OpenWRT project

If you have Linksys WRT54G series router or any router that OpenWRT firmware can be installed(mips little endian chip based),
you can make the router access the NDAS hard disk.

WARNING

Installing an OpenWRT or any other custom firmware or the NDAS driver in your router, may void the warranty of the router.
The driver is provided as it is for the reference, XIMETA inc will not provide any support for it, the ticket for this driver will be closed as 'wont be fixed'

1. About OpenWRT

http://www.openwrt.org

2. Download & Build NDAS driver

  • Download the tarball from http://code.ximeta.com/dev/1.1/10/openwrt or http://code.ximeta.com/dev/current/openwrt for more recent version
    • You may use pre-built ipkg files if NDAS ipkg exists for your OpenWRT version. If so, go to step 3.
  • Untar the driver
    tar zxvf ndas-1.x-xx.mipsel.tar.gz
    
  • Add cross-compiler and ipkg-build in PATH environment value.
    • For example:
      export PATH=$PATH:/home/userid/openwrt/whiterussian-0.9/staging_dir_mipsel/bin
      
  • Set environment values
    • For 2.4 kernels
      export NDAS_KERNEL_PATH=/home/userid/openwrt/whiterussian-0.9/build_mipsel/linux
      export NDAS_KERNEL_VERSION=2.4.30
      export NDAS_KERNEL_ARCH=mipsel
      export NDAS_CROSS_COMPILE=mipsel-linux-
      export NDAS_CROSS_COMPILE_UM=mipsel-linux-uclibc-gnu-
      export NDAS_EXTRA_CFLAGS="-mlong-calls -DNDAS_SIGPENDING_OLD"
      
    • For 2.6 kernels
      export NDAS_KERNEL_PATH=/home/userid/openwrt/kamikaze/build_mipsel/linux
      export NDAS_KERNEL_VERSION=2.6.22
      export NDAS_KERNEL_ARCH=mipsel
      export NDAS_CROSS_COMPILE=mipsel-linux-
      export NDAS_CROSS_COMPILE_UM=mipsel-linux-uclibc-gnu-
      export NDAS_EXTRA_CFLAGS="-mlong-calls"
      
  • Make
    • To build files for manual installation
      make
      
    • To build files for ipkg
      make all ipkg
      

3. Install

  • Manual installation
  1. copy ndas_sal.o ndas_core.o ndas_block.o into /lib/modules/{kernel version}/
  2. copy ndas.openwrt as /etc/init.d/S60ndas and add executable property(chmod u+x /etc/init.d/S60ndas)
  3. copy ndasadmin into /usr/sbin and add executable property.(chmod u+x /usr/sbin/ndasadmin)
  4. Reboot or run /etc/init.d/S60ndas to initialize NDAS driver.
  • ipkg install
    ipkg install ndas-kernel_1.x-xx_mipsel.ipk
    ipkg install ndas-admin_1.x-xx_mipsel.ipk
    

Note: the busybox from WhiteRussian RC4 doesn't have the mknod applet by default.
'mknod' is the essential command for NDAS admin driver to communicate the kernel module.
So update the busybox with this version by installing from the OpenWRT device by;

ipkg install http://code.ximeta.com/download/tools/openwrt/whiterussian/rc4/busybox_1.00-4_mipsel.ipk 

(For whiterussian rc5: busybox_1.00-4_mipsel.ipk)
then execute

/etc/init.d/S60ndas start

Note that S60ndas will be executed every boot.

Now you are ready to go

3. Usage

Refer to README for the usage.