[Howto] Install Optware on Atheros units (such as WNDR3700)

Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware
Goto page Previous  1, 2, 3 ... 19, 20, 21 ... 29, 30, 31  Next
Author Message
lievenco
DD-WRT Novice


Joined: 13 Jul 2012
Posts: 1

PostPosted: Fri Jul 13, 2012 14:02    Post subject: Reply with quote
I'm having problems with installing ipk packages on my WNDR3800 netgear router, i'm running version DD-WRT v24-sp2 (06/08/12) std
(SVN revision 19342)

I followed hole the steps but when i make the configuration file for opkg it fails Sad

after this:
cat > /etc/opkg.conf << EOF
src/gz snapshots http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages
dest root /opt
dest ram /opt/tmp
lists_dir ext /opt/tmp/var/opkg-lists
EOF

-sh: can't create /etc/opkg.conf: Read-only file system

When i look in the map /etc via WinSCP there is no file named opkg.conf also i can't chmod /etc

any body with the same problem?
I want to install a package wput, then my router can upload some file's to a FTP server. But now he only knows wget, and that is not enough ....

Please some help Smile
Sponsor
sugarcandy
DD-WRT Novice


Joined: 14 Jul 2012
Posts: 1

PostPosted: Sat Jul 14, 2012 19:17    Post subject: Reply with quote
I just found in other forum a solution to segmentation fault after running transmission-daemon.


cp /lib/libnvram.so /opt/lib/libnvram.so
mount -o bind /opt/lib /lib
transmission-daemon –f

Hope it helps.
koodawg
DD-WRT Novice


Joined: 14 Jul 2012
Posts: 1

PostPosted: Sat Jul 14, 2012 21:07    Post subject: Unknown package 'libc' Reply with quote
I've got "DD-WRT v24-sp2 (06/08/12) std" on a netgear wndr3700. I'd like to get rsync on it...

I've followed the dynek's procedure above without errors:

opkg update #works;

root@dd-wrt:~# opkg update
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/Packages.gz.
Inflating http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/Packages.gz.
Updated list of available packages in /opt/tmp/var/opkg-lists/snapshots.

opkg install libgcc #works;

root@dd-wrt:~# opkg install libgcc
Installing libgcc (4.6-linaro-1) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/libgcc_4.6-linaro-1_ar71xx.ipk.
Configuring libgcc.


But libc fails;


root@dd-wrt:~# opkg install rsync
Installing rsync (3.0.9-1) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/rsync_3.0.9-1_ar71xx.ipk.
Collected errors:
* satisfy_dependencies_for: Cannot satisfy the following dependencies for rsync:
* libc * libc *
* opkg_install_cmd: Cannot install package rsync.

root@dd-wrt:~# opkg install libc
Unknown package 'libc'.
Collected errors:
* opkg_install_cmd: Cannot install package libc.

Interestingly there is no libc when I do;

opkg list | grep libc

(just a bunch of libs that contain "libc" in the name, but no libc).

I appreciate any clues. Thanks, Mike.
martin.j
DD-WRT Novice


Joined: 22 Jul 2012
Posts: 2

