View Full Version : Build Environment

11-10-2010, 02:29 PM
Having combed through a lot of the available GPL (most collected last april, a few updates since then), here the list of kernel sources that I have found that seem different from one another.

I eliminated all clearly identical sources (matching md5sums or otherwise determined). This is what remains:

Seagate/FAGOFlexTV/linux-2.6.12/and here are the three toolchains that I can find:
One that is identical in every way from two sources:
asus-toolchain (inside http://dlcdnet.asus.com/pub/ASUS/Digital_Media_Player/HDP-R1/SourceCode/OPlay_HDP-R1_GPL_SourceCode.ziphttp://minimodding.com/img/icons/external_link.gif (http://dlcdnet.asus.com/pub/ASUS/Digital_Media_Player/HDP-R1/SourceCode/OPlay_HDP-R1_GPL_SourceCode.zip) )
mvix (available here: http://www.mvixusa.com/support/index.php?_m=downloads&_a=viewdownload&downloaditemid=50http://minimodding.com/img/icons/external_link.gif (http://www.mvixusa.com/support/index.php?_m=downloads&_a=viewdownload&downloaditemid=50) as shown here: http://files.getdropbox.com/u/397941/Ultio%20Files/Ultio%20Firmware%20and%20Sourcecode/Ultio%20Toolchain_mipsel-6.03-6.i586.zip)http://minimodding.com/img/icons/external_link.gif (http://files.getdropbox.com/u/397941/Ultio%20Files/Ultio%20Firmware%20and%20Sourcecode/Ultio%20Toolchain_mipsel-6.03-6.i586.zip%29)
The toolchain from eminent is different in a few ways- it includes
( http://downloads.eminent-online.com/EM7080-Mipsel-6.03-7.tar.gzhttp://minimodding.com/img/icons/external_link.gif (http://downloads.eminent-online.com/EM7080-Mipsel-6.03-7.tar.gz) as shown here: http://www.eminent-online.com/en/product/301/3/eminent-hd-media-player-em7080-hdmedia-rt.html)http://minimodding.com/img/icons/external_link.gif (http://www.eminent-online.com/en/product/301/3/eminent-hd-media-player-em7080-hdmedia-rt.html%29)
most differences seem trivial (the gcc is the same) with one exception:
file eminent/EM7080-Mipsel-6.03-7/usr\ \(3\)/local/toolchain_mipsel/bin/mipsel-linux-uclibc-gdb
eminent/EM7080-Mipsel-6.03-7/usr (3)/local/toolchain_mipsel/bin/mipsel-linux-uclibc-gdb: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.4, stripped
Which if I recall correctly could be an important inclusion- the gdbserver as compiled need a matching/compiled at the same time gdb to run on your pc.....
This could be that.

Now, the build environment stuff:

I have successfully built a few modules using the asus kernel source and the asus toolchain.

The Asus GPL source (including the kernel and toolchain) can be downloaded using the following link:

To do so I followed the instructions set out here:

Here's it via google translate:
http://translate.google.com/translate?u=http%3A%2F%2Fwww.cnitblog.com%2Fgouzhu ang%2Farchive%2F2010%2F09%2F29%2Fbuildroot.html

and as setout here:
ala google translate:
http://translate.google.com/translate?u=http%3A%2F%2Fwww.cnitblog.com%2Fgouzhu ang%2Farchive%2F2010%2F11%2F04%2Fnfs_server.html

As a matter of fact, I initially had difficulty compiling buildroot as described, so I ended up following the steps in the second post, ignored adding nfs-stuff and just added different modules to build. For example, I made the hfs.ko and hfsplus.ko modules. Eventually, I took scboley's (http://www.patriotmemory.com/forums/showthread.php?t=4974)usbnet.c &(asix.h) and copied them OVER the original kernel sources drivers/usb/net/ (some directory like that, writing from memory at the moment) and then:

cd asus-gpl/linux-2.6.12
cp .config.develop.avhdd.mars.old. .config
PATH=/path/to/asus/toolchain/bin:$PATH make menuconfig
(navigate menu, select modules you want to build, exit, save config)

PATH=/path/to/asus/toolchain/bin:$PATH make

And that works. Compiles a kernel, makes modules that seem to load. Haven't tested the kernel.

I have tried the nfs-server bit, temporarily overmounting the new libs that the blog owner already shared and other tricks- everything seemed to work, though I couldn't, on my single attempt, get the nfs-server offered mount point to mount on a remote machine.


11-10-2010, 03:22 PM
Hi wigout,

Have you ever tried to compile unionfs, aufs or any other filesystem union module as mips. It would be nice to add this capability to the PBO especially since the introduction of the squashfs. If we could have any of those module to load up on the PBO we could join the squashfs with another writable filesystems to make the squashfs read and write. Any thoughts .....

I did find a precompile mips of one of those module before (forgot which one right now) but I was not able to load it. It was probably compiled for a different kernel. Anyhow food for thoughts .....


11-11-2010, 08:24 PM
I know very very little about all the module stuff.

I did catch a reference to someone trying to build unionfs.1.0.13 successfully under kernel

I hacked my way through the errors I encountered.

Eventually I made the attached module.

This module is old. I don't really know how well this will work.

Those who would like to experiment can give it a shot.

Again, insmod unionfs.ko works for my system (pbo running medebo)

11-12-2010, 03:43 AM
Thanks wigout I'll give it a try when I have a chance and report results.

11-15-2010, 01:19 PM
Ok do I had a little bit of time to try the unionfs module that wigout has kindly compiled. My goal is to create a writable squashfs filesystem. I also tried this last nite and writing my results here this morning so hopefully my memory is as good as I think it is. Still at the experimental stage but here's are my findings/result.

1) First I installed unionfs.ko module using insmod. Since I copy the module to the HDD I used the following command:

# insmod /tmp/hdd/volumes/HDD1/unionfs.ko

2) Now since my firmware uses yaffs I had to pick a directory that I know is read only to use to prove the concept. I decided to use the /usr/local/bin which I know is read only on the yaffs filesystems. So with that in mind I created two directory (/tmp/writable and /tmp/union); I believe /tmp is writable on squashfs firmware but even if it is not I could always use the /usr/local/etc which I am 100% is writable on any firmware. Anyhow after that I joined all those directories. So here's the commands I issued:

# mkdir /tmp/writable
# mkdir /tmp/union
# mount -t unionfs -o dirs=/tmp/writable=rw:/usr/local/bin=ro unionfs /tmp/union

Ok so now I have /usr/local/bin/ and /tmp/writable/ joined to /tmp/union/

3) Ok so now /tmp/union contains all the files/directories that are in /usr/local/bin/ and /tmp/writable. From this point on everything I do (create new file, edit files etc .....) is done in the /tmp/union but shows up in /tmp/writable ...... almost there but we still need the our friend the overmount the complete the task appropriately. So now we issue that command:

