Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Gentoo Embedded (http://www.linux-archive.org/gentoo-embedded/)
-   -   crossdev improvements (http://www.linux-archive.org/gentoo-embedded/431229-crossdev-improvements.html)

Joakim Tjernlund 09-24-2010 04:01 PM

crossdev improvements
 
Some improvements thoughts for crossdev:

- make crossdev respect PORTAGE_CONFIGROOT. We use our own portage
tree for our pkgs, including the compiler, as we want to be able
to recreate/rebuild the same sw versions in the future.

- a switch to control softfloat instead of encoding this in vendor
name. The cross name is getting too long with softfloat in it.

- make crossdev build a binary cross compiler pkg which can be
emerged by other machines.

Jocke

Mike Frysinger 09-24-2010 05:01 PM

crossdev improvements
 
On Friday, September 24, 2010 12:01:21 Joakim Tjernlund wrote:
> - make crossdev respect PORTAGE_CONFIGROOT. We use our own portage
> tree for our pkgs, including the compiler, as we want to be able
> to recreate/rebuild the same sw versions in the future.

i dont know what this means. crossdev doesnt touch PORTAGE_CONFIGROOT at all.

> - a switch to control softfloat instead of encoding this in vendor
> name. The cross name is getting too long with softfloat in it.

except that softfloat checks go beyond the cross-compiler and packages in the
tree need to be able to query support. unless you have a clean way of
handling this, there is no alternative.

> - make crossdev build a binary cross compiler pkg which can be
> emerged by other machines.

crossdev is merely a frontend to emerge. so do it yourself:
crossdev ... --portage -B ...
-mike

Joakim Tjernlund 09-24-2010 05:42 PM

crossdev improvements
 
Mike Frysinger <vapier@gentoo.org> wrote on 2010/09/24 19:01:26:
>
> On Friday, September 24, 2010 12:01:21 Joakim Tjernlund wrote:
> > - make crossdev respect PORTAGE_CONFIGROOT. We use our own portage
> > tree for our pkgs, including the compiler, as we want to be able
> > to recreate/rebuild the same sw versions in the future.
>
> i dont know what this means. crossdev doesnt touch PORTAGE_CONFIGROOT at all.

Exactly, it uses hardcoded paths to /etc et. all instead of PORTAGE_CONFIGROOT/etc

>
> > - a switch to control softfloat instead of encoding this in vendor
> > name. The cross name is getting too long with softfloat in it.
>
> except that softfloat checks go beyond the cross-compiler and packages in the
> tree need to be able to query support. unless you have a clean way of
> handling this, there is no alternative.

packages in the tree? I figured that only gcc and glibc(possibly binutils too)
needed that info?

I just tried to use EXTRA_ECONF=--without-fp instead of softfloat
and it seems to have worked, at least gcc and glibc builds without FPU insn's

hmm, wonder if COLLECT_GCC_OPTIONS could be used to see if softfloat is on?

>
> > - make crossdev build a binary cross compiler pkg which can be
> > emerged by other machines.
>
> crossdev is merely a frontend to emerge. so do it yourself:
> crossdev ... --portage -B ...

That works? Guess I have to try it then :)
However, the sauna is waiting for me ATM so it will have to wait ..

Jocke

Mike Frysinger 09-25-2010 05:37 AM

crossdev improvements
 
On Friday, September 24, 2010 13:42:04 Joakim Tjernlund wrote:
> Mike Frysinger <vapier@gentoo.org> wrote on 2010/09/24 19:01:26:
> > On Friday, September 24, 2010 12:01:21 Joakim Tjernlund wrote:
> > > - make crossdev respect PORTAGE_CONFIGROOT. We use our own portage
> > >
> > > tree for our pkgs, including the compiler, as we want to be able
> > > to recreate/rebuild the same sw versions in the future.
> >
> > i dont know what this means. crossdev doesnt touch PORTAGE_CONFIGROOT at
> > all.
>
> Exactly, it uses hardcoded paths to /etc et. all instead of
> PORTAGE_CONFIGROOT/etc

so you're talking about the /etc/portage/ file setup. you should be explicit
in your examples :P.

i'd file a bug about this.
-mike

Joakim Tjernlund 09-25-2010 05:11 PM

crossdev improvements
 
Mike Frysinger <vapier@gentoo.org> wrote on 2010/09/25 07:37:49:
>
> On Friday, September 24, 2010 13:42:04 Joakim Tjernlund wrote:
> > Mike Frysinger <vapier@gentoo.org> wrote on 2010/09/24 19:01:26:
> > > On Friday, September 24, 2010 12:01:21 Joakim Tjernlund wrote:
> > > > - make crossdev respect PORTAGE_CONFIGROOT. We use our own portage
> > > >
> > > > tree for our pkgs, including the compiler, as we want to be able
> > > > to recreate/rebuild the same sw versions in the future.
> > >
> > > i dont know what this means. crossdev doesnt touch PORTAGE_CONFIGROOT at
> > > all.
> >
> > Exactly, it uses hardcoded paths to /etc et. all instead of
> > PORTAGE_CONFIGROOT/etc
>
> so you're talking about the /etc/portage/ file setup. you should be explicit
> in your examples :P.
>
> i'd file a bug about this.
> -mike

Until then, here is an initial hack(untested), against 20100814:

Joakim Tjernlund 09-30-2010 03:38 PM

crossdev improvements
 
Mike Frysinger <vapier@gentoo.org> wrote on 2010/09/24 19:01:26:
>
> On Friday, September 24, 2010 12:01:21 Joakim Tjernlund wrote:
> > - make crossdev respect PORTAGE_CONFIGROOT. We use our own portage
> > tree for our pkgs, including the compiler, as we want to be able
> > to recreate/rebuild the same sw versions in the future.
>
> i dont know what this means. crossdev doesnt touch PORTAGE_CONFIGROOT at all.
>
> > - a switch to control softfloat instead of encoding this in vendor
> > name. The cross name is getting too long with softfloat in it.
>
> except that softfloat checks go beyond the cross-compiler and packages in the
> tree need to be able to query support. unless you have a clean way of
> handling this, there is no alternative.
>
> > - make crossdev build a binary cross compiler pkg which can be
> > emerged by other machines.
>
> crossdev is merely a frontend to emerge. so do it yourself:
> crossdev ... --portage -B ...

So I tried this(using --portage -b instead) and I don't quite get it to work.
My binpkg foo is pretty much non existing :)

