Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Gentoo: Embedded

Creating a binary only package of your cross toolchain

 

 

Gentoo embedded RSS feed   Index | Next | Previous | View Threaded


joakim.tjernlund at transmode

Oct 5, 2010, 10:42 AM

Post #1 of 3 (402 views)
Permalink
Creating a binary only package of your cross toolchain

Here is how i did it, maybe it is useful for someone else:
TARGET="powerpc-e300c2-linux-gnu"
MY_ROOT="/usr/${TARGET}"
mkdir -p /tmp/${TARGET}

qlist --quiet --all ${TARGET} > /tmp/${TARGET}/cross-tools
ROOT=${MY_ROOT} qlist --quiet --all > /tmp/${TARGET}/pkgs

#prefix all paths with our target root prefix
sed -i s:/:${MY_ROOT}/: /tmp/${TARGET}/pkgs

tar czf /tmp/${TARGET}.tgz -T /tmp/${TARGET}/cross-tools \
-T /tmp/${TARGET}/pkgs

This will create a tgz with all the binaries one need to cross compile.
Just whish I could avoid the sed stmt, but qlist can't list the ABS path(hint, hint:)

here is a crude ebuild, improvements welcome:

DESCRIPTION="PowerPC cross toolchain"
HOMEPAGE="http://devsrv.transmode.se/"
SRC_URI="http://devsrv.transmode.se/portage/local/distfiles/powerpc-e300c2-linux-gnu.tgz"

LICENSE="gpl"
SLOT="0"
KEYWORDS="x86 amd64"
RESTRICT="nomirror strip"

S=${WORKDIR}

src_compile() {
einfo "Nothing to compile..."
}

src_install() {
einfo "Installing..."
cp -a * "${D}" || die "Install failed"
}

prepall() {
einfo "Prepall..."
}


pkg_postinst() {
binutils-config powerpc-e300c2-linux-gnu-2.20.1
gcc-config powerpc-e300c2-linux-gnu-4.4.4
}


peter at stuge

Oct 5, 2010, 11:34 AM

Post #2 of 3 (413 views)
Permalink
Re: Creating a binary only package of your cross toolchain [In reply to]

Joakim Tjernlund wrote:
> MY_ROOT="/usr/${TARGET}"
> ROOT=${MY_ROOT} qlist --quiet --all > /tmp/${TARGET}/pkgs
> sed -i s:/:${MY_ROOT}/: /tmp/${TARGET}/pkgs
..
> Just whish I could avoid the sed stmt, but qlist can't list the ABS
> path(hint, hint:)

Is there really no better way to use qlist here?

You fake a /usr/blah root for qlist instead of asking qlist to just
show you the contents of the actual package in the current system -
I think that would then include the actual paths as well.

This just looks like ROOT= abuse..


//Peter


joakim.tjernlund at transmode

Oct 5, 2010, 1:28 PM

Post #3 of 3 (403 views)
Permalink
Re: Creating a binary only package of your cross toolchain [In reply to]

Peter Stuge <peter [at] stuge> wrote on 2010/10/05 20:34:07:
>
> Joakim Tjernlund wrote:
> > MY_ROOT="/usr/${TARGET}"
> > ROOT=${MY_ROOT} qlist --quiet --all > /tmp/${TARGET}/pkgs
> > sed -i s:/:${MY_ROOT}/: /tmp/${TARGET}/pkgs
> ..
> > Just whish I could avoid the sed stmt, but qlist can't list the ABS
> > path(hint, hint:)
>
> Is there really no better way to use qlist here?
>
> You fake a /usr/blah root for qlist instead of asking qlist to just
> show you the contents of the actual package in the current system -
> I think that would then include the actual paths as well.

Nope, this is no fake. I have xmerged a few more pkgs to /usr/blah and
and I need to get those too. These are to make xcompling a easier
by install ncurses etc. too.

Gentoo embedded RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.