為方便日後可能要重設,我把步驟記下來了。
首先是需要找到乎合自己 rom:
這裏的清單列出了不同版本的功能,我跟據自己的需要選了 v24-sp2 big。
安裝好之後發現了一個問題,就是無法做 port forwarding 了!
這弄了網上找了一整天發現了這則解答,至於原理是什麼我自己也看得一頭霧水。嘛總之問題解決了就好了。
以下是需要複製的代碼:
insmod ipt_mark
insmod xt_mark
iptables -t mangle -A PREROUTING -i ! `get_wanface` -d `nvram get wan_ipaddr` -j MARK --set-mark 0xd001
iptables -t mangle -A PREROUTING -j CONNMARK --save-mark
iptables -t nat -A POSTROUTING -m mark --mark 0xd001 -j MASQUERADE
Aug 13 20:11:23 192.168.1.1 kernel: hub 2-1:1.0: USB hub found
Aug 13 20:11:23 192.168.1.1 kernel: hub 2-1:1.0: 4 ports detected
Aug 13 20:07:24 192.168.1.1 kernel: usb 1-1: new high speed USB device using ehci_hcd and address 2
Aug 13 20:07:24 192.168.1.1 kernel: usb 1-1: configuration #1 chosen from 1 choice
Aug 13 21:21:42 192.168.1.1 kernel: ext3: Unknown symbol journal_force_commit
Aug 13 21:21:42 192.168.1.1 kernel: ext3: Unknown symbol journal_dirty_data
Aug 13 21:21:42 192.168.1.1 kernel: ext3: Unknown symbol journal_force_commit_nested
Aug 13 21:21:42 192.168.1.1 kernel: ext3: Unknown symbol mb_cache_create
Aug 13 21:21:42 192.168.1.1 kernel: ext3: Unknown symbol journal_init_dev
Aug 13 21:21:42 192.168.1.1 kernel: ext3: Unknown symbol journal_dirty_metadata
Aug 13 21:21:42 192.168.1.1 kernel: ext3: Unknown symbol journal_forget
Aug 13 21:21:42 192.168.1.1 kernel: ext3: Unknown symbol journal_wipe
Aug 13 21:21:42 192.168.1.1 kernel: ext3: Unknown symbol journal_blocks_per_page
...
insmod mbcache
insmod jbd
insmod ext3
Aug 13 21:38:36 192.168.1.1 kernel: kjournald starting. Commit interval 5 seconds
Aug 13 21:38:37 192.168.1.1 kernel: EXT3 FS on sda1, internal journal
Aug 13 21:38:37 192.168.1.1 kernel: EXT3-fs: mounted filesystem with ordered data mode.
#!/bin/sh
# 1. install necessary mod for mounting ext3
insmod mbcache
insmod jbd
insmod ext3
# 2. Mount partition 1 as /mnt folder - then wait for the drive to mount
mount -t ext3 /dev/scsi/host0/bus0/target0/lun0/part1 /mnt
sleep 5
mount /mnt/jffs /jffs
# 3. Printer driver
# Laser
/jffs/usr/sbin/p910nd -b -f /dev/usb/lp0 0
# 4. set path so optware binaries are automatically found as new commands
echo "export PATH=$PATH:/opt/bin:/opt/sbin" > /tmp/root/.profile
echo "export IPKG_CONF_DIR=/jffs/etc" >> /tmp/root/.profile
export PATH=$PATH:/opt/bin:/opt/sbin
Aug 28 08:58:55 192.168.1.1 kernel: usb 1-1.2: new full speed USB device using ehci_hcd and address 5
Aug 28 08:58:55 192.168.1.1 kernel: usb 1-1.2: configuration #1 chosen from 1 choice
Aug 28 08:58:55 192.168.1.1 kernel: usblp0: USB Bidirectional printer dev 5 if 0 alt 0 proto 2 vid 0x04E8 pid 0x3301
ipkg install p910nd