NSLU2-Linux
view · edit · print · history

FAQ.Optware-uClibcBuild History

Hide minor edits - Show changes to markup

June 22, 2008, at 06:14 PM by oleo -- change link to wlan-sat since pastebin now expires
Changed line 159 from:

[@ wget http://pastebin.ca/raw/876258 -O - | tr -d '\r' > /tmp/optware-install.sh

to:

[@ wget http://www.wlan-sat.com/boleo/optware/optware-install-oleg.sh -O - | tr -d '\r' > /tmp/optware-install.sh

January 28, 2008, at 06:52 PM by oleo -- uclibc -13 chenge
Changed line 5 from:

/opt with 500+ ported applications. With buildroot toolchain and patched uClibc search paths

to:

/opt with 1000+ ported applications. With buildroot toolchain and patched uClibc search paths

Changed line 143 from:
 wget http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/uclibc-opt_0.9.28-12_mipsel.ipk
to:
 wget http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/uclibc-opt_0.9.28-13_mipsel.ipk
Changed lines 145-146 from:
 ipkg.sh install uclibc-opt_0.9.28-12_mipsel.ipk 
to:
 ipkg.sh install uclibc-opt_0.9.28-13_mipsel.ipk 
Changed line 159 from:

[@ wget http://pastebin.ca/raw/410559 -O - | tr -d '\r' > /tmp/optware-install.sh

to:

[@ wget http://pastebin.ca/raw/876258 -O - | tr -d '\r' > /tmp/optware-install.sh

April 21, 2007, at 10:54 PM by logue -- Added \"-o loop\" on \"$ mount -o loop /mnt/disc0_1/optware.ext2 /opt\"
Changed lines 363-364 from:
 $ mount /mnt/disc0_1/optware.ext2 /opt
to:
 $ mount -o loop /mnt/disc0_1/optware.ext2 /opt
March 29, 2007, at 09:13 PM by oleo --
Changed line 12 from:
  1. ddwrt - http://www.dd-wrt.com dd-wrt wiki on Optware
to:
  1. ddwrt - http://www.dd-wrt.com and dd-wrt wiki on Optware
March 29, 2007, at 09:13 PM by oleo -- dd-wrt wiki
Changed line 12 from:
  1. ddwrt - http://www.dd-wrt.com
to:
  1. ddwrt - http://www.dd-wrt.com dd-wrt wiki on Optware
March 29, 2007, at 02:39 PM by oleo -- recommended tools
Changed lines 51-58 from:
to:

The following utilities are recommended when rebuilding fom sources:

  • tar 1.14
  • bash 2.05
  • autoconf-1.9
  • gcc 4.1.1
March 26, 2007, at 02:30 PM by oleo --
Added line 151:
Changed lines 155-157 from:

This will update to latest version.

to:

This will update to latest uClibc version and allow installing other packages.

March 26, 2007, at 02:29 PM by oleo -- cosmetics
Changed lines 146-147 from:

Recommended way for installing basic two packages is with installation script that will also check for possible network problems and /opt directory availability. /opt directory could be empty for this script.

to:

Recommended way for installing basic two packages (uclibc-opt and ipkg-opt) is with installation script that will also check for possible network problems and /opt directory availability. /opt directory could be empty for this script.

Changed line 151 from:
 wget http://pastebin.ca/raw/410559 -O - | tr -d '\r' > /tmp/optware-install.sh
to:

[@ wget http://pastebin.ca/raw/410559 -O - | tr -d '\r' > /tmp/optware-install.sh

Added line 153:

@]

March 26, 2007, at 02:27 PM by oleo -- alternative method
Added lines 145-153:

Alternative method for installing basic packages for Oleg firmware

Recommended way for installing basic two packages is with installation script that will also check for possible network problems and /opt directory availability. /opt directory could be empty for this script.

To install (or reinstall) issue the following two commands:

 wget http://pastebin.ca/raw/410559 -O - | tr -d '\r' > /tmp/optware-install.sh
 sh /tmp/optware-install.sh

This will update to latest version.

January 24, 2007, at 07:54 AM by oleo --
Changed lines 15-16 from:
  1. Asus WL-700gE custom firmware using oleg package feed (PDF install guide
to:
  1. Asus WL-700gE custom firmware using oleg package feed -PDF install guide
January 24, 2007, at 07:53 AM by oleo -- wl700g quick guide
Changed lines 15-16 from:
  1. Asus WL-700gE custom firmware using oleg package feed
to:
  1. Asus WL-700gE custom firmware using oleg package feed (PDF install guide
January 23, 2007, at 09:01 AM by oleo --
Changed line 198 from:

[@awk '/^Package:/{system("/opt/bin/ipkg install -force-reinstall -force-defaults " $2)}' /opt/lib/ipkg/status

to:

[@/usr/bin/awk '/^Package:/{system("/opt/bin/ipkg install -force-reinstall -force-defaults " $2)}' /opt/lib/ipkg/status

January 23, 2007, at 08:58 AM by oleo -- full path
Changed line 198 from:

[@awk '/^Package:/{system("ipkg install -force-reinstall -force-defaults " $2)}' /opt/lib/ipkg/status

to:

[@awk '/^Package:/{system("/opt/bin/ipkg install -force-reinstall -force-defaults " $2)}' /opt/lib/ipkg/status

January 21, 2007, at 06:11 PM by oleo --
Changed line 136 from:
 wget http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/uclibc-opt_0.9.28-11_mipsel.ipk
to:
 wget http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/uclibc-opt_0.9.28-12_mipsel.ipk
Changed lines 138-139 from:
 ipkg.sh install uclibc-opt_0.9.28-11_mipsel.ipk 
to:
 ipkg.sh install uclibc-opt_0.9.28-12_mipsel.ipk 
January 15, 2007, at 09:18 AM by oleo -- -nodeps
Changed line 198 from:

[@awk '/^Package:/{system("ipkg install -nodeps -force-reinstall -force-defaults " $2)}' /opt/lib/ipkg/status

to:

[@awk '/^Package:/{system("ipkg install -force-reinstall -force-defaults " $2)}' /opt/lib/ipkg/status

January 15, 2007, at 09:07 AM by oleo --
Added line 182:
Added line 186:
Added line 188:
Added lines 192-193:
January 15, 2007, at 09:06 AM by oleo -- upgrading from wl500g
Added lines 178-195:

Upgrading from old wl500g package feed

When changing package feed from "wl500g" to "oleg" change /opt/etc/ipkg.conf to the following content:

src/gz optware http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable
dest /opt/ /

then issuse

ipkg update
ipkg install -force-overwrite ipkg-opt

This will install uclibc-opt and ipkg-opt.

The following awk one line awk script will reinstall all installed packages:

awk '/^Package:/{system("ipkg install -nodeps -force-reinstall -force-defaults " $2)}' /opt/lib/ipkg/status
January 12, 2007, at 12:27 PM by oleo -- move some into in transmission package
Changed lines 378-406 from:

Accessing/Uploading .torrent files:
You can do this either via fetch method thats available while viewing transmission.cgi (no cookie support!) and also with ftp and samba.
I prefer the ftp way since its locked with pass and very easy to start you only need to install vsftpd : \\

 >ipkg install vsftpd \\ 

Login details are set to your root login and pass by deafault.
For samba you need to try it our urself. Wiki : http://wiki.openwrt.org/SambaHowto?highlight=%28samba%29

WAN Access

In order to make the torrent client pass your firewall you MUST open the torrent port to be "connectable" the other ports are options if you want to access your router from some other WAN location >vi etc/config/firewall
Add the lines:
accept:proto=tcp port=65534
accept:proto=tcp dport=22
accept:proto=tcp dport=8008
accept:proto=tcp dport=21

Legend

65534 - a must for torrent
22 - ssh (optional)
8008 - transmission.cgi (optional)
21 - ftp (optional)
WWW firewall setting should look like the following image: http://img79.imageshack.us/img79/1609/xwrtfirewalllz5.png

to:
Deleted lines 384-387:

circular syslog

should be increased to 100k or more to see logs for more than one day. http://img176.imageshack.us/img176/5545/xwrtsyslogmv7.png

January 12, 2007, at 12:12 PM by oleo --
Changed line 60 from:
 will install the following packages: autoconf, automake, bash, bison, buildroot, bzip2, 
to:

will install the following packages: autoconf, automake, bash, bison, buildroot, bzip2,

Changed lines 126-127 from:

Now get the beter ipkg an uClibc. The ipkg.sh below will complaining about missing /opt/lib/ipkg/lists/wl500g, but that is no problem since we are installing straight from the ipk files.

to:

Now get the beter ipkg an uClibc. The ipkg.sh below will complaining about missing /opt/lib/ipkg/lists/wl500g, but that is no problem since we are installing straight from the ipk files.

January 12, 2007, at 12:11 PM by oleo --
Changed lines 60-63 from:
 will install the following packages: autoconf, automake, bash, bison, buildroot, bzip2, coreutils, diffutils, file, findutils, flex, gawk, libuclibc++, groff, libtool, make, m4, ncurses, openssl, patch, pkgconfig, perl, python, rsync, sed, svn, tar, wget-ssl.

But basic compiler set comes with buildroot package. To compile hello.c just enter gcc -o hello hello.c

to:
 will install the following packages: autoconf, automake, bash, bison, buildroot, bzip2, 

coreutils, diffutils, file, findutils, flex, gawk, libuclibc++, groff, libtool, make, m4, ncurses, openssl, patch, pkgconfig, perl, python, rsync, sed, svn, tar, wget-ssl.

But basic compiler set comes with buildroot package. To compile hello.c just enter gcc -o hello hello.c

January 12, 2007, at 12:00 PM by oleo --
Changed lines 60-62 from:
 will install the following packages: autoconf, automake, bash, bison, buildroot, bzip2, coreutils, diffutils, file, findutils, flex, gawk, libuclibc++, groff, libtool, make, m4, ncurses, openssl, patch, pkgconfig, perl, python, rsync, sed, svn, tar, wget-ssl

but basic compiler set comes whith buildroot package.

to:
 will install the following packages: autoconf, automake, bash, bison, buildroot, bzip2, coreutils, diffutils, file, findutils, flex, gawk, libuclibc++, groff, libtool, make, m4, ncurses, openssl, patch, pkgconfig, perl, python, rsync, sed, svn, tar, wget-ssl.

But basic compiler set comes with buildroot package. To compile hello.c just enter gcc -o hello hello.c

January 12, 2007, at 11:56 AM by oleo -- native toolchain
Added lines 54-73:

Native compilation on router itself

There is also possibility for native compilation with optware-devel metapackage.

 ipkg-opt install optware-devel

 will install the following packages: autoconf, automake, bash, bison, buildroot, bzip2, coreutils, diffutils, file, findutils, flex, gawk, libuclibc++, groff, libtool, make, m4, ncurses, openssl, patch, pkgconfig, perl, python, rsync, sed, svn, tar, wget-ssl

but basic compiler set comes whith buildroot package.

For optware development just check-out repository with

  cd /tmp/harddisk
  svn co http://svn.nslu2-linux.org/svnroot/optware/trunk optware
  cd optware
  export OPTWARE_TARGET=oleg
  make directories
  make toolchain

then issue individual package make eg. make bc or just make for the whole repository.

January 11, 2007, at 10:14 AM by oleo -- ld.so
Changed line 229 from:
 Updating /opt/etc/ld-opt.so.cache
to:
 Updating /opt/etc/ld.so.cache
January 10, 2007, at 01:07 PM by Jelle Alten --
Changed lines 94-95 from:

On a freshly formatted external filesystem, mounted on /opt, you can run this:

to:

On a freshly formatted external filesystem, mounted on /opt, take the following steps...

Added line 97:
Changed lines 101-102 from:

The ipkg.sh below will complaining about missing /opt/lib/ipkg/lists/wl500g, but that is no problem since we are installing straight from the ipk files.

to:

Now get the beter ipkg an uClibc. The ipkg.sh below will complaining about missing /opt/lib/ipkg/lists/wl500g, but that is no problem since we are installing straight from the ipk files.

January 10, 2007, at 01:05 PM by Jelle Alten --
Changed lines 77-78 from:
to:

(for oleg firmware see next section)

Changed line 96 from:
 # create the directory:
to:

First create the directory:

Changed lines 100-102 from:
 # the ipkg.sh below will complaining about missing /opt/lib/ipkg/lists/wl500g, but that is no problem
 # since we are installing straight from the ipk files.
to:

The ipkg.sh below will complaining about missing /opt/lib/ipkg/lists/wl500g, but that is no problem since we are installing straight from the ipk files.

Changed lines 115-116 from:

That's all!

to:

That's all, enjoy your packages!

January 10, 2007, at 01:01 PM by Jelle Alten -- updated the oleg section
Changed lines 99-101 from:
 # get the ipkg list files
 ipkg.sh update 
to:
 # the ipkg.sh below will complaining about missing /opt/lib/ipkg/lists/wl500g, but that is no problem
 # since we are installing straight from the ipk files.

 # get the better ipkg
 wget http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/ipkg-opt_0.99.163-9_mipsel.ipk 
 #install it (ignore tne missing lists/wl500g error)
 ipkg.sh install ipkg-opt_0.99.163-9_mipsel.ipk
Changed line 109 from:
 # install it 
to:
 # install it (ignore tne missing lists/wl500g error)
Deleted lines 111-115:
 # get the better ipkg
 wget http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/ipkg-opt_0.99.163-9_mipsel.ipk 
 #install it
 ipkg.sh install ipkg-opt_0.99.163-9_mipsel.ipk
January 10, 2007, at 12:54 PM by Jelle Alten --
Changed line 95 from:
  1. create the directory:
to:
 # create the directory:
Added line 111:
January 10, 2007, at 12:52 PM by Jelle Alten -- added uclibc install instructions for oleg
Added lines 91-115:

What do I have to do to get this better uClibc on OLEG firmware?

On a freshly formatted external filesystem, mounted on /opt, you can run this:

  1. create the directory:
 mkdir /opt/tmp
 mkdir /opt/tmp/ipkg

 # get the ipkg list files
 ipkg.sh update 

 # get the better uclibc
 wget http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/uclibc-opt_0.9.28-11_mipsel.ipk
 # install it 
 ipkg.sh install uclibc-opt_0.9.28-11_mipsel.ipk 

 # get the better ipkg
 wget http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/ipkg-opt_0.99.163-9_mipsel.ipk 
 #install it
 ipkg.sh install ipkg-opt_0.99.163-9_mipsel.ipk
 # update the list using the improved ipkg
 ipkg update 

That's all!

January 10, 2007, at 09:29 AM by oleo -- link
Changed line 223 from:

key. Due to flash http://en.wikipedia.org/wiki/Flash_memory wear out it is not recommended

to:

key. Due to flash wear out it is not recommended

January 10, 2007, at 09:27 AM by oleo -- link
Changed line 223 from:

key. Due to flash [http://en.wikipedia.org/wiki/Flash_memory wear out] it is not recommended

to:

key. Due to flash http://en.wikipedia.org/wiki/Flash_memory wear out it is not recommended

Changed lines 263-265 from:
 mkdir /opt
 mount /mnt/disc0_1/optware.ext2 /opt
to:
 $ mkdir /opt
 $ mount /mnt/disc0_1/optware.ext2 /opt
January 10, 2007, at 09:25 AM by oleo -- kmod-loop
Added lines 259-261:

For mounting files as filesystem you need to install kernel module for mount loopback support - kmod-loop.

January 10, 2007, at 09:21 AM by oleo -- Recommendend install
Changed lines 158-165 from:
 mount /dev/scsi/host0/bus0/target0/lun0/part1 /opt
 mkdir /opt/tmp
 cd /opt/tmp
 wget http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable/uclibc-opt_0.9.28-6_mipsel.ipk
 ipkg install uclibc-opt_0.9.28-6_mipsel.ipk
 wget http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable/ipkg-opt_0.99.163-5_mipsel.ipk
 ipkg install ipkg-opt_0.99.163-5_mipsel.ipk
to:
 $ mount /dev/scsi/host0/bus0/target0/lun0/part1 /opt
Added line 163:
 lists_dir ext /opt/var/lib/ipkg
Changed lines 166-168 from:
 root@OpenWrt:/opt/tmp$ /opt/bin/ipkg update
 Downloading http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable/Packages
 Updated list of available packages in /opt/lib/ipkg/lists/optware
to:

We could also use

 $ mkdir /opt/etc
 $ echo "src/gz optware http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable" > /opt/etc/ipkg.conf
 $ echo "lists_dir ext /opt/var/lib/ipkg" >> /opt/etc/ipkg.conf
 $ echo "dest /opt/ /" >> /opt/etc/ipkg.conf
 $ cat  /opt/etc/ipkg.conf 
  src/gz optware http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable
  lists_dir ext /opt/var/lib/ipkg
  dest /opt/ /

We will use OpenWrt ipkg to install ipkg-opt and uclibc-opt packages

 $ export IPKG_CONF_DIR=/opt/etc
 $ ipkg -V 2 update
 Downloading http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable/Packages.gz
 Inflating http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable/Packages.gz
 Updated list of available packages in /opt/var/lib/ipkg/optware
Changed lines 185-189 from:

[@Install packages with /opt/bin/ipkg like >/opt/bin/ipkg install transmission >/opt/bin/ipkg install uclibc-opt >/opt/bin/ipkg install busybox-core

to:
 $ ipkg install ipkg-opt
 Installing ipkg-opt (0.99.163-9) to /opt/...
 Downloading http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable/ipkg-opt_0.99.163-9_mipsel.ipk
 package uclibc-opt suggests installing ipkg-opt
 Installing uclibc-opt (0.9.28-11) to /opt/...
 Downloading http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable/uclibc-opt_0.9.28-11_mipsel.ipk
    Configuration file '/opt/etc/ipkg.conf'
    ==> File on system created by you or by a script.
    ==> File also in package provided by package maintainer.
       What would you like to do about it ?  Your options are:
        Y or I  : install the package maintainer's version
        N or O  : keep your currently-installed version
     The default action is to keep your current version.
    *** ipkg.conf (Y/I/N/O) [default=N] ?N
 Configuring ipkg-opt
 Configuring uclibc-opt
 Updating /opt/etc/ld-opt.so.cache
 Successfully terminated.

We could also answer Y to install mainainers version as from now one it is recommended to use /opt/bin/ipkg-opt command for installing optware packages.

[@Install packages with /opt/bin/ipkg-opt like >/opt/bin/ipkg-opt install transmission >/opt/bin/ipkg-opt install uclibc-opt >/opt/bin/ipkg-opt install busybox-core

January 10, 2007, at 08:46 AM by oleo -- USB stick
Changed lines 189-190 from:
to:

USB stick

USB stick can also be used instead of hard disk for packages not requiring many writes to key. Due to flash [http://en.wikipedia.org/wiki/Flash_memory wear out] it is not recommended to create swap. Default format for USB stick is FAT and stick is recognised at boot time and mounted in directory /mnt/disc0_1 .With disk dump we will create 240MB file on a stick to accomodate ext2 filesystem without repartitioning/reformating stick.

 dd if=/dev/zero of=/mnt/disc0_1/optware.ext2 bs=1k count=240000
 240000+0 records in
 240000+0 records out

This file can be later used to backup the whole optware packages installed. Now we will create ext2 filesystem in /mnt/disc0_1/optware.ext2 file with mke2fs from e2fsprogs package:

 $ mke2fs -L optware -M /opt /mnt/disc0_1/optware.ext2
 mke2fs 1.38 (30-Jun-2005)
 /mnt/disc0_1/optware.ext2 is not a block special device.
 Proceed anyway? (y,n) y
 ext2fs_check_if_mount: No such file or directory while determining whether /mnt/disc0_1/optware.ext2 is mounted.
 Filesystem label=optware
 OS type: Linux
 Block size=1024 (log=0)
 Fragment size=1024 (log=0)
 60000 inodes, 240000 blocks
 12000 blocks (5.00%) reserved for the super user
 First data block=1
 30 block groups
 8192 blocks per group, 8192 fragments per group
 2000 inodes per group
 Superblock backups stored on blocks: 
         8193, 24577, 40961, 57345, 73729, 204801, 221185 

 Writing inode tables: done                            
 Writing superblocks and filesystem accounting information: done

 This filesystem will be automatically checked every 32 mounts or
 180 days, whichever comes first.  Use tune2fs -c or -i to override.

We now just need to mount file into /opt directory:

 mkdir /opt
 mount /mnt/disc0_1/optware.ext2 /opt

Stick is now prepared for installing optware software.

January 10, 2007, at 08:23 AM by oleo -- swapon & fdisk
Added lines 153-155:

Missing packages swap-utils and fdisk can be installed from rc5-backports http://downloads.openwrt.org/backports/rc5

January 06, 2007, at 05:29 PM by oleo -- added images
Added lines 236-238:

Optionally one can use custom startup script provided by X-Wrt http://img65.imageshack.us/img65/3958/xwrtcustomuserstartupsy2.png

Added lines 269-271:

WWW firewall setting should look like the following image: http://img79.imageshack.us/img79/1609/xwrtfirewalllz5.png

Added lines 277-280:

circular syslog

should be increased to 100k or more to see logs for more than one day. http://img176.imageshack.us/img176/5545/xwrtsyslogmv7.png

January 06, 2007, at 05:13 PM by oleo --
Added lines 266-268:

/etc/profile

Setting default search path to /opt/bin and /opt/sbin is done by editing /etc/profile

January 06, 2007, at 05:06 PM by oleo --
Changed lines 266-267 from:

[http://img129.imageshack.us/img129/4756/xwrtetcprofilelk1.png]

to:

http://img129.imageshack.us/img129/4756/xwrtetcprofilelk1.png

January 06, 2007, at 05:04 PM by oleo -- test
Changed lines 266-267 from:
to:

[http://img129.imageshack.us/img129/4756/xwrtetcprofilelk1.png]

January 04, 2007, at 10:02 PM by cal --
Changed lines 246-247 from:


!!! WAN Access

to:

WAN Access

January 04, 2007, at 10:00 PM by cal --
Changed line 247 from:

WAN Access \\

to:

WAN Access

January 04, 2007, at 10:00 PM by cal --
Added lines 129-134:

What do you need ?

-WL500g? with an usb port. -USB HDD Drive. -Non-firewalled connection or an admin that will forward the ports. (65524-torrent, optional 22 and 8008 for WAN side access)

Changed line 240 from:

Accessing/Uploading .torrent files: \\

to:

Accessing/Uploading .torrent files: \\

Changed lines 246-247 from:
to:


!!! WAN Access
In order to make the torrent client pass your firewall you MUST open the torrent port to be "connectable" the other ports are options if you want to access your router from some other WAN location >vi etc/config/firewall
Add the lines:
accept:proto=tcp port=65534
accept:proto=tcp dport=22
accept:proto=tcp dport=8008
accept:proto=tcp dport=21

Legend

65534 - a must for torrent
22 - ssh (optional)
8008 - transmission.cgi (optional)
21 - ftp (optional)

January 04, 2007, at 09:46 PM by cal --
Changed lines 234-241 from:

Accessing/Uploading .torrent files: You can do this either via fetch method thats available while viewing transmission.cgi (no cookie support!) and also with ftp and samba. I prefer the ftp way since its locked with pass and very easy to start you only need to install vsftpd :
>ipkg install vsftpd Login details are set to your root login and pass by deafault. For samba you need to try it our urself. Wiki : http://wiki.openwrt.org/SambaHowto?highlight=%28samba%29

to:

Accessing/Uploading .torrent files:
You can do this either via fetch method thats available while viewing transmission.cgi (no cookie support!) and also with ftp and samba.
I prefer the ftp way since its locked with pass and very easy to start you only need to install vsftpd : \\

 >ipkg install vsftpd \\ 

Login details are set to your root login and pass by deafault.
For samba you need to try it our urself. Wiki : http://wiki.openwrt.org/SambaHowto?highlight=%28samba%29

January 04, 2007, at 09:45 PM by cal --
Changed lines 234-236 from:
to:

Accessing/Uploading .torrent files: You can do this either via fetch method thats available while viewing transmission.cgi (no cookie support!) and also with ftp and samba. I prefer the ftp way since its locked with pass and very easy to start you only need to install vsftpd :
>ipkg install vsftpd Login details are set to your root login and pass by deafault. For samba you need to try it our urself. Wiki : http://wiki.openwrt.org/SambaHowto?highlight=%28samba%29

January 03, 2007, at 07:42 AM by cal --
Changed lines 167-174 from:

Install packages with /opt/bin/ipkg like
>/opt/bin/ipkg install transmission \\ >/opt/bin/ipkg install uclibc-opt \\ >/opt/bin/ipkg install busybox-core
Now you are able to start swap with
/opt/bin/busybox swapon /dev/scsi/host0/bus0/target0/lun0/part2

to:
Install packages with /opt/bin/ipkg like 
>/opt/bin/ipkg install transmission 
>/opt/bin/ipkg install uclibc-opt 
>/opt/bin/ipkg install busybox-core

Now you are able to start swap with 
/opt/bin/busybox swapon /dev/scsi/host0/bus0/target0/lun0/part2 
January 03, 2007, at 07:39 AM by cal --
Changed lines 141-143 from:

For the moment there is no fdisk so you need to setup partitions on some other device that can make linux partitions.

to:
January 03, 2007, at 07:36 AM by cal --
Changed lines 138-139 from:

After you install everything you want >reboot \\

to:

After you install everything you want
>reboot \\

Changed lines 141-146 from:

For the moment there is no fdisk so you need to setup partitions on some
other device that can make linux partitions.

But after that you will be able to mount disk partitions. Then manually
install packages from http://ipkg.nslu2-linux.org/feeds/op.../cross/stable/
with Openwrt ipkg system. (uclibc-opt, transmission, busybox-core for \\

to:

For the moment there is no fdisk so you need to setup partitions on some other device that can make linux partitions.

But after that you will be able to mount disk partitions. Then manually install packages from http://ipkg.nslu2-linux.org/feeds/op.../cross/stable/ with Openwrt ipkg system. (uclibc-opt, transmission, busybox-core for

January 03, 2007, at 07:35 AM by cal --
Changed lines 136-147 from:

Example >ipkg install kmod-usb-storage After you install everything you want >reboot Hint: If youre going for torrents ext2 filesystem is the thing you need. For the moment there is no fdisk so you need to setup partitions on some other device that can make linux partitions.

But after that you will be able to mount disk partitions. Then manually install packages from http://ipkg.nslu2-linux.org/feeds/op.../cross/stable/ with Openwrt ipkg system. (uclibc-opt, transmission, busybox-core for swapon, ...)

to:

Example:
>ipkg install kmod-usb-storage
After you install everything you want >reboot
Hint: If youre going for torrents ext2 filesystem is the thing you need.
For the moment there is no fdisk so you need to setup partitions on some
other device that can make linux partitions.

But after that you will be able to mount disk partitions. Then manually
install packages from http://ipkg.nslu2-linux.org/feeds/op.../cross/stable/
with Openwrt ipkg system. (uclibc-opt, transmission, busybox-core for
swapon, ...)

Changed lines 168-175 from:

Install packages with /opt/bin/ipkg like >/opt/bin/ipkg install transmission >/opt/bin/ipkg install uclibc-opt >/opt/bin/ipkg install busybox-core

Now you are able to start swap with /opt/bin/busybox swapon /dev/scsi/host0/bus0/target0/lun0/part2

to:

Install packages with /opt/bin/ipkg like
>/opt/bin/ipkg install transmission \\ >/opt/bin/ipkg install uclibc-opt \\ >/opt/bin/ipkg install busybox-core
Now you are able to start swap with
/opt/bin/busybox swapon /dev/scsi/host0/bus0/target0/lun0/part2

January 03, 2007, at 07:29 AM by cal --
Changed lines 135-142 from:
to:
  • kmod-vfat - fat systems used on most USB stuff

Example >ipkg install kmod-usb-storage After you install everything you want >reboot Hint: If youre going for torrents ext2 filesystem is the thing you need. For the moment there is no fdisk so you need to setup partitions on some other device that can make linux partitions.

Deleted line 149:
 /opt/bin/busybox swapon /dev/scsi/host0/bus0/target0/lun0/part2
Changed lines 168-170 from:

After that you will be able to install packages with command like

 /opt/bin/ipkg install transmission
to:

Install packages with /opt/bin/ipkg like >/opt/bin/ipkg install transmission >/opt/bin/ipkg install uclibc-opt >/opt/bin/ipkg install busybox-core

Now you are able to start swap with /opt/bin/busybox swapon /dev/scsi/host0/bus0/target0/lun0/part2

December 22, 2006, at 04:04 AM by BrianZhou -- changed number of optware packages
Changed line 5 from:

/opt with 400+ ported applications. With buildroot toolchain and patched uClibc search paths

to:

/opt with 500+ ported applications. With buildroot toolchain and patched uClibc search paths

December 21, 2006, at 09:27 AM by oleo --
Changed line 13 from:
  1. OpenWrt whiterussian - http://www.openwrt.org/ using ddwrt package feed
to:
  1. OpenWrt whiterussian - http://www.openwrt.org/ using ddwrt package feed
December 21, 2006, at 09:16 AM by oleo --
Changed line 165 from:

Not that on OpenWRt? there will be two ipkg commands. System one /usr/bin/ipkg and

to:

Note that on OpenWRt? there will be two ipkg commands. System one /usr/bin/ipkg and

December 21, 2006, at 09:15 AM by oleo --
Changed lines 15-16 from:
  1. Asus WL-700gE custom firmwareusing oleg package feed
to:
  1. Asus WL-700gE custom firmware using oleg package feed
December 21, 2006, at 09:14 AM by oleo --
Changed lines 13-15 from:
  1. OpenWrt whiterussian - http://www.openwrt.org/
  2. Xwrt - http://xwrt.berlios.de/xwrt.asp
to:
  1. OpenWrt whiterussian - http://www.openwrt.org/ using ddwrt package feed
  2. Xwrt - http://xwrt.berlios.de/xwrt.asp using ddwrt package feed
  3. Asus WL-700gE custom firmwareusing oleg package feed
Deleted lines 26-28:
Changed lines 29-30 from:
to:

Mostly Asus routers provide

Changed lines 130-135 from:

- kmod-usb-core - 2.4.30-brcm-5 - Kernel Support for USB - kmod-usb-storage - 2.4.30-brcm-5 - Kernel modules for USB storage support - kmod-usb2 - 2.4.30-brcm-5 - Kernel driver for USB2? controllers - kmod-ext2 - 2.4.30-brcm-5 - Kernel modules for EXT2? filesystem support - kmod-ext3 - 2.4.30-brcm-5 - Kernel modules for EXT3? filesystem support

to:
  • kmod-usb-core - 2.4.30-brcm-5 - Kernel Support for USB
  • kmod-usb-storage - 2.4.30-brcm-5 - Kernel modules for USB storage support
  • kmod-usb2 - 2.4.30-brcm-5 - Kernel driver for USB2? controllers
  • kmod-ext2 - 2.4.30-brcm-5 - Kernel modules for EXT2? filesystem support
  • kmod-ext3 - 2.4.30-brcm-5 - Kernel modules for EXT3? filesystem support
Added lines 141-171:

Mounting and preparing for Optware packages

 /opt/bin/busybox swapon /dev/scsi/host0/bus0/target0/lun0/part2
 mount /dev/scsi/host0/bus0/target0/lun0/part1 /opt
 mkdir /opt/tmp
 cd /opt/tmp
 wget http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable/uclibc-opt_0.9.28-6_mipsel.ipk
 ipkg install uclibc-opt_0.9.28-6_mipsel.ipk
 wget http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable/ipkg-opt_0.99.163-5_mipsel.ipk
 ipkg install ipkg-opt_0.99.163-5_mipsel.ipk

Inexperienced vi users can use Xwrt Webif2 file editor. Contents of /opt/etc/ipkg.conf file:

 src optware http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable
 dest opt /

 root@OpenWrt:/opt/tmp$ /opt/bin/ipkg update
 Downloading http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable/Packages
 Updated list of available packages in /opt/lib/ipkg/lists/optware
 Successfully terminated.

After that you will be able to install packages with command like

 /opt/bin/ipkg install transmission

Not that on OpenWRt? there will be two ipkg commands. System one /usr/bin/ipkg and Optware one /opt/bin/ipkg. Both commands comands maintain their own packages list. They are separated intentionaly.Do not add ddwrt package feed to OpenWrt system packages. Name clash of similar packages could occur.

Changed lines 173-177 from:
to:

Create /opt mount point with

 mkdir -p /opt

Edit startup scripts to allow mounting at reboot

 >vi /etc/init.d/S11mount
Changed lines 203-204 from:

swap

to:

swap

Changed lines 217-219 from:
 - part1 = your partition for optware
 - part2 = your partition for swap
to:
 * part1 = your partition for optware
 * part2 = your partition for swap
Changed lines 224-255 from:

Mounting and preparing for Optware packages

 /opt/bin/busybox swapon /dev/scsi/host0/bus0/target0/lun0/part2
 mount /dev/scsi/host0/bus0/target0/lun0/part1 /opt
 mkdir /opt/tmp
 cd /opt/tmp
 wget http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable/uclibc-opt_0.9.28-6_mipsel.ipk
 ipkg install uclibc-opt_0.9.28-6_mipsel.ipk
 wget http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable/ipkg-opt_0.99.163-5_mipsel.ipk
 ipkg install ipkg-opt_0.99.163-5_mipsel.ipk

Inexperienced vi users can use Xwrt Webif2 file editor. Contents of /opt/etc/ipkg.conf file:

 src optware http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable
 dest opt /

 root@OpenWrt:/opt/tmp$ /opt/bin/ipkg update
 Downloading http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable/Packages
 Updated list of available packages in /opt/lib/ipkg/lists/optware
 Successfully terminated.

After that you will be able to install packages with command like

 /opt/bin/ipkg install transmission

Not that on OpenWRt? there will be two ipkg commands. System one /usr/bin/ipkg and Optware one /opt/bin/ipkg. Both commands comands maintain their own packages list. They are separated intentionaly.Do not add ddwrt package feed to OpenWrt system packages. Name clash of similar packages could occur.

to:
December 21, 2006, at 09:00 AM by oleo --
Changed line 127 from:
 Optware with whiterussian OpenWrt and Xwrt is fully operational.I recommend to create disk partitions (opt, swap and data) with
to:

Optware with whiterussian OpenWrt and Xwrt is fully operational.I recommend to create disk partitions (opt, swap and data) with

December 21, 2006, at 08:58 AM by oleo -- Added OpenWrt install notes.
Added lines 125-222:

Preparing Xwrt or OpenWrt whiterussian for external USB disk

 Optware with whiterussian OpenWrt and Xwrt is fully operational.I recommend to create disk partitions (opt, swap and data) with

some linux system as the OpenWrt lacks some fdisk and busybox (mkswap, swapon, swapof) packages.

Install the following USB and ext2/3 packages: - kmod-usb-core - 2.4.30-brcm-5 - Kernel Support for USB - kmod-usb-storage - 2.4.30-brcm-5 - Kernel modules for USB storage support - kmod-usb2 - 2.4.30-brcm-5 - Kernel driver for USB2? controllers - kmod-ext2 - 2.4.30-brcm-5 - Kernel modules for EXT2? filesystem support - kmod-ext3 - 2.4.30-brcm-5 - Kernel modules for EXT3? filesystem support

But after that you will be able to mount disk partitions. Then manually install packages from http://ipkg.nslu2-linux.org/feeds/op.../cross/stable/ with Openwrt ipkg system. (uclibc-opt, transmission, busybox-core for swapon, ...)

mounting partitions on boot

 #!/bin/sh
 #
 # macsat.com mount script
 #

 # Which device needs to be mounted?
 MOUNT_DEVICE0=/dev/scsi/host0/bus0/target0/lun0/part1

 i=0
 # Wait 15 secs, mount when ready, and continue if it dosnt get ready within 15 secs.
 while [ $i -le 15 ]
 do

 if [ -e $MOUNT_DEVICE0 ]
 then
 mount $MOUNT_DEVICE0 /opt/
 echo "Success: $MOUNT_DEVICE0"
 exit 0
 fi

 sleep 1
 i=`expr $i + 1`
 done 

swap

 vi /etc/init.d/S12swap

 #!/bin/sh
 /opt/bin/busybox swapon /dev/scsi/host0/bus0/target0/lun0/part2

Let it execute them with :

 >chmod +x /etc/init.d/S11mount
 >chmod +x /etc/init.d/S12swap

Legend:

 - part1 = your partition for optware
 - part2 = your partition for swap

writing in console

Hint:vi usage : pressing some letter on keyboard enables editing mode indicated by "I" in the bottom left corner to save and exit after editing press "ESC" (the "I" should be gone) and type "wq!"(Wanna know more about vi ? google!)

Mounting and preparing for Optware packages

 /opt/bin/busybox swapon /dev/scsi/host0/bus0/target0/lun0/part2
 mount /dev/scsi/host0/bus0/target0/lun0/part1 /opt
 mkdir /opt/tmp
 cd /opt/tmp
 wget http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable/uclibc-opt_0.9.28-6_mipsel.ipk
 ipkg install uclibc-opt_0.9.28-6_mipsel.ipk
 wget http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable/ipkg-opt_0.99.163-5_mipsel.ipk
 ipkg install ipkg-opt_0.99.163-5_mipsel.ipk

Inexperienced vi users can use Xwrt Webif2 file editor. Contents of /opt/etc/ipkg.conf file:

 src optware http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable
 dest opt /

 root@OpenWrt:/opt/tmp$ /opt/bin/ipkg update
 Downloading http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable/Packages
 Updated list of available packages in /opt/lib/ipkg/lists/optware
 Successfully terminated.

After that you will be able to install packages with command like

 /opt/bin/ipkg install transmission

Not that on OpenWRt? there will be two ipkg commands. System one /usr/bin/ipkg and Optware one /opt/bin/ipkg. Both commands comands maintain their own packages list. They are separated intentionaly.Do not add ddwrt package feed to OpenWrt system packages. Name clash of similar packages could occur.

December 21, 2006, at 08:30 AM by oleo -- added OpenWrt and Xwrt notice
Changed lines 12-15 from:
  1. ddwrt - http://www.dd-wrt.com

Prerequisite for all packages is that uclibc package is installed before any other.

to:
  1. ddwrt - http://www.dd-wrt.com
  2. OpenWrt whiterussian - http://www.openwrt.org/
  3. Xwrt - http://xwrt.berlios.de/xwrt.asp

Prerequisite for all packages is that uclibc-opt package is installed before any other.

Changed lines 22-28 from:
to:

Difference between feeds is mostly in firmware kernel headers. ddwrt, whiterussian, Xwrt all use the same kernel version and thus the same kernel headers. For this reason all three firmwares use the same "package feed" - ddwrt.

November 09, 2006, at 02:53 PM by oleo -- uclibc iintro by ptnemot
Changed lines 48-116 from:
to:

Installing and using the updated uClibc library on your Asus WL-500g router

This end user Question/Answer description of uClibc build was privided by ptnemont. Although it is described for WL500G? all this tinfo can also be applied to other firmwares providing /opt mount point .

What is uClibc?

From the GNU C Library homepage: "Any Unix-like operating system (including Linux) needs a C library: the library which defines the 'system' calls and other basic facilities such as open, malloc, printf, exit... The GNU C library is used as the C library in the GNU system and most systems with the Linux kernel."

Now the standard GNU C Library contains a lot of functionality, but it's also quite big. Embedded Linux systems (such as the Asus WL500g? router) have - in a lot of cases - very limited space avaiable. That's why some clever guys came up with the idea to create uClibc, a new C library that would eat up a lot less space while still providing the most used functionality of the GNU C Library (meaning the most programs that compile with the standard GNU C library also should compile with the uClib library).

As you have probably guessed already this uClibc library is the C library that is used in the Asus WL-500g firmware provided by Oleg.

Why would I need another version of uClibc?

The current version of uClibc that is included in the firmware provided by Oleg has some issues. First of all it is a rather old version, next to that there are a number of programs which do not compile with it. The program that got me interested in this issue was actually "unrar", but there are many other examples.

I can't tell you exactly why these programs don't compile against the uClibc (whether it is a problem with the older version of uClibc, or whether it is something specific to the WL-500g - if you know feel free to inform me). What I do know however is that on the WL500g?.info forums (you first stop for any info on the WL500g? series!) a helpful guy Oleo indicated that he succeeded in using a newer version of uClibc (we'll call this v0.9.28) which solves a lot of the issues that were found with the original one (v0.9.19).

This means that you can actually use a lot more packages on your WL-500g than before, and it also gives a you a bigger chance that whatever package you want to create yourself (because it's missing today) will compile without any issues. Great news I hear you say, and it is - however as the information on how to do this is rather spread on different forums and Wiki's I tried to sum it all up here. In a next section I will explain how you can get the new uClibc (v0.9.28) working on your WL-500g, and after that I will show how you can start creating packages yourself.

So what do I have to do to start using this new version of the uClibc library?

Using the new version of the uClibc library is actually quite easy - just install it using ipkg. However, one important point to take into account before you start: you don't only need to get the library installed, you should also make sure that you get programs that use this new library (and not the v0.9.19 one from the firmware). This is achieved by using the ipk package feed specific for use with the uClibc v0.9.28 library, as explained below:

  • Open the file /opt/etc/ipkg.conf in your favourite editor
  • Remove or comment out the line that specifies the current source for unslung packages (should start with "src unslung")
  • Define the new source for Unslung package by adding the line src unslung http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable
  • Make sure the destination is specified as follows:
      dest root /

This will make sure that all new packages which you install wil be using the correct library. As a last step you will also have to reinstall all packages that you had already installed previously (to make sure that they too use the correct library). This is how you can go about it:

  • Install the new version of the uClibc library with "ipkg install uclibc"
  • Get a list of all packages you have currently installed with the command "ipkg list_installed"
  • For each of these packages reinstall the package with the command "ipkg install -force-reinstall package_name" (except for the uClibc package itself off course because you installed the correct version in the previous steps)

That's it! With these few steps you have opened up the way to a whole range of exciting new packages for that magical WL-500g box. If you really would like to have a package which is not available yet from the current feed the next section will show you a way how you could achieve this (with some luck...)

And what if the program I need is not available in the existing packages?

Bad luck, off course. But the situation is not totally hopeless, you could create your own package! Now normally this requires quite a lot of in-depth knowledge on setting up the right environment and creating packages, however the good people that brought us Unslung have put quite some effort in ensuring there is an easy way for anyone of us to create packages. Now a lot of the info I write below is available on the Unslung WIKI, so that should be your starting point to understanding how to create packages. However I will give a step-by-step tutorial below on how to create a package for the WL-500g using the new v0.9.28 uClibc library specifically.

It is important for you to understand the steps required when creating a package.

  1. Set up the environemt where you will compile your package (I will be using an Ubuntu 6 installation running in VMWare? player on my Windows XP PC - but any Debian based distro will do, and you should be able to get it to work on non Debian based setups)
  2. Define your package (in the best case only consists of creating one file!)
  3. Test you package (try to compile, install and run it)
  4. Check-in your package so that other people can test and use it

Setting up your environment is real easy. First define the directory you want to work in (I will be using "/opt/slug" as directory - you are free to choose yours):

    mkdir /opt/slug
    cd /opt/slug

Next you will have to download the SVN tree for the build environment:

    svn co http://svn.nslu2-linux.org/svnroot/optware/trunk optware

The next steps are specific for the WL-500g with updated uClibc (and are needed to make sure you use the right libraries):

    cd optware
    export OPTWARE_TARGET=oleg
    make directories
    make toolchain

Now you have your environment setup and you can start working on your package. For this you create a new ".mk" file. This file will contain all information about your package (including the name, version, dependenices, where to get the source code, and any other specifics that are needed). This is the only real hard part - the best thing you can do is to use an existing file for a (preferable simple) package and adapt it to your needs. Once this is done you can try to get your package created using "make make/package_name.mk". You'll probably bump into some issues you need to solve to get to a working .mk file, but once that is done and the make succeeds you will find yourself with a brand new package in the "build" directory.

Now it's time to put your package to the test. Get it onto your WL-500g (using SAMBA, USB stick, FTP or whatever means you want) and install the package with "ipkg install package_name.ipk". If that works you can check whether all files from your package have been installed, and actually test your program - hopefully it does what it is supposed to do!

If you have tested your package and are convinced it is working OK then it's time to get your ".mk" file included in the official feed. Instructions on this are available on the Unslung WIKI, as it does not contain anything specific for the WL-500g I won't detail these here.

August 02, 2006, at 08:38 AM by oleo -- Basic intro
Added lines 1-49:

This build provides independend uClibc feed for many firmwares based on buildroot toolchain and uClibc library.

The main feature of this packages is that it installs all required files under /opt with 400+ ported applications. With buildroot toolchain and patched uClibc search paths feed also added system library indenpendence. This means that packages now depends on /opt/lib/uClibc.so and dynamic loader also in /opt/lib with separate /opt/etc/ld-opt.so.conf for custom .so cache.

At present the following target firmwares are supported:

  1. oleg - http://wl500g.dyndns.org
  2. ddwrt - http://www.dd-wrt.com

Prerequisite for all packages is that uclibc package is installed before any other.

With latest DD-WRT v23 firmware it is also possible to install optware packages. See http://www.dd-wrt.com/wiki/index.php/Optware for details. Full feature ipkg package is also included in feeds for use where required (eg. ddwrt)

Complete system library indenpendence makes it possible for porting Optware-uClibcBuild into other architectures/firmwares like dreambox.

Building from sources

 make OPTWARE_TARGET=ddwrt

will build directories toolchain and packages. If anything goes wrong the following pit stops are recomended:

 export OPTWARE_TARGET=ddwrt
 make directories
 make toolchain
 make packages

Buildroot toolchain consist of the following targets:

 make buildroot-toolchain
 make libuclibc++-toolchain

When changing target firmware buils one should issue

 make buildroot-dirclean

to completely remove toolchain/mipsel-linux-uclibc and toolchain/buildroot subdirectories.

buildroot target will also create complete toolchain for native compilation.

oleo

view · edit · print · history · Last edited by oleo.
Based on work by oleo, logue, Jelle Alten, cal, and BrianZhou.
Originally by oleo.
Page last modified on June 22, 2008, at 06:14 PM