OTRW2 (Optware the right way Take 2)

From DD-WRT Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 08:20, 17 August 2013 (edit)
James2k (Talk | contribs)
(Prerequisites)
← Previous diff
Revision as of 08:23, 17 August 2013 (edit) (undo)
James2k (Talk | contribs)

Next diff →
Line 4: Line 4:
This page describes the newer version OTRW2. Some information still applies to both versions, however it has been rewritten here for a more up to date view. This page describes the newer version OTRW2. Some information still applies to both versions, however it has been rewritten here for a more up to date view.
 +
 +[http://www.dd-wrt.com/phpBB2/viewtopic.php?t=156013 Official OTRW2 Forum Thread] <br />
 +[http://donate.basmaf.com/ Donation to basmaf possible]
 +
'''''(This page is a work in progress, information is currently being added and is not complete)''''' '''''(This page is a work in progress, information is currently being added and is not complete)'''''

Revision as of 08:23, 17 August 2013

OTRW2 is the latest version of Optware for Broadcom routers. The original Optware project was lead by frater, but he has since ceased developing OTRW. The project was then picked up by basmaf who has continued development on Optware. To provide clarity between the difference in versions, basmaf's Optware is commonly referred to as OTRW2 or Optware The Right Way Take 2

Information on frater's original Optware can be found here: OTRW

This page describes the newer version OTRW2. Some information still applies to both versions, however it has been rewritten here for a more up to date view.

Official OTRW2 Forum Thread
Donation to basmaf possible


(This page is a work in progress, information is currently being added and is not complete)


Contents

Prerequisites

Optware runs on Broadcom routers only. The main installer script for OTRW2 only works on Kernel 2.6 (K26).

The following builds are supported:

  • BrainSlayer builds up to 19519
  • Fractal builds up to 20006
  • All Kong builds based on Kernel 2.6

Kong AC builds are not supported


Brainslayer disabled FPU emulation in changeset 20047 which breaks Optware on DD-WRT. Kong compiles builds which are not affected by this bug and hence all Kong K2.6 builds are supported. (With the exception of AC builds)

Partitioning your external storage device

To use Optware you need to partition a storage device in a certain way. Your storage device can be a external hard drive, USB flash device or even an SD card. This guide provides a how to on partitioning your storage device:

Partitioning your storage device for Optware

  • When creating your Optware partition it must be a minimum size of 512 MB rather than 256 MB. 256 MB is a requirement of OTRW, but this has changed in OTRW2

You should bear in mind that if you use a SD card or USB flash drive you should format your partitions with ext2. This is because ext2 does not use journaling. Using a journaling filesystem such as ext3 will potentially reduce the lifespan of your SD card or USB flashdrive.

If you are using a USB hard drive you can format your partitions with ext2, ext3 or ext4 (if your build has the ext4 modules included). A recommendation would be to use ext3 as journaling will benefit a USB hard drive and its more than likely that ext3 modules will be present.

Mounting your storage device to your router

You will need to mount your storage device to your router the steps will differ slightly depending on the chosen storage method

USB

The easiest way to mount your external USB storage is to use the DD-WRT web interface GUI.

  • 1. Go to Services > USB
  • 2. Enable Core USB Support then USB Storage Support
  • 3. Finally enable Automatic Drive Mount


Image:USBmount.png


  • For builds older than 15501 you will be required to select the filesystem type. Newer builds do this automatically.
  • In newer builds the Disk Mount Point field will not be present, generally automount can detect the correct mount settings for you. There is an option to override this behaviour should you need to.


Note about USB hubs:

If you are using a USB hub/connecting more than one USB device be careful not to cause too much drain on the power supply of your router. Self powered USB devices should be used cautiously (even USB flash drives). If you experience random rebooting check that you are not overloading your router power supply.

SD Card

These instructions are from Dark_Shadow, all credit goes to him.

You should have already partitioned your SD card as outlined in the How to partition your storage device for Optware guide above before doing this step. As a recommendation a 30/30/30 reset is recommended.

Builds after 13309:

  • 1. Enable SD support. The firmware will automount the first partition to /mmc.
  • 2. Enable jffs.
  • 3. Setup your internet connection.
  • 4. Save the following script to Startup in Administration > Commands
mount /dev/mmc/disc0/part2 /opt 
mount /dev/mmc/disc0/part3 /jffs

Builds before 13309:

  • 1. Start fresh system 30/30/30. Clean formatted sd card ext2 or ext3, with /jffs directory then create /opt inside of jffs ex. /jffs/opt. For some reason the later builds have a problem with formatting a card on setup, it screws the partition making the card invisible to the router.
  • 2. Boot router, enable and setup GPIO's in the GUI for the SD Mod, because in the later builds auto GPIO is broke. Also setup your internet connection. Enable jffs.
  • 3. Copy the SDHC driver from here to the root directory of the mmc card via WinSCP then save this script below to Startup in Administration > Commands. This startup script will run the new SDHC driver all the time. It is only necessary until the release of a build with it all ready ported. (13309)
cp /mmc/sdhc-gpio2.o /tmp 
umount /mmc 
rmmod mmc 
insmod /tmp/sdhc-gpio2.o 
mount /dev/mmc/part1 /mmc/ 
mount --bind /mmc/jffs /jffs 
mount -o bind /mmc/jffs/opt /opt

Installing OTRW2

In order to install OTRW2 you need to use the prep script. Again the main prep script only works on Kernel 2.6. However a very a early development of Optware on Kernel 3.x is available to try, read more about this below.

Kernel 2.6

wget -O /tmp/prep_optware http://ddwrt.basmaf.com/prep_optware
sh /tmp/prep_optware

Kernel 3.x

A very early development of Optware for K3.x builds is available to try. At this time, none of the scripts/services in K2.6 work under K3.x (This is a very big redevelopment task), but opkg functionality is available. Meaning you can install various OpenWRT packages such nano, ip6tables etc. You can see a full list here:

OpenWRT packages available to install on K3.x builds

wget -O /tmp/prep ​http://owrt.basmaf.com/prep_otrw2
sh /tmp/prep

Executing the prep script

You will require telnet or SSH access to your router in order to run the above commands. Your router also needs to have a working internet connection. In telnet or SSH try pinging an external website to confirm this is the case:

ping www.google.co.uk
PING www.google.co.uk (74.125.132.94): 56 data bytes
64 bytes from 74.125.132.94: seq=0 ttl=47 time=28.850 ms
64 bytes from 74.125.132.94: seq=1 ttl=47 time=24.619 ms
64 bytes from 74.125.132.94: seq=2 ttl=47 time=24.336 ms
64 bytes from 74.125.132.94: seq=3 ttl=47 time=30.179 ms

After a couple of successful pings you can stop pinging (CTRL + C) and run the above commands. If you can't ping external websites, try rebooting your router. If that doesn't work you'll need to investigate internet connectivity issues.

Once you execute the prep script OTRW2 will now be installed, it will take a bit of time.

The process will take a varied amount of time depending on your connection and your router CPU clock. Close your Web Interface as this consumes precious memory and CPU resources.

Once everything has completed, wait you will be returned to a root prompt. Wait a minimum of 1 minute, then type reboot into either the BusyBox/Telnet Shell or reboot via Web Interface.

Important After rebooting, wait again at least another minute before logging back into the Telnet/SSH session!

After the reboot, OTRW2 should be running!