WGT634U Tips & Tricks: Difference between revisions
Jump to navigation
Jump to search
Line 11: | Line 11: | ||
## '''Attention''': <tt>Kernel hacking</tt> -> <tt>Default kernel command string</tt>, the 2.6.12-rc3 needed <code>console=ttyS1,115200</code> while the 2.6.16 needs <code>console=ttyS0,115200</code> for the serial console. Also: <code>/etc/inittab</code> should be changed to give a shell on <code>tts/0</code>. |
## '''Attention''': <tt>Kernel hacking</tt> -> <tt>Default kernel command string</tt>, the 2.6.12-rc3 needed <code>console=ttyS1,115200</code> while the 2.6.16 needs <code>console=ttyS0,115200</code> for the serial console. Also: <code>/etc/inittab</code> should be changed to give a shell on <code>tts/0</code>. |
||
# Big change: OpenWgt used devfs for its device file system which has been deprecated for some time and is completely removed by now. For the time being you'll need to set up a static <code>/dev</code> directory on your root file system. Simply use tar to pack up a copy of your old <code>/dev</code> and untar it in your root. Note: your root will most likely be readonly, but the logger wants to create its <code>/dev/log</code> socket on startup. Thus you should create a symlink that links <code>/dev/log</code> to <code>/tmp/log</code> (for example). |
# Big change: OpenWgt used devfs for its device file system which has been deprecated for some time and is completely removed by now. For the time being you'll need to set up a static <code>/dev</code> directory on your root file system. Simply use tar to pack up a copy of your old <code>/dev</code> and untar it in your root. Note: your root will most likely be readonly, but the logger wants to create its <code>/dev/log</code> socket on startup. Thus you should create a symlink that links <code>/dev/log</code> to <code>/tmp/log</code> (for example). |
||
== Unionfs for linux-2.6.16 == |
|||
* UnionFS version 1.1.4 use a broken locking mechanism, so try a snapshot instead, e.g.: |
|||
* Prepare build |
|||
$ wget ftp://ftp.fsl.cs.sunysb.edu/pub/unionfs/snapshots/unionfs-20060503-0408.tar.gz |
|||
$ tar xzf unionfs-20060503-0408.tar.gz |
|||
$ cd unionfs-20060503-0408 |
|||
$ ./patch-kernel.sh ~/linux-2.6.16-with-unionfs/ |
|||
* Configure kernel |
|||
$ cd ~/linux-2.6.16-with-unionfs/ |
|||
$ make menuconfig ARCH=mips (Select "File Systems" -> "Miscellaneous filesystems" -> "<M> Union fs support") |
|||
$ # patch Makefile as described [[MathiasJeschke|here]], if you don't want debugging stuff -> saves many (useless) code |
|||
* Build kernel (and/or modules) |
|||
$ cat build.sh |
|||
#!/bin/sh |
|||
CROSS_PATH=/home/mj/openwgt-dev/buildroot/build_mipsel/staging_dir/bin/ |
|||
make \ |
|||
CC=$CROSS_PATH/mipsel-linux-gcc \ |
|||
LD=$CROSS_PATH/mipsel-linux-ld \ |
|||
AR=$CROSS_PATH/mipsel-linux-ar \ |
|||
NM=$CROSS_PATH/mipsel-linux-nm \ |
|||
ARCH=mips $* |
|||
$ sh build.sh modules |
|||
$ ls -l fs/unionfs/unionfs.ko |
|||
-rw-r--r-- 1 mj users 111415 2006-05-13 14:33 fs/unionfs/unionfs.ko |
Latest revision as of 11:00, 13 May 2006
New Kernel Howto
OpenWgt offers the choice of a 2.6.12-rc3 for the linux 2.6 series. This kernel comes from the Tuxap project and is slightly outdated by now. Here's how to get a more recent kernel up and running:
- Get a new kernel (I'll go with 2.6.16) from kernel.org (I used linux-mips.org, but kernel.org should be fine) and unpack it.
- Get the patches for bcm947xx support from OpenWrt's Kamikaze branch at https://dev.openwrt.org/browser/trunk/openwrt/target/linux/brcm-2.6/patches/
- Apply the patches:
$ cd linux-2.6.16
$ patch -p1 < /path/to/001-bcm947xx.patch
$ patch -p1 < /path/to/002-flash-map.patch
$ patch -p1 < /path/to/003-bcm4710_cache_fixes.patch
$ patch -p1 < /path/to/004-b44_bcm47xx_support.patch - You may use the .config file from the old kernel (it's in
/proc/config.gz
), but there are some tweaks to do:- Machine selection -> System type: Support for BCM947xx based boards
- Device drivers -> Network device support: [*] Ethernet (10 or 100Mbit), [*] EISA, VLB, PCI and on board controller -> <*> Broadcom 4400 ethernet support (EXPERIMENTAL)
- (Do not enable Device drivers -> Input device support -> Hardware I/O ports -> Serial I/O support -> i8042 PC Keyboard controller, the kernel would hang while probing for a keyboard controller.)
- Device drivers -> Character devices -> Serial drivers -> <*> 8250/16550 and compatible serial support, [*] Console on 8250/16550 and compatible serial port
- Attention: Kernel hacking -> Default kernel command string, the 2.6.12-rc3 needed
console=ttyS1,115200
while the 2.6.16 needsconsole=ttyS0,115200
for the serial console. Also:/etc/inittab
should be changed to give a shell ontts/0
.
- Big change: OpenWgt used devfs for its device file system which has been deprecated for some time and is completely removed by now. For the time being you'll need to set up a static
/dev
directory on your root file system. Simply use tar to pack up a copy of your old/dev
and untar it in your root. Note: your root will most likely be readonly, but the logger wants to create its/dev/log
socket on startup. Thus you should create a symlink that links/dev/log
to/tmp/log
(for example).
Unionfs for linux-2.6.16
- UnionFS version 1.1.4 use a broken locking mechanism, so try a snapshot instead, e.g.:
- Prepare build
$ wget ftp://ftp.fsl.cs.sunysb.edu/pub/unionfs/snapshots/unionfs-20060503-0408.tar.gz $ tar xzf unionfs-20060503-0408.tar.gz $ cd unionfs-20060503-0408 $ ./patch-kernel.sh ~/linux-2.6.16-with-unionfs/
- Configure kernel
$ cd ~/linux-2.6.16-with-unionfs/ $ make menuconfig ARCH=mips (Select "File Systems" -> "Miscellaneous filesystems" -> "<M> Union fs support") $ # patch Makefile as described here, if you don't want debugging stuff -> saves many (useless) code
- Build kernel (and/or modules)
$ cat build.sh #!/bin/sh CROSS_PATH=/home/mj/openwgt-dev/buildroot/build_mipsel/staging_dir/bin/ make \ CC=$CROSS_PATH/mipsel-linux-gcc \ LD=$CROSS_PATH/mipsel-linux-ld \ AR=$CROSS_PATH/mipsel-linux-ar \ NM=$CROSS_PATH/mipsel-linux-nm \ ARCH=mips $* $ sh build.sh modules $ ls -l fs/unionfs/unionfs.ko -rw-r--r-- 1 mj users 111415 2006-05-13 14:33 fs/unionfs/unionfs.ko