So far I get a bin pkg in
/usr/portage/packages/cross/powerpc-4.4.4_softfloat-linux-gnu/cross-powerpc-4.4.4_softfloat-linux-gnu
and to get at it I must change PKGDIR to /usr/portage/packages/cross/powerpc-4.4.4_softfloat-linux-gnu/
get at the package. Does it have to be there or could it be moved to /usr/portage/packages/
so emerge finds it without messing with PKGDIR?

Next problem, how do I force other computers to use the bin pkg? Unless one
passes -G to emerge, emerge rebuilds the pkg and I don't want that
as I have passed EXTRA_ECONF args and added a small patch to glibc as well.

Jocke

Mike Frysinger 10-01-2010 12:36 AM

crossdev improvements
 
On Thursday, September 30, 2010 11:38:58 Joakim Tjernlund wrote:
> So I tried this(using --portage -b instead) and I don't quite get it to
> work. My binpkg foo is pretty much non existing :)
>
> So far I get a bin pkg in
> /usr/portage/packages/cross/powerpc-4.4.4_softfloat-linux-gnu/cross-powerpc
> -4.4.4_softfloat-linux-gnu and to get at it I must change PKGDIR to
> /usr/portage/packages/cross/powerpc-4.4.4_softfloat-linux-gnu/ get at the
> package. Does it have to be there or could it be moved to
> /usr/portage/packages/ so emerge finds it without messing with PKGDIR?

