Differences between revisions 1 and 23 (spanning 22 versions)
Revision 1 as of 2005-05-16 10:59:30
Size: 834
Comment:
Revision 23 as of 2008-01-18 12:56:19
Size: 2337
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
= Gentoo On iPaq =
Line 3: Line 5:
Use only as much space as necessary. This includes no portage nor gcc install on target system (ipaq). The idea is tu fully cross-compile the system for ipaq on a i686 host into a subdir and create a jffs2 image which will be uploaded to the ipaq. Use only as little space as necessary. This includes no portage nor gcc install on target system (ipaq). The idea is to fully cross-compile the system for ipaq on a i686 host into a subdir (using the ${ROOT} portage feature) and create a jffs2 image which will be uploaded to the ipaq (later updates will be done over nfs-mounted root).

 /!\ UPDATE: Now that the handhelds.org 2.6 kernel can boot right from SD, we don't need to bother with creating the jffs2 image.

<<GoogleAd>>
Line 6: Line 12:

It's best if you write this to a script...

First, we need the tools for cross-compiling...
Line 11: Line 21:
}}}
Line 12: Line 23:
If the above fails, try with safer versions...

{{{
crossdev -t arm-unknown-linux-gnu --g 3.4.6 --l 2.3.6-r3
}}}

If this fails complaining kernel headers are too old, do the following quick hack (see [[http://forums.gentoo.org/viewtopic-t-452498.html|this forum]] for more info...

{{{
ln -s /usr/arm-unknown-linux-gnu/usr/include/ /usr/arm-unknown-linux-gnu/include

mkdir /usr/arm-unknown-linux-gnu/usr/arm-unknown-linux-gnu
ln -s /usr/arm-unknown-linux-gnu/lib/ /usr/arm-unknown-linux-gnu/usr/arm-unknown-linux-gnu/lib
}}}

Now you should have the complete cross-compiler (with C++) support ready. If not, don't bother to continue...

Prepare the destination directory...

{{{
mkdir /tmp/ipaq
}}}

Now, we can start building the target system...

{{{
Line 13: Line 50:
export ACCEPT_KEYWORDS="arm" export ACCEPT_KEYWORDS="-* arm"
Line 29: Line 66:
USE="bootstrap build" emerge sysvinit
USE="bootstrap build" emerge baselayout
emerge sys-kernel/linux-headers
USE="bootstrap build" emerge sys-libs/glibc
USE="bootstrap build" emerge sysvinit -1
USE="bootstrap build" emerge baselayout -1
emerge sys-kernel/linux-headers -1
USE="bootstrap build" emerge =sys-libs/glibc-2.3* -1
Line 34: Line 71:

<<GoogleAd>>

== Vapier's achievements ==

 * http://dev.gentoo.org/~vapier/CROSS-COMPILE-HOWTO
 * http://dev.gentoo.org/~vapier/CROSS-COMPILE-SYSTEM

== Other links ==

 * http://gentoo-wiki.com/Embedded_Gentoo
 * http://www.yargybot.com/Familiar/MMCFilesystem.html
 * http://handhelds.org/moin/moin.cgi/FamiliarBackupHowto

Gentoo On iPaq

The idea

Use only as little space as necessary. This includes no portage nor gcc install on target system (ipaq). The idea is to fully cross-compile the system for ipaq on a i686 host into a subdir (using the ${ROOT} portage feature) and create a jffs2 image which will be uploaded to the ipaq (later updates will be done over nfs-mounted root).

  • /!\ UPDATE: Now that the handhelds.org 2.6 kernel can boot right from SD, we don't need to bother with creating the jffs2 image.

The steps

It's best if you write this to a script...

First, we need the tools for cross-compiling...

emerge crossdev

crossdev --target arm-unknown-linux-gnu

If the above fails, try with safer versions...

crossdev -t arm-unknown-linux-gnu --g 3.4.6 --l 2.3.6-r3

If this fails complaining kernel headers are too old, do the following quick hack (see this forum for more info...

ln -s /usr/arm-unknown-linux-gnu/usr/include/ /usr/arm-unknown-linux-gnu/include

mkdir /usr/arm-unknown-linux-gnu/usr/arm-unknown-linux-gnu
ln -s /usr/arm-unknown-linux-gnu/lib/ /usr/arm-unknown-linux-gnu/usr/arm-unknown-linux-gnu/lib

Now you should have the complete cross-compiler (with C++) support ready. If not, don't bother to continue...

Prepare the destination directory...

mkdir /tmp/ipaq

Now, we can start building the target system...

export ARCH="arm"
export ACCEPT_KEYWORDS="-* arm"
export CHOST="arm-unknown-linux-gnu"
export CBUILD="i686-pc-linux-gnu"

export CFLAGS="-O2 -pipe"
export CXXFLAGS=${CFLAGS}

export ROOT="/tmp/ipaq"

export USE="-*"

export FEATURES="-distcc"

export CONFIG_PROTECT="-* ${ROOT}/etc"

### Bootstrap ###
USE="bootstrap build" emerge sysvinit -1
USE="bootstrap build" emerge baselayout -1
emerge sys-kernel/linux-headers -1
USE="bootstrap build" emerge =sys-libs/glibc-2.3* -1

Vapier's achievements