home  wiki

Spelling: mwgapHacking


This page contains information about the MWGAP AP from Minitar. This
device was developed by Minitar as a replacement for the MNWAPB and
resulted form a consultative process Minitar performed with users on
their forums.

OPENWRT PORT

The goal is to port OpenWrt [1] to this device. I'll document the
process on this page and include links to any files that are created
along the way. At some stage I'll build a master patch and set things
up to pull in the appropriate bits as needed.

The steps are:

* Select the correct build options
* Build mips big-endian tool chain with non-mips patent free patch
* Building the kernel

SELECT CORRECT BUILD OPTIONS

The target device does not have a configuration in the build
environment. We need to add one and select the correct target and
target options befre we can build either the toolchain or the firmware
itself.

* Add the following to trunk/target/Config.in at line 191, just
before the endif

config LINUX_2_4_RTL8186 bool "Realtek RTL8186 2.4 [2]" select
LINUX_2_4 depends BROKEN select mips select BIG_ENDIAN select
USES_JFFS2 help Build firmware for Realtek RTL8186 based boards ( eg
Minitar MWGAP )

* Add the following line to trunk/include/

* Select the configuration options to build the right platform

make menuconfig, select Advanced configuration options for
developers, select Toolchain options, select gcc version 3.4.6-nonmips
back up to advanced options, select show broken platforms back to top
level, select the target system you added ( Realtek RTL8186 2.4 [3] )
save your config

PATENT FREE TOOLCHAIN

This step looks surprisingly simple. I was going to apply the patches
we used for the Minitar MNWAPB development from here [4], but after
looking into the toolchain build there is already a option to build
gcc 3.4.6 with a patent-free patch applied. The patch is different (
not sure of the origin ) but addresses the same instructions that the
Lexra core does not support.

Getting it to build needed a couple of hacks:

* the download of gcc will fail so cd dl and copy gcc-3.4.6.tar.bz2
to gcc-3.4.6-nonmips.tar.bz2 ( a hard link may also be OK )
* When the tar is unpacked it will by default unpack into gcc-3.4.6
and the patches will fail to apply. In the
trunk/toolchain/gcc/Makefile find the place where the compiler is
unpacked ( line 115ish )and add this line:

mv $(PKG_BUILD_DIR)/../gcc-3.4.6/* $(PKG_BUILD_DIR)

BUILDING THE KERNEL

Building against the 2.4.32 kernel needs an updated .config and a
number of patches.

* create a dir trunk/target/linux/rtl8186 &
trunk/target/linux/rtl8186/patches
* cd into linux/mtl8186 and copy the makefile from ../brcm/Makefile
to .
* get patched config [5]
* cd mwgap/patches and wget the kernel patches [6]
* create a dir trunk/target/image/rtl8186
* cd into image/rtl8186 and cp ../brcm/Makefile and the dir
lmza-load ( there's an alternative loader as well - more later )

The Minitar firmware builds a kernel with an embedded ramdisk. This
is a problem in some ways and good in others. It's a problem in that
you can't change the rootfs without having to rebuild the kernel but
good in that once the kernel loads it has also loaded the rootfs into
RAM. This was great for testing builds a you could tftp an image to
the device and then jump to it to run it - no need to touch the flash
at all. This allowed you to borrow a device for a short while to test
on it.

MINITAR FIRMWARE

BOOTLOADER



Links:
------
[1] http://melbournewireless.org.au/?OpenWrt
[2] http://melbournewireless.org.au/?2.4
[3] http://melbournewireless.org.au/?2.4
[4] http://nonmips.sourceforge.net
[5] http://melbournewireless.org.au/files/misc/minitar/mwgap/config
[6]
http://melbournewireless.org.au/files/misc/minitar/mwgap/patches/jumbo_kernel.gz

[EditText] [Spelling] [Current] [Raw] [Code] [Diff] [Subscribe] [VersionHistory] [Revert] [Delete] [RecentChanges]

> home> about> events> files> members> maps> wiki board   > home   > categories   > search   > changes   > formatting   > extras> site map

Username
Password

 Remember me.
>

> forgotten password?
> register?
currently 0 users online
Node Statistics
building132
gathering192
interested515
operational242
testing216