1 |
Here is how i did it, maybe it is useful for someone else: |
2 |
TARGET="powerpc-e300c2-linux-gnu" |
3 |
MY_ROOT="/usr/${TARGET}" |
4 |
mkdir -p /tmp/${TARGET} |
5 |
|
6 |
qlist --quiet --all ${TARGET} > /tmp/${TARGET}/cross-tools |
7 |
ROOT=${MY_ROOT} qlist --quiet --all > /tmp/${TARGET}/pkgs |
8 |
|
9 |
#prefix all paths with our target root prefix |
10 |
sed -i s:/:${MY_ROOT}/: /tmp/${TARGET}/pkgs |
11 |
|
12 |
tar czf /tmp/${TARGET}.tgz -T /tmp/${TARGET}/cross-tools \ |
13 |
-T /tmp/${TARGET}/pkgs |
14 |
|
15 |
This will create a tgz with all the binaries one need to cross compile. |
16 |
Just whish I could avoid the sed stmt, but qlist can't list the ABS path(hint, hint:) |
17 |
|
18 |
here is a crude ebuild, improvements welcome: |
19 |
|
20 |
DESCRIPTION="PowerPC cross toolchain" |
21 |
HOMEPAGE="http://devsrv.transmode.se/" |
22 |
SRC_URI="http://devsrv.transmode.se/portage/local/distfiles/powerpc-e300c2-linux-gnu.tgz" |
23 |
|
24 |
LICENSE="gpl" |
25 |
SLOT="0" |
26 |
KEYWORDS="x86 amd64" |
27 |
RESTRICT="nomirror strip" |
28 |
|
29 |
S=${WORKDIR} |
30 |
|
31 |
src_compile() { |
32 |
einfo "Nothing to compile..." |
33 |
} |
34 |
|
35 |
src_install() { |
36 |
einfo "Installing..." |
37 |
cp -a * "${D}" || die "Install failed" |
38 |
} |
39 |
|
40 |
prepall() { |
41 |
einfo "Prepall..." |
42 |
} |
43 |
|
44 |
|
45 |
pkg_postinst() { |
46 |
binutils-config powerpc-e300c2-linux-gnu-2.20.1 |
47 |
gcc-config powerpc-e300c2-linux-gnu-4.4.4 |
48 |
} |