New adventures with CH3HNAS

Hi folks!
Following with my CH3HNAS adventures, I’ve decided to build my own cross-compiling environment based on the wonderful instructions from Henk-Jan.
To avoid unexpected issues on my Arch distro, I’ve created a new VM running debian.
Here I found the 1st issue, there’s no gcc-4.1 on the last debian version, so I setted up lenny’s repos:
[cc lang=”bash” theme=”blackboard”]
cp /etc/apt/sources.list /etc/apt/sources.list.orig
echo “deb http://ftp.us.debian.org/debian/ lenny main contrib non-free” > /etc/apt/sources.list
echo “deb-src http://ftp.us.debian.org/debian/ lenny main contrib non-free” >> /etc/apt/sources.list
apt-get update
apt-get install gcc-4.1 g++-4.1
mv /etc/apt/sources.list /etc/apt/sources.list.lenny
cp -fv /etc/apt/sources.list.orig /etc/apt/sources.list
[/cc]
Having the minimal debian distro, “bzip2” is necessary too.

I get an estrange error at the 1st step’s while “making” the build environment:
[cc lang=”bash” theme=”blackboard”]
scripts/unifdef.c:209: error: conflicting types for ‘getline’
/usr/include/stdio.h:XXX: note: previous declaration of ‘getline’ was here
[/cc]
I was running crazy with that till I found this simply solution.
The problem is that if you want to use the “Makefile” provided, the kernel source is bzip’ed, so callme fool, but I bunzipped/bziped again with the patch inside :)
[cc lang=”bash” theme=”blackboard”]
cd OXNAS810/src/rootfs/buildroot/../buildroot-archives/
tar xjfv linux-2.6.24.7.tar.bz2
sed -i “s/getline/uc_&/” ./linux-2.6.24.7/scripts/unifdef.c
mv linux-2.6.24.7.tar.bz2 linux-2.6.24.7.tar.bz2.orig
tar cjfv linux-2.6.24.7.tar.bz2 linux-2.6.24.7
[/cc]
And then I simply run:
[cc lang=”bash” theme=”blackboard”]
make
[/cc]
To build the environment.

Follow and Share!!

3 thoughts on “New adventures with CH3HNAS

  1. Hi dodger,

    Did you already get cross compiled packages?

    I’m using cross compiled packages,from henkjan, but like to get mediatomb working. Until now I haven’t got a working solution. Do you have this?

    Erik

  2. Good morning!

    At the end I didn’t get it working (Conceptronic’s SDK).
    This post was the last time I tried to build it and after 2+hours building, it fails with a very strange error (and I use to build app’s from source).

    Then I tried to build apps with scratchbox2 but it didn’t work, I mean, sb2 build the application in the correct ARM format but CH3 didn’t run it.

    I think the solution is to use the same linux version Henkjan & conceptronic use to build it.
    As I was using a virtualbox machine to build it, if I get it working, I will upload it so you can download&use it easily.
    I will send you an email in that case :)
    Thanks

  3. Hi again,
    Finally i get cross compiling working with buildroot.
    Some apps didnot work (i think i did something wrong…) but other one’s like strace works really fine.
    I’m trying to build mediatomb but is really hard, I will publish the package asap I get it working :-)
    Thanks

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.