PostPosted: Sun Jul 22, 2012 17:20    Post subject: Re: [Howto] Install Optware on Atheros units (such as WNDR37 Reply with quote
Quote:
Under DD-WRT’s web interface, Administration->Commands, input the following commands in the window then click "Save Startup":

#!/bin/sh

sleep 5
if [ -f /mnt/sda_part1/optware.enable ]; then
mount -o bind /mnt/sda_part1/etc /etc
mount -o bind /mnt/sda_part1/root /tmp/root
mount -o bind /mnt/sda_part1/opt /opt
else
exit
fi

if [ -d /opt/usr ]; then
export LD_LIBRARY_PATH='/opt/lib:/opt/usr/lib:/lib:/usr/lib'
export PATH='/opt/bin:/opt/usr/bin:/opt/sbin:/opt/usr/sbin:/bin:/sbin:/usr/sbin:/usr/bin'
else
exit
fi



As I'm new to DD-WRT and this forum, I just wanted to thank dynek for the simple and detailed tutorial and add a thing that came to my attention after I had completed the tutorial successfully.

I noticed that every time I make a change in the Web GUI and "apply changes" the startup script seems to run and add addidtional bind points every time.

Have a look at the output below after I made a change thru the Web GUI:
Code:
root@DD-WRT root $ mount
rootfs on / type rootfs (rw)
/dev/root on / type squashfs (ro,relatime)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
ramfs on /tmp type ramfs (rw,relatime)
none on /dev type tmpfs (rw,relatime,size=512k)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
devpts on /proc/bus/usb type usbfs (rw,relatime)
/dev/sda1 on /tmp/mnt/sda_part1 type ext2 (rw,relatime,errors=continue,user_xattr)
/dev/sda1 on /etc type ext2 (rw,relatime,errors=continue,user_xattr)
/dev/sda1 on /tmp/root type ext2 (rw,relatime,errors=continue,user_xattr)
/dev/sda1 on /opt type ext2 (rw,relatime,errors=continue,user_xattr)
/dev/sda1 on /etc type ext2 (rw,relatime,errors=continue,user_xattr)
/dev/sda1 on /tmp/root type ext2 (rw,relatime,errors=continue,user_xattr)
/dev/sda1 on /opt type ext2 (rw,relatime,errors=continue,user_xattr)

As you can see, all bind points that the script executes are added again even thou they already exists.

Therefore, I added some code to the script that checks for the bind points and skips that step if the point already exists.

Code:
#!/bin/sh

sleep 5
if [ -f /mnt/sda_part1/optware.enable ]; then
if ! mount | grep "/dev/sda1 on /etc type" >/dev/null ; then
mount -o bind /mnt/sda_part1/etc /etc
fi
if ! mount | grep "/dev/sda1 on /tmp/root type" >/dev/null ; then
mount -o bind /mnt/sda_part1/root /tmp/root
fi
if ! mount | grep "/dev/sda1 on /opt type" >/dev/null ; then
mount -o bind /mnt/sda_part1/opt /opt
fi
else
exit
fi

if [ -d /opt/usr ]; then
export LD_LIBRARY_PATH='/opt/lib:/opt/usr/lib:/lib:/usr/lib'
export PATH='/opt/bin:/opt/usr/bin:/opt/sbin:/opt/usr/sbin:/bin:/sbin:/usr/sbin:/usr/bin'
else
exit
fi


This could probably be refined a bit more as I'm no guru in bourne scripting but it seems to work fine for me.

EDIT: I'm running DD-WRT v24-sp2 (06/08/12) std (19342) on a WNDR3700 v1. //EDIT
wuhtzu
DD-WRT User


Joined: 05 Sep 2011
Posts: 50

PostPosted: Sat Jul 28, 2012 9:40    Post subject: Re: WNDR3700 v1 using DD-WRT v24-sp2 (03/19/12) std r18777 Reply with quote
fusiooon wrote:
This is an excellent tutorial, thank you dynek!!
.
.
.


I have followed dynek's tutorial with my TP-Link WR1043ND and, as fusiooon found out and posted, I found that there was a new version of libc:

http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/libc_0.9.33.2-1_ar71xx.ipk

As fusiooon I went ahead and tried to install it with ipkg in step 5. This, not surprisingly, ended up giving me the same error as fusiooon when I install packages:
Code:
root@Colding-Dev root $ opkg install bash
Installing bash (4.2-3) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/bash_4.2-3_ar71xx.ipk.
Collected errors:
 * satisfy_dependencies_for: Cannot satisfy the following dependencies for bash:
 *      libc *  libc *  libc *
 * opkg_install_cmd: Cannot install package bash.


fusiooon's fix works perfectly. Install libc using opkg in/after step 8:

Code:
cd /tmp
wget http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/libc_0.9.33.2-1_ar71xx.ipk
opkg install libc_0.9.33.2-1_ar71xx.ipk

resulting in:
Code:
Installing libc (0.9.33.2-1) to root...
Installing libgcc (4.6-linaro-1) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/libgcc_4.6-linaro-1_ar71xx.ipk.
Configuring libgcc.
Configuring libc.


and now packages installs nicely

Code:
root@Colding-Dev /tmp $ opkg install bash
Installing bash (4.2-3) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/bash_4.2-3_ar71xx.ipk.
Installing libncurses (5.7-5) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/libncurses_5.7-5_ar71xx.ipk.
Installing terminfo (5.7-5) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/terminfo_5.7-5_ar71xx.ipk.
Configuring terminfo.
Configuring libncurses.
Configuring bash.


Thank you dynek for this very easy to follow tutorial!
wuhtzu
DD-WRT User


Joined: 05 Sep 2011
Posts: 50

PostPosted: Sat Jul 28, 2012 9:50    Post subject: Re: [Howto] Install Optware on Atheros units (such as WNDR37 Reply with quote
I cannot replicate what you find martin.j. When I click "Apply settings" or "Save" no additional mount points are created.

I am using DD-WRT v24-sp2 (03/15/12) std - build 18740 on my TP-Link WR1043ND. It might be a bug in your build or ofcourse I could be unable to detect it. I am no linux guru Smile

martin.j wrote:
Quote:
Under DD-WRT’s web interface, Administration->Commands, input the following commands in the window then click "Save Startup":

#!/bin/sh

sleep 5
if [ -f /mnt/sda_part1/optware.enable ]; then
mount -o bind /mnt/sda_part1/etc /etc
mount -o bind /mnt/sda_part1/root /tmp/root
mount -o bind /mnt/sda_part1/opt /opt
else
exit
fi

if [ -d /opt/usr ]; then
export LD_LIBRARY_PATH='/opt/lib:/opt/usr/lib:/lib:/usr/lib'
export PATH='/opt/bin:/opt/usr/bin:/opt/sbin:/opt/usr/sbin:/bin:/sbin:/usr/sbin:/usr/bin'
else
exit
fi



As I'm new to DD-WRT and this forum, I just wanted to thank dynek for the simple and detailed tutorial and add a thing that came to my attention after I had completed the tutorial successfully.

I noticed that every time I make a change in the Web GUI and "apply changes" the startup script seems to run and add addidtional bind points every time.

Have a look at the output below after I made a change thru the Web GUI:
Code:
root@DD-WRT root $ mount
rootfs on / type rootfs (rw)
/dev/root on / type squashfs (ro,relatime)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
ramfs on /tmp type ramfs (rw,relatime)
none on /dev type tmpfs (rw,relatime,size=512k)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
devpts on /proc/bus/usb type usbfs (rw,relatime)
/dev/sda1 on /tmp/mnt/sda_part1 type ext2 (rw,relatime,errors=continue,user_xattr)
/dev/sda1 on /etc type ext2 (rw,relatime,errors=continue,user_xattr)
/dev/sda1 on /tmp/root type ext2 (rw,relatime,errors=continue,user_xattr)
/dev/sda1 on /opt type ext2 (rw,relatime,errors=continue,user_xattr)
/dev/sda1 on /etc type ext2 (rw,relatime,errors=continue,user_xattr)
/dev/sda1 on /tmp/root type ext2 (rw,relatime,errors=continue,user_xattr)
/dev/sda1 on /opt type ext2 (rw,relatime,errors=continue,user_xattr)

As you can see, all bind points that the script executes are added again even thou they already exists.

Therefore, I added some code to the script that checks for the bind points and skips that step if the point already exists.

Code:
#!/bin/sh

sleep 5
if [ -f /mnt/sda_part1/optware.enable ]; then
if ! mount | grep "/dev/sda1 on /etc type" >/dev/null ; then
mount -o bind /mnt/sda_part1/etc /etc
fi
if ! mount | grep "/dev/sda1 on /tmp/root type" >/dev/null ; then
mount -o bind /mnt/sda_part1/root /tmp/root
fi
if ! mount | grep "/dev/sda1 on /opt type" >/dev/null ; then
mount -o bind /mnt/sda_part1/opt /opt
fi
else
exit
fi

if [ -d /opt/usr ]; then
export LD_LIBRARY_PATH='/opt/lib:/opt/usr/lib:/lib:/usr/lib'
export PATH='/opt/bin:/opt/usr/bin:/opt/sbin:/opt/usr/sbin:/bin:/sbin:/usr/sbin:/usr/bin'
else
exit
fi


This could probably be refined a bit more as I'm no guru in bourne scripting but it seems to work fine for me.

EDIT: I'm running DD-WRT v24-sp2 (06/08/12) std (19342) on a WNDR3700 v1. //EDIT
martin.j
DD-WRT Novice


Joined: 22 Jul 2012
Posts: 2

PostPosted: Sun Jul 29, 2012 21:19    Post subject: Re: [Howto] Install Optware on Atheros units (such as WNDR37 Reply with quote
wuhtzu: Thanks for taking the time to try it out. The build I'm running could indeed be the issue or something I did as I consider myself as a complete noob here...

I'll try the most recent build (released a few days ago) but that have to wait a while. Just wanted to give some input if others notice the same behaviour.

The changes to the startup script have solved it for me for now and I'm happy. :LOL:

wuhtzu wrote:
I cannot replicate what you find martin.j. When I click "Apply settings" or "Save" no additional mount points are created.

I am using DD-WRT v24-sp2 (03/15/12) std - build 18740 on my TP-Link WR1043ND. It might be a bug in your build or ofcourse I could be unable to detect it. I am no linux guru Smile

_________________
WNDR3700 V1 DD-WRT v24-sp2 (06/08/12) std - build 19342
HMkX2
DD-WRT Novice


Joined: 29 Jul 2012
Posts: 20

PostPosted: Mon Jul 30, 2012 22:13    Post subject: Update for Broadcom Units Reply with quote
Dynek, thanks for the tutorial. I've automated it with scripts to fix the Gob64 Symbol errors, and edited it for Broadcom units. (You can edit in athxxx back in to get it working for Atheros again.) Link to the scripts/tutorial here:

HOWTO: Install Optware on Broadcom (or any other) units
http://www.dd-wrt.com/phpBB2/viewtopic.php?p=704255

HMkX2 CORE F6BC 6626 F92A A8F6 72C3 5B4A A301 BF44 08B7 042D
erco
DD-WRT Novice


Joined: 03 Aug 2012
Posts: 2

PostPosted: Sat Aug 04, 2012 2:36    Post subject: opkg: can't resolve symbol 'glob64' in lib 'opkg'. Reply with quote
I tried all de solutions in this thread but not works.

Tplink 1043nd build 18777

Someone can help me?

Thanks.
sulliwane
DD-WRT Novice


Joined: 07 Aug 2012
Posts: 1

PostPosted: Tue Aug 07, 2012 9:44    Post subject: opkg doesn't install on my TL-WR1043ND Reply with quote
Code:

#cd /tmp
#wget #http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/libc_0.9.33.2-1_ar71xx.ipk
wget #http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/opkg_618-2_ar71xx.ipk
ipkg install libc_0.9.33.2-1_ar71xx.ipk opkg_618-2_ar71xx.ipk

and I got this error message :
Quote:
ERROR: File not found: //usr/local/lib/ipkg/lists/whiterussian
You probably want to run `ipkg update'
ERROR: File not found: //usr/local/lib/ipkg/lists/non-free
You probably want to run `ipkg update'
ERROR: File not found: //usr/local/lib/ipkg/lists/backports
You probably want to run `ipkg update'
/bin/ipkg: line 1184: sort: not found


Do someone has experienced it and found a solution ?

Thank you ! Very Happy

Firmware: DD-WRT v24-sp2 (08/07/10) std

EDIT : here is a great summary that worked for me http://arouter.blogspot.fr/2011/07/software-installation-on-dd-wrt.html

modified commands :
wget http://downloads.openwrt.org/backfire/10.03.1-rc4/ar71xx/packages/libc_0.9.30.1-43.10_ar71xx.ipk
wget http://downloads.openwrt.org/backfire/10.03.1-rc4/ar71xx/packages/opkg_576-1_ar71xx.ipk
ipkg install libc_0.9.30.1-43.10_ar71xx.ipk opkg_576-1_ar71xx.ipk
dryce
DD-WRT Novice


Joined: 11 Aug 2012
Posts: 4

PostPosted: Sat Aug 11, 2012 2:09    Post subject: Read Only File System Reply with quote
I haven't been able to make any of the required directories due to this error. How can I fix this? Thanks.
dryce
DD-WRT Novice


Joined: 11 Aug 2012
Posts: 4

PostPosted: Sat Aug 11, 2012 16:14    Post subject: Reply with quote
Turns out the USB drive was not mounting properly. Once I disabled Auto Drive Mount under Services > USB and put the startup script into Administration > Command I was able to complete the tutorial.


b. Set USB Support
Under Services->USB tab. Will disable “Automatic Drive Mount” here. After that, click “Apply Settings”usb-enable

http://lh6.ggpht.com/_g-JnOWjedOQ/TCMq6b2RRfI/AAAAAAAAABQ/H1v9TvAJHGc/s1600-h/usb-enable%5B5%5D.gif

Now plug in the USB drive and reboot the router.

Code:
#!/bin/sh
sleep 5

#mount -t ext3 -o noatime /dev/discs/disc0/disc /mnt
#mount -t ext3 -o noatime /dev/sda /mnt
#mount -t ext3 -o noatime /dev/sda1 /mnt
#mount -t ext3 -o noatime /dev/discs/disc0/part1 /mnt
#mount -t ext2 /dev/discs/disc0/disc /mnt
#mount -t ext2 /dev/discs/disc0/part1 /mnt
#!!!! This is only needed for manual drive mounting !!!

sleep 2
if [ -f /mnt/optware.enable ]; then
mount -o bind /mnt/etc /etc
mount -o bind /mnt/root /tmp/root
mount -o bind /mnt/opt /opt
else
exit
fi
if [ -d /opt/usr ]; then
export LD_LIBRARY_PATH='/opt/lib:/opt/usr/lib:/lib:/usr/lib'
export PATH='/opt/bin:/opt/usr/bin:/opt/sbin:/opt/usr/sbin:/bin:/sbin:/usr/sbin:/usr/bin'
else
exit
fi


Mount code for the USB drive
Type the command in PuTTY or telnet window
ls /dev/discs/disc0/
and the result might look like this

http://lh6.ggpht.com/_g-JnOWjedOQ/TCMq8C36rjI/AAAAAAAAABY/9cQhg8p6zKg/disc-partitions%5B5%5D.gif?imgmax=800

Now here is the tricky part. If you’re using a USB flash drive with only one partition, most likely, you will only see “disc” but not “part1” and “part2”. If you’re using a USB HDD with multi partitions you might expect an output similar to mine. Both are OK.

If you see “disc” only, use the command line below to mount an ext3 USB drive to /mnt
mount -t ext3 -o noatime /dev/discs/disc0/disc /mnt
*Use mount -t ext2 /dev/discs/disc0/disc /mnt for ext2 drive

For USB drive with multi partition, the command below will mount the first partition to /mnt. Adjust accordingly.
mount -t ext3 -o noatime /dev/discs/disc0/part1 /mnt
*Use mount -t ext2 /dev/discs/disc0/part1 /mnt for ext2 partition

I have a single ext2 partition so I used mount -t ext2 /dev/discs/disc0/part1 /mnt

Hope this helps. It took me a little while to connect the dots.
Tacoos
DD-WRT Novice


Joined: 26 Aug 2012
Posts: 1

PostPosted: Sun Aug 26, 2012 19:04    Post subject: Reply with quote
Maybe i made some dumb mistake here but when i:
wget http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/libc_0.9.33.2-1_ar71xx.ipk
wget http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/opkg_618-2_ar71xx.ipk
ipkg install libc_0.9.33.2-1_ar71xx.ipk opkg_618-2_ar71xx.ipk

i only get:
File not found libc_0.9.30.1-43.10_ar71xx.ipk
File not found opkg_576-1_ar71xx.ipk

if they are supposed to be written in /tmp, they are indeed not there?
What's wrong?
wuhtzu
DD-WRT User


Joined: 05 Sep 2011
Posts: 50

PostPosted: Fri Aug 31, 2012 0:02    Post subject: Reply with quote
Tacoos wrote:
Maybe i made some dumb mistake here but when i:
wget http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/libc_0.9.33.2-1_ar71xx.ipk
wget http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/opkg_618-2_ar71xx.ipk
ipkg install libc_0.9.33.2-1_ar71xx.ipk opkg_618-2_ar71xx.ipk

i only get:
File not found libc_0.9.30.1-43.10_ar71xx.ipk
File not found opkg_576-1_ar71xx.ipk

if they are supposed to be written in /tmp, they are indeed not there?
What's wrong?


You do not mention changing directory to /tmp (cd /tmp). How ever it shouldn't matter where you download your files as long as you are in that directory when you call the ipkg install command.

Please try to verify that the ipk-files are actually in the dir you were in when you ran the wget commando by running the "ls -la" command to list files in current dir.
wuhtzu
DD-WRT User


Joined: 05 Sep 2011
Posts: 50

PostPosted: Fri Aug 31, 2012 0:07    Post subject: Reply with quote
Sort of forget what I originally wrote in this post (see below). What I stated about further start up commands not being issued if optware was turned off is true. I have however learned that larger scripts needed at startup (or other events) should be placed elsewhere. So, maybe, never mind...



- - - - - Original post - - - - -
Am I the only one who thinks these "else exit"'s are not needed and/or not particularly well placed?
Code:
#!/bin/sh

sleep 5
if [ -f /mnt/sda_part1/optware.enable ]; then
mount -o bind /mnt/sda_part1/etc /etc
mount -o bind /mnt/sda_part1/root /tmp/root
mount -o bind /mnt/sda_part1/opt /opt
else
exit
fi

if [ -d /opt/usr ]; then
export LD_LIBRARY_PATH='/opt/lib:/opt/usr/lib:/lib:/usr/lib'
export PATH='/opt/bin:/opt/usr/bin:/opt/sbin:/opt/usr/sbin:/bin:/sbin:/usr/sbin:/usr/bin'
else
exit
fi


They will prevent further start up scripts (placed below the the above code) from executing in case optware is disabled. If optware is disabled the first exit will be reached and the rest of the startup script will not execute... This could cause some annoying debug time for people not noticing...
Goto page Previous  1, 2, 3 ... 19, 20, 21 ... 29, 30, 31  Next Display posts from previous:    Page 20 of 31
Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum