New features:
- dropbear-2012.55 (lightweight ssh server)
- e2fsprogs-1.42.3
- fdisk-1.3.0a
- libmad & madplay
- mdadm-3.2.5 & raid kernel modules (You always wanted raid5 on the box, didn't you?)
- nfs-utils-1.1.6 & portmap-6.0
- strace-4.7
- bumped busybox to 1.20.1 & added a lot of modules
- added support for fun_plug.sh scripts
- added a lot of kernel modules, among which ext2, ext3, nfs, nfsd, cifs, usb-sound, ...
- added the possibility to load the rootfs from an usb-disk/stick or an nfs server.
- The root password is the same as the web interface password.
Install
You can find the firmware here, install it using the web interface.
fun_plug.sh
When an automounted partition contains a script fun_plug.sh, it will be executed. Two arguments are passed, the device and the mountpoint. Only FAT or NTFS formatted partition are automounted. So if you want an ext2/3 formatted disk to be mounted, add a (small) fat partition, with the fun_plug.sh script:
Code: Select all
#!/bin/sh
PARTITIONDEVICE=$1
MOUNTPOINT=$2
ROOTDEVICE=` echo ${PARTITIONDEVICE} | sed 's/[0-9]*//g' `
modprobe ext3
mkdir -p /mnt/mymountpoint
mount -o relatime ${ROOTDEVICE}2 /mnt/mymountpoint
When you need both ext3 and ext2, make sure you first load the ext3 module, and then ext2. Else an ext3 partition will be mounted ext2, unless you explicitly specify ext3.
The script fun_plug.sh is called by /usr/sbin/fun_plugd.sh, which is called by /usr/sbin/sxsambaconf, which is called each time an usb disk is inserted/pulled.
/usr/sbin/fun_plugd.sh checks for the existence of an executable /root/fun_plugd.sh, and if it exists, it passes execution to that script. So if you want your own functionality on inserting usb disks, you can hook the script this way.
nfsd
To share directories using nfs, create a suitable /etc/exports file, and call '/etc/rc.d/rc.nfsd start'
nfs
You can mount external nfs shares:
Code: Select all
modprobe nfs
mkdir -p /mnt/mymountpoint
mount server:/share /mnt/mymountpoint -o nolock,vers=2
cifs,smbfs
You can mount external samba shares:
Code: Select all
modprobe cifs
mkdir -p /mnt/mymountpoint
mount //server/share /mnt/mymountpoint -o user=username,pass=password
booting from usb, nfs (wired only)
You can add a line 'boot=usb' or 'boot=nfs,clientip,gateway,server:/share' to /etc/sysconfig/system.conf. Now press any 'Save' button in the webinterface, and the setting will be stored.
But first create a bootable filesystem. Mount the share or usb-disk (ext2/3), and copy the flash contents:
Code: Select all
cp -a /.rootfs/* /mnt/mymountpoint
mkdir -p /mnt/mymountpoint/.rootfs
Now create an executable script /mnt/mymountpoint/boot/boot.sh:
Code: Select all
#!/bin/sh
# move the /proc mount
/bin/mount --move /proc /.rootfs/proc
# pivot
cd /.rootfs
pivot_root . .rootfs
# Pass execution to new rootfs
exec /bin/busybox init
On boot /sbin/init (a script) will mount the filesystem on /.rootfs, and if an executable /boot/boot.sh exists, execution will be passed to that script.
usb sound
Code: Select all
modprobe snd-usb-audio
modprobe snd-pcm-oss
modprobe snd-mixer-oss
madplay music.mp3
'optware'
Unfortunately I wasn't able to find a suitable optware feed. There are enough feeds for mipsel (little endian), but not for mips.
But I found this. This exact instructions didn't work, for some reason LD_LIBRARY_PATH doesn't work.
But I found a work-around. I created a script joindirectories.sh, which makes it possible to 'add' the openwrt libraries to /usr/lib and /lib.
An example, installing midnight commander:
Mount an ext2/3 or nfs filesystem on /opt (which is a symlink to /tmpfs/opt):
Code: Select all
mkdir -p /tmpfs/opt
mount whatever /opt
Code: Select all
cd /opt
wget http://downloads.openwrt.org/backfire/10.03.1-rc6/ar71xx/packages/opkg_576-2_ar71xx.ipk
tar xzf opkg_576-2_ar71xx.ipk
tar xzf data.tar.gz
rm control.tar.gz data.tar.gz opkg_576-2_ar71xx.ipk
wget http://downloads.openwrt.org/backfire/10.03.1-rc6/ar71xx/packages/libc_0.9.30.1-43.29_ar71xx.ipk
tar xzf libc_0.9.30.1-43.29_ar71xx.ipk
tar xzf data.tar.gz
rm control.tar.gz data.tar.gz libc_0.9.30.1-43.29_ar71xx.ipk
wget http://downloads.openwrt.org/backfire/10.03.1-rc6/ar71xx/packages/libgcc_4.3.3+cs-43.29_ar71xx.ipk
tar xzf libgcc_4.3.3\+cs-43.29_ar71xx.ipk
tar xzf data.tar.gz
rm control.tar.gz data.tar.gz libgcc_4.3.3\+cs-43.29_ar71xx.ipk
joindirectories.sh /opt/lib /lib
Code: Select all
src/gz snapshots http://downloads.openwrt.org/backfire/10.03.1-rc6/ar71xx/packages/
dest root /opt
dest ram /tmp
lists_dir ext /tmp/var/opkg-lists
Code: Select all
/opt/bin/opkg update
/opt/bin/opkg install mc
Code: Select all
joindirectories.sh /opt/lib /lib
Code: Select all
joindirectories.sh /opt/usr/lib /usr/lib
joindirectories.sh /opt/usr/share /usr/share
On next boot you'll have to rejoin, and re-create the /etc/opkg.conf file. But of course you can use a fun_plug.sh script for that. (You'll need it anyway to mount the /opt filesystem). You might want to edit /etc/profile to add /opt/bin, /opt/sbin, /opt/usr/bin and /opt/usr/sbin to the PATH.
Joining directories will take some memory. Not much, a tmpfs is mounted on the target directory, containing symlinks to the original files in squashfs, and symlinks to the /opt files are added.
This trick will work until you've got conflicting libraries, or the tmpfs takes too much memory. (You could add swap, of course)
Disabling features
You can disable telnetd, dropbear and/or fun_plug, if desired. Add the line 'disable=telnetd,fun_plug' to /etc/sysconfig/system.conf. Now press any 'Save' button in the webinterface, and the setting will be stored. On reboot telnetd and fun_plug will be disabled.
telnetd and dropbear are disabled by removing their line from /etc/inetd.conf. fun_plug is disabled by creating an empty script /root/fun_plugd.sh.
If you disable all, you will have to factory reset to get it back.