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

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


Joined: 23 Dec 2014
Posts: 6

PostPosted: Tue Dec 23, 2014 7:56    Post subject: Re: [Howto] Install Optware on Atheros units (such as WNDR37 Reply with quote
Hi all!

I am relatively new to coding and I cant say I know much. Still I venture into the depths of libs and dirs and sudos to make my life even harder lol.

In essence what do I want to obtain:

1. I have a WR1043ND v2.1 router
2. I flashed a DD-WRT firmware on it.
3. I have an external 2TB HDD with USB attached
4. I want to create a fully working Media Center from which I can stream video to other devices (TV, BluRay) and download movies onto from my computers.

So far so good - I can get everything to work. Boosted my speeds to nearly 85 Mbits wirelessly on D and 74Mbits on U.

BUT here comes the trouble - I cant get anything installed on the router as I am failing to understand (My lack of knowledge comes in here) how to get anything on it.


I tried with the HDD - I cant seem to be able to format it properly and fear losing data.

I repeated everything, this time with a USB flash drive of 1GB and it worked to a point but not afterwards.


Can someone help me out a little bit? Consider me an illiterate on the subject but strict follower so a step by step would be the best, if that does not eat too much of your time :S


dynek wrote:



1. Prepare the USB disk
Create an ext3 partition using GParted for instance - DONE

2. Configure DD-WRT
Under Services->Services->Secure Shell:
* Enable SSHd
* Click Apply Settings DONE

Under Services->USB:
* Enable Core USB Support
* Disable USB Printer Support (enable it if you need printing support)
* Enable USB Storage Support
* Enable Automatic Drive Mount
* Set Disk Mount Point to /mnt
* Click Apply Settings DONE

3. Plug the USB drive into the router and reboot it
* SSH into your box using user root and make sure, using mount, that your USB stick was mounted correctly (you can also check this on the web interface under Services->USB). DONE

4. Create and prepare necessary structure
* SSH into your box using user root if not already done at previous step:

cd /mnt
mkdir /sda_part1
cd /mnt/sda_part1
mkdir etc opt root
touch optware.enable
chmod 755 etc opt root
mkdir opt/lib
chmod 755 opt/lib
cp -a /etc/* /mnt/sda_part1/etc/
mount -o bind /mnt/sda_part1/etc /etc
mount -o bind /mnt/sda_part1/opt /jffs
DONE

5. Install the required libraries for the MIPS (big-endian) architecture and OpenWRT's opkg
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-3_ar71xx.ipk
ipkg libc_0.9.33.2-1_ar71xx.ipk opkg_618-3_ar71xx.ipk
DONE - the names changed and I searched the web for the packages so I downloaded from other sources - still they did download. I also had to specify the dir to install from as the last command would not start on its own - so all done thus far.

You will get the following output with error messages. You can't avoid it so don't worry about it.

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
Unpacking libc...Done.
Configuring libc...Done.
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
Unpacking opkg...Done.
Configuring opkg...Done.


Type the following lines to create the configuration file for opkg:

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
- DONE

Let's make sure everything works properly:

umount /jffs
mount -o bind /mnt/sda_part1/root /tmp/root
mount -o bind /mnt/sda_part1/opt /opt
export LD_LIBRARY_PATH='/opt/lib:/opt/usr/lib:/lib:/usr/lib'
opkg update
- ERROR

opgk not found it says for me Sad and for the life of me - I cant find it. So from this point downward - I cant follow the guide.

You should see:

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.


6. Set the startup script to make the changes take effect each time upon reboot

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


Note that some users have reported issues that they were able to fix by making the script sleep 10 seconds instead of 5.

7. Modification of the profile file

SSH into your box then copy/paste the commands below to PuTTY window to create a script running each time when user root logins:

cat > /mnt/sda_part1/root/.profile << EOF
export LD_LIBRARY_PATH='/opt/lib:/opt/usr/lib:/lib:/usr/lib:/opt/usr/local/lib'
export PATH='/sbin:/opt/bin:/opt/usr/bin:/opt/sbin:/opt/usr/sbin:/bin:/usr/bin:/usr/sbin:/opt/usr/local/bin'
export PS1='\[\033[01;31m\]\u@\h \[\033[01;34m\]\W \$ \[\033[00m\]'
export TERMINFO='/opt/usr/share/terminfo'
EOF


The above script will set the variables for us and also provide a nice colored command line prompt.

8. Reboot and check

Reboot your device with reboot
When it's back on the track, SSH into your box.
Run opkg update

You can start installing all kind of wild things ! Yeeehhhaaa ! Smile
Sponsor
raz3k
DD-WRT Novice


Joined: 19 Apr 2010
Posts: 5

PostPosted: Tue Dec 23, 2014 8:14    Post subject: Reply with quote
After making the optware.tar.gz i tried doing it from scratch (not updating from a previous release) and it failed in the exact same point, not being able to run opkg despite of everything i tried. I'm also eager to see if someone did it the normal way.

Cheers!
Replicante
DD-WRT Novice


Joined: 29 Dec 2012
Posts: 24

PostPosted: Tue Dec 23, 2014 22:30    Post subject: Reply with quote
raz3k wrote:
After making the optware.tar.gz i tried doing it from scratch (not updating from a previous release) and it failed in the exact same point, not being able to run opkg despite of everything i tried. I'm also eager to see if someone did it the normal way.

Cheers!


This guide work fine for me

NETGEAR WNDR3700 v1

TPLINK WDR4300 v1

New Build - 12/22/2014 - r25697

http://www.dd-wrt.com/phpBB2/viewtopic.php?t=177532
mbill
DD-WRT Novice


Joined: 28 Mar 2010
Posts: 8

PostPosted: Sun Jan 04, 2015 23:23    Post subject: USB spin down Reply with quote
I was going to attempt to use the USB port on my Buffalo_WZR-HP-G300NH for network storage. I was hoping that some of you with practical experience could answer a few questions.

I am concerned with saving energy and want a setup that will spin down to save power when the HD is not being accessed. Will this setup spin down for low power? Is it the responsibility of the WZR-HP-G300NH to spin the USB drive down or the USB drive to spin itself down, or both.

I will start with a 1TB drive and possibly go to a 2TB drive later, is this a problem.


Buffalo_WZR-HP-G300NH Ver 1
Atheros AR9132@400mhz
64 megs ram
32 megs flash
1 USB 2.0
hardware rev A0 A3

running
DD-WRT v24-sp2 (05/27/14) std - build 24160

Are the instructions here good for my hardware and software levels, for USB setup.

http://dd-wrt.com/wiki/index.php/Buffalo_WZR-HP-G300NH


Thank you.
raz3k
DD-WRT Novice


Joined: 19 Apr 2010
Posts: 5

PostPosted: Mon Jan 05, 2015 15:54    Post subject: Reply with quote
Read more here: http://www.dd-wrt.com/phpBB2/viewtopic.php?t=46516
alphard
DD-WRT Novice


Joined: 06 Jan 2012
Posts: 6

PostPosted: Tue Mar 10, 2015 7:10    Post subject: Reply with quote
I'm currently trying to install optware on my Archer C7 V2 by hand, but I've got this problem: opkg won't run even if executed from it's folder

Quote:

root@archerc7:/opt/bin# ls
opkg
root@archerc7:/opt/bin# ./opkg
-sh: ./opkg: not found


I tried to install opkg both from 10.03 and 14.07.
Is this some kind of busybox bug?
js1662
DD-WRT Guru


Joined: 23 Jul 2014
Posts: 1237
Location: BC, CA

PostPosted: Tue Mar 10, 2015 7:59    Post subject: Reply with quote
When you run opkg, use opkg instead of ./opkg. If it still doesn't work, may be it is better to do a clean setup of optware again. Check this thread: http://www.dd-wrt.com/phpBB2/viewtopic.php?p=954915&highlight=#954915
alphard
DD-WRT Novice


Joined: 06 Jan 2012
Posts: 6

PostPosted: Tue Mar 10, 2015 15:41    Post subject: Reply with quote
Do I really need to mount almost the entire fs to USB?
js1662
DD-WRT Guru


Joined: 23 Jul 2014
Posts: 1237
Location: BC, CA

PostPosted: Tue Mar 10, 2015 18:36    Post subject: Reply with quote
Yes, I think so. This latest details are the result of many trials and tests by the author.
KZL
DD-WRT Novice


Joined: 19 Mar 2014
Posts: 37

PostPosted: Fri May 22, 2015 1:17    Post subject: Reply with quote
Hi ! Open-Wrt has just changed the location of needed files for this tutorial.

Futhermore, It seem to have a problem with my dd-wrt router (Netgear WNDR4300)
IPKG seem to be totally breaked.
I get the classical message at start when I launch "ipkg", but nothing when I try to update upgrade install.

How to follow this tutorial if IPKG doesn't work ?
js1662
DD-WRT Guru


Joined: 23 Jul 2014
Posts: 1237
Location: BC, CA

PostPosted: Fri May 22, 2015 2:04    Post subject: Reply with quote
Try this one and see if it works: http://www.dd-wrt.com/phpBB2/viewtopic.php?t=177532

The only limitation on the above is that you have to use barrier breaker 14.07 rc3 instead of snapshot and it only works if your dd-wrt build still has ipkg.
hitman47
DD-WRT Novice


Joined: 16 Nov 2011
Posts: 3

PostPosted: Sun Jun 07, 2015 21:39    Post subject: Reply with quote
I followed the guide and I get the message -sh: opkg: not found. My router is a TP-Link 1043nd. My DD-WRT Build is 27240.
js1662
DD-WRT Guru


Joined: 23 Jul 2014
Posts: 1237
Location: BC, CA

PostPosted: Sun Jun 07, 2015 23:28    Post subject: Reply with quote
That means optware is not setup properly and opkg is not installed. BTW, which setup instructions are you following, this thread or the other thread that I suggested on my previous post?
hitman47
DD-WRT Novice


Joined: 16 Nov 2011
Posts: 3

PostPosted: Mon Jun 08, 2015 21:31    Post subject: Reply with quote
With this tutorial in this thread http://www.dd-wrt.com/phpBB2/viewtopic.php?t=177532. I got OPKG to work.
juliushibert
DD-WRT Novice


Joined: 18 Jul 2010
Posts: 44

PostPosted: Wed May 04, 2016 21:55    Post subject: Reply with quote
The links to install the inital packages via ipkg from the link provided are no longer available. http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/libc_0.9.33.2-1_ar71xx.ipk

Are there updated versions of these packages somewhere?

Ideally, I'm just trying to get `tee` installed on my DD-WRT router to be able to run an automated backup script.

_________________
Buffalo WZR-HP-AG300H: DD-WRT v3.0-r32170 std (06/01/17)
Goto page Previous  1, 2, 3 ... , 29, 30, 31  Next Display posts from previous:    Page 30 of 31
Post new topic   Reply to topic    DD-WRT Forum 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