# mount --bind /tmp/union /usr/local/bin

I can't believe this actually worked overmounting an union mount over itself!!! Man you got to love the flexibility of linux.

So now we are done anything we can add/edit files on the /usr/local/bin/. Any changes we make is being reflected on the /tmp/writable which is unionized with /usr/local/bin/ on /tmp/union which is also overmounted on /usr/local/bin.

Now wrap all these command into a nice a script and you have something that call be called up from the /usr/local/etc/rcS file.

So you are probably wandering why not just create a directory in /tmp/union and overmount to /usr/local/bin and be done with it. Well for this to work properly you will first have to copy the whole content of /usr/local/bin to the /tmp/union chewing up some precious memory. Not so bad if there isn't much contents in the /usr/local/bin but what about a whole filesystem ????? .......... Next stop trying this on the whole root directory and making the whole squashfs firmware writable.

To return to the original condition just enter the umount command twice:

# umount /tmp/union
# umount /tmp/union

Again this is still experimental but it did worked fine for me. This experimentation would not have been possible without the compilation of the unionfs by wigout .... so thanks again.

11-19-2010, 02:03 AM

Thanks for testing that out. Squashfs is where all the firmware releases are headed, so a working unionfs module would be great. Though as long as we've got the /usr/local/etc/rcS in writable land, armed with mount -o bind most things are possible without resorting to unionfs.


11-19-2010, 03:22 AM

Thanks for testing that out. Squashfs is where all the firmware releases are headed, so a working unionfs module would be great. Though as long as we've got the /usr/local/etc/rcS in writable land, armed with mount -o bind most things are possible without resorting to unionfs.


Agree with you as long as the stuff you want to overmount is not too big since it first has to be copied somewhere writable before it is overmounted. By the way all the credit for a working unionfs goes to you; you are the one that manage to compile it so it would run on the PBO (mipsel).


11-21-2010, 04:16 AM
After experimenting some more I realized that a writable directory is not necessary you can just write on the same directory as the mount. Hence the command is now:

# insmod /tmp/hdd/volumes/HDD1/unionfs.ko
# mkdir /tmp/union
# mount -t unionfs -o dirs=/tmp/union=rw:/usr/local/bin=ro unionfs /tmp/union
# mount --bind /tmp/union /usr/local/bin

Unfortunately I still haven't been able to mount the whole root directory "/" that way yet and make it writable.

12-08-2010, 05:58 PM
Here's a pair of very interesting threads from the xtreamer forums:

Compiling a recent toolchain for Xtreamer software development (http://forum.xtreamer.net/topic/17790-compiling-a-recent-toolchain-for-xtreamer-software-development/)

upgrading uClibc and busybox, and installing dropbear on the Xtreamer (http://forum.xtreamer.net/topic/17819-upgrading-uclibc-and-busybox-and-installing-dropbear-on-the-xtreamer/)

This uses crosstool to build the cross-compiling environment & toolchain.

Worth checking out.