write down,forget

dd-wrt u盘 脱机 amule 改造全纪录

<Category: Wireless, 乱搞> 查看评论

U盘挂载

设置u盘挂载目录(此处为/mnt),服务-》usb-》该打的都打钩,fat文件系统和usb
插入u盘或读卡器(内有卡,废话)
启用jffs,管理-》jffs2-》启用
putty登入路由

u盘分两个区,第一个分区64mswap格式,第二个ext3格式

1.停用自动挂载磁盘 服务-》usb

umount /mnt

mount -o noatime /dev/scsi/host0/bus0/target0/lun0/part2 /mnt

2.下载opt相关程序
wget http://oleg-for-mss-base.googlecode.com/files/opt.tar.gz

cd /mnt/jffs
tar zxvf opt.tar.gz
3.路由器,开机脚本
umount /mnt
mount -o noatime /dev/scsi/host0/bus0/target0/lun0/part2 /mnt
umount  /jffs
umount /opt
mount  –bind /mnt/jffs /jffs
mount  –bind /jffs/opt /opt

4.安装busybox
ipkg install busybox

4.vi /opt/conf/ipkg.conf
添加源 src http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable/
/opt/bin/ipkg update
注意,现在的新的执行程序为路径/opt/bin/ipkg,不要和/bin下的混淆

5.设置swap
文件方式的swap
/opt/bin/ipkg install e2fsprogs swap-utils
mkswap /mnt/swapfile
swapon /mnt/swapfile

之前分区格式为fat32,导致拷进去的Linux程序不能执行
果然:   FAT分区的默认codepage为cp936,cp936是简体中文的内码序列表;而Linux仅支持utf-8编码;
参考:http://www.oschina.net/bbs/thread/7033
usb 格式化
http://www.dd-wrt.com/wiki/index.php/How_to_-_Format_and_Partition_External_Storage_Device
http://www.dd-wrt.com/wiki/index.php/USB_storage

optware
http://www.nslu2-linux.org/wiki/FAQ/Optware-uClibcBuild

dd-wrt
http://www.dd-wrt.com/wiki/index.php/Development

参考:http://www.dd-wrt.com/wiki/index.php/Journalling_Flash_File_System

分区格式化u盘
此时优盘处于使用状态,如果想格式化优盘,先得将u盘卸载
fdisk -l
mkfs -V -t ext3 /dev/scsi/host0/bus0/target0/lun0/part1

 usb_support

ipkg list

amule

重新格式化u盘后的图

usb_support1

amule马上就要成功了,看似有个错误

root@INFINITBYTE:/opt/etc# amuled
amuled: OnInit – starting timer
Initialising aMuled 2.2.6 using  v2.8.10
Checking if there is an instance already running…
No other instances are running.
ERROR: WARNING Warning! You are running aMule as root.
Doing so is not recommended for security reasons,
and you are advised to run aMule as an normal
user instead.

————————————————–
Warning! You are running aMule as root.
Doing so is not recommended for security reasons,
and you are advised to run aMule as an normal
user instead.
————————————————–

ERROR: Info  — This is the first time you run aMule 2.2.6 —
More information, support and new releases can found at our homepage,
at www.aMule.org, or in our IRC channel #aMule at irc.freenode.net.

Feel free to report any bugs to http://forum.amule.org
ListenSocket: Ok.
HTTP download thread started
Loading temp files from /tmp/root/.aMule/Temp.

All PartFiles Loaded.
No shareable files found in directory: /tmp/root/.aMule/Incoming

ERROR: aMule daemon cannot be used when external connections are disabled. To enable External Connections, use either a normal aMule, start amuled with the option –ec-config or set the key”AcceptExternalConnections” to 1 in the file ~/.aMule/amule.conf

Now, exiting main app…
aMule OnExit: Terminating core.
aMule shutdown completed.

 

参照这里解决问题:http://www.docin.com/p-37590128.html

export HOME=/opt/share/amule   加到启动脚本

vi amule.conf

wget http://www.emule.org.cn/server.met

/opt/share/amule/temp incoming

echo -n yourpassword |md5sum |cut -d ” -f 1

 amuled -f

/opt/etc/init.d/S57amuled restart

web:192.168.1.1:4711

RESULT:

ListenSocket: Ok.
HTTP download thread started
Loading temp files from /opt/share/amule/temp.

All PartFiles Loaded.
No shareable files found in directory: /opt/share/amule/incoming
amuleweb: can’t load library ‘libreadline.so.6’
ERROR: ERROR You requested to run web server on startup, but the amuleweb binary cannot be run. Please install the package containing aMule web server, or compile aMule using –enable-webserver and run make install
Host: amule.sourceforge.net:80
URL: http://amule.sourceforge.net/lastversion
Response: 200 (Error: 0)
Download size: 6

web界面启动报错:amuleweb: can’t load library ‘libreadline.so.6’
执行安装readline
/opt/bin/ipkg install readline

web访问地址:http://192.168.1.1:4711/

amule3

本文来自: dd-wrt u盘 脱机 amule 改造全纪录