Author
Message
Sandhawk DD-WRT Novice Joined: 27 Jul 2009 Posts: 16
Posted: Mon Jul 27, 2009 3:17 Post subject: Optware MMC Install - WRT54G-TM - DD-WRT v24-sp2 (07/21/09)
Man I feel retarded for not figuring this out, but it looks like I need some help
First off, I'm running build 12533 (mega) on a WRT54G-TM with 2gb SD mod. The sdcard mounts fine to /mmc and I'm able to create /mmc/opt and mount -o bind /opt
I've tried both manually installing optware, and using the install script located on the wiki
http://www.dd-wrt.com/wiki/index.php/Optware
It seems that no matter what I try, when trying "ipkg update" it simply does nothing
and when trying to ipkg install / ipkg-opt install, it tells me to run ipkg update.
Description:
Filesize:
1.64 KB
Viewed:
15572 Time(s)
Back to top
Sponsor
DHC_DarkShadow DD-WRT Guru Joined: 22 Jun 2008 Posts: 2440 Location: Am now Dark_Shadow
Back to top
Sandhawk DD-WRT Novice Joined: 27 Jul 2009 Posts: 16
Back to top
DHC_DarkShadow DD-WRT Guru Joined: 22 Jun 2008 Posts: 2440 Location: Am now Dark_Shadow
Posted: Mon Jul 27, 2009 4:13 Post subject:
Once you bind /mmc/opt to /opt you should only have to use /opt, right? Cause the bind command tells the kernal the path so it knows were to go when just /opt is mentioned. Hell, I could be way off base. I am a linux n00b.
_________________The New Me
Back to top
Sandhawk DD-WRT Novice Joined: 27 Jul 2009 Posts: 16
Posted: Mon Jul 27, 2009 4:21 Post subject:
DHC_DarkShadow wrote: Once you bind /mmc/opt to /opt you should only have to use /opt, right? Cause the bind command tells the kernal the path so it knows were to go when just /opt is mentioned. Hell, I could be way off base. I am a linux n00b.
Yep binding /mmc/opt to /opt would last until reboot I believe, I added it to my startup script so I wouldnt have to type it all the time
Back to top
DHC_DarkShadow DD-WRT Guru Joined: 22 Jun 2008 Posts: 2440 Location: Am now Dark_Shadow
Posted: Mon Jul 27, 2009 4:24 Post subject:
In mount -o bind /jffs/opt /opt What is the -o for?
I got it to work but with the -o in there it doesn't recognized opt on the mmc.
_________________The New Me
Back to top
Sandhawk DD-WRT Novice Joined: 27 Jul 2009 Posts: 16
Posted: Mon Jul 27, 2009 4:30 Post subject:
DHC_DarkShadow wrote: In mount -o bind /jffs/opt /opt What is the -o for?
I got it to work but with the -o in there it doesn't recognized opt on the mmc.
I could be wrong, but I think the -o bind is because you're mounting it in two places. At /jffs/opt and at /opt
Is your opt folder on jffs? I have mine located on /mmc which seems to be the root of my problem
Back to top
DHC_DarkShadow DD-WRT Guru Joined: 22 Jun 2008 Posts: 2440 Location: Am now Dark_Shadow
Posted: Mon Jul 27, 2009 4:31 Post subject:
got it, you have to be in the /opt directory before you execute sh /tmp/optware-install.sh
_________________The New Me
Back to top
DHC_DarkShadow DD-WRT Guru Joined: 22 Jun 2008 Posts: 2440 Location: Am now Dark_Shadow
Posted: Mon Jul 27, 2009 4:45 Post subject:
I am also getting the feeling that after you mount jffs everything else should be mounted in it. I got...
/mmc/jffs
/mmc/opt
/mmc/ipkg
And I think it should be...
/mmc/jffs
/mmc/jffs/opt
It creates the ipkg directory itself.
So ..
mount --bind /mmc/jffs /jffs
mount -o bind /mmc/opt /opt
mount --bind /mmc/ipkg /ipkg
or
mount --bind /mmc/jffs /jffs
mount --bind /mmc/jffs/opt /opt
_________________The New Me
Back to top
DHC_DarkShadow DD-WRT Guru Joined: 22 Jun 2008 Posts: 2440 Location: Am now Dark_Shadow
Posted: Mon Jul 27, 2009 5:20 Post subject:
Should jffs be mounted twice?
Description:
Filesize:
23 KB
Viewed:
15528 Time(s)
_________________The New Me
Back to top
Sandhawk DD-WRT Novice Joined: 27 Jul 2009 Posts: 16
Posted: Mon Jul 27, 2009 5:36 Post subject:
Well I finally got mine working, Ill try to explain what I did.
First off I started with a freshly formatted ext3 partition /dev/mmc/disc0/part1
I enabled MMC support and JFFS2 support in the web gui...restarted the router
Then
mkdir /mmc/jffs
mount --bind /mmc/jffs /jffs
nvram set sys_enable_jffs2=1
mkdir /jffs/tmp
mkdir /jffs/tmp/ipkg
mkdir /jffs/opt
mount -o bind /jffs/opt /opt
wget http://www.3iii.dk/linux/optware/optware-install-ddwrt.sh -O - | tr -d '\r' > /tmp/optware-install.sh
sh /tmp/optware-install.sh
ipkg update
/opt/bin/ipkg-opt update
/opt/bin/ipkg-opt install busybox
(Setup 64mb swap partition)
/opt/bin/busybox swapon /dev/mmc/disc0/part2
And I also added this to my startup.script
mount --bind /mmc/jffs /jffs
mount -o bind /jffs/opt /opt
/opt/bin/busybox swapon /dev/mmc/disc0/part2
Hope this helps!
Back to top
Sandhawk DD-WRT Novice Joined: 27 Jul 2009 Posts: 16
Posted: Mon Jul 27, 2009 5:38 Post subject:
DHC_DarkShadow wrote: Should jffs be mounted twice?
Yes, the first mount dev/mtdblock/4 is your routers flash memory, the second mount is the symlink to your /mmc/
Back to top
Sandhawk DD-WRT Novice Joined: 27 Jul 2009 Posts: 16
Posted: Mon Jul 27, 2009 5:52 Post subject:
I added this to my shutdown.script
/opt/bin/busybox swapoff /dev/mmc/disc0/part2
umount /mmc/jffs /jffs
umount /jffs/opt /opt
If anyone has a better way of doing this, feel free to correct me
Back to top
DHC_DarkShadow DD-WRT Guru Joined: 22 Jun 2008 Posts: 2440 Location: Am now Dark_Shadow
Posted: Mon Jul 27, 2009 5:59 Post subject:
whats the purpose of the shutdown script? Why would you want to unmount those?
_________________The New Me
Back to top
Sandhawk DD-WRT Novice Joined: 27 Jul 2009 Posts: 16
Posted: Mon Jul 27, 2009 6:01 Post subject:
DHC_DarkShadow wrote: whats the purpose of the shutdown script? Why would you want to unmount those?
I noticed that when I rebooted the router without unmounting those directories my busybox utilities were corrupt. I'm not sure the cause yet but I haven't had the same problem since unmounting before rebooting.
Back to top