crossdev itself forces a PKGDIR subdir. this dates back 5.5 years at this
point. at the time, i was experimenting with same $CATEGORY value as the
system and only differentiating by SLOT, but portage cant handle that: sys-
devel/gcc-4.4.4-r1:SLOT=i686-pc-linux-gnu will collide with sys-
devel/gcc-4.4.4-r1:SLOT=powerpc-unknown-linux-gnu in /var/db/pkg/. since
ultimately i didnt go that direction (we have the cross-xxx CATEGORY value
now), i guess i can drop the PKGDIR munging completely from crossdev.

> Next problem, how do I force other computers to use the bin pkg? Unless one
> passes -G to emerge, emerge rebuilds the pkg and I don't want that
> as I have passed EXTRA_ECONF args and added a small patch to glibc as well.

man emerge -> -K
-mike

Joakim Tjernlund 10-01-2010 06:56 AM

crossdev improvements
 
Mike Frysinger <vapier@gentoo.org> wrote on 2010/10/01 02:36:44:
>
> On Thursday, September 30, 2010 11:38:58 Joakim Tjernlund wrote:
> > So I tried this(using --portage -b instead) and I don't quite get it to
> > work. My binpkg foo is pretty much non existing :)
> >
> > So far I get a bin pkg in
> > /usr/portage/packages/cross/powerpc-4.4.4_softfloat-linux-gnu/cross-powerpc
> > -4.4.4_softfloat-linux-gnu and to get at it I must change PKGDIR to
> > /usr/portage/packages/cross/powerpc-4.4.4_softfloat-linux-gnu/ get at the
> > package. Does it have to be there or could it be moved to
> > /usr/portage/packages/ so emerge finds it without messing with PKGDIR?
>
> crossdev itself forces a PKGDIR subdir. this dates back 5.5 years at this
> point. at the time, i was experimenting with same $CATEGORY value as the
> system and only differentiating by SLOT, but portage cant handle that: sys-
> devel/gcc-4.4.4-r1:SLOT=i686-pc-linux-gnu will collide with sys-
> devel/gcc-4.4.4-r1:SLOT=powerpc-unknown-linux-gnu in /var/db/pkg/. since
> ultimately i didnt go that direction (we have the cross-xxx CATEGORY value
> now), i guess i can drop the PKGDIR munging completely from crossdev.

Great, the change looks very simple:

Mike Frysinger 10-08-2010 02:54 AM

crossdev improvements
 
On Saturday, September 25, 2010 13:11:26 Joakim Tjernlund wrote:
> setup_portage_vars() {
> + PORTAGE_CONFIGROOT=$(portageq envvar PORTAGE_CONFIGROOT)

is this necessary ? you cant really put PORTAGE_CONFIGROOT in /etc/make.conf
as you hit a chicken & egg problem ...
-mike

Mike Frysinger 10-08-2010 03:06 AM

crossdev improvements
 
On Friday, October 01, 2010 02:56:07 Joakim Tjernlund wrote:
> Mike Frysinger <vapier@gentoo.org> wrote on 2010/10/01 02:36:44:
> > On Thursday, September 30, 2010 11:38:58 Joakim Tjernlund wrote:
> > > Next problem, how do I force other computers to use the bin pkg? Unless
> > > one passes -G to emerge, emerge rebuilds the pkg and I don't want that
> > > as I have passed EXTRA_ECONF args and added a small patch to glibc as
> > > well.
> >
> > man emerge -> -K
>
> Thanks, but this is not quite what I want. This depends on the user
> actually passing -K to emerge. I realize I want something like the
> different -bin ebuilds in portage such as openoffice-bin or firefox-bin.
> Any pointers on how to create a -bin ebuild from the binary pkgs I
> get form crossdev ... -portage -b ?

portage has no support for changing PN on the fly
-mike


All times are GMT. The time now is 05:18 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.