Author Topic: Gentoo On Zaurus  (Read 8042 times)

gyver

  • Newbie
  • *
  • Posts: 16
    • View Profile
Gentoo On Zaurus
« on: August 30, 2006, 10:36:43 am »
I'm currently trying to install Gentoo on my Zaurus C3K. The main reason for that if that I want to benefit from the huge Portage software repository.

I've managed to :
- set up a chroot based on the latest uclibc stage3 (on a 384M partition, 200M currently used),
- set up ccache and distcc to compile on my two x86 and x86_64 systems,
- set up a backup/restore system based on rsync to quickly revert a faulty chroot to the last known good version,
- bork the chroot several times :-)

The chroot is accessed through OpenZaurus GPE (in fact the bootstrap is plainly sufficient as I close X to free RAM...). The Zaurus connects to my local Wifi network in order to distribute compile tasks through distcc and download source packages on the local HD.

Currently I'm battling with gcc CFLAGS (gcc 3.4.6 -march=(or -mcpu=)iwmmxt doesn't work and it seems we must use some other flags, probably "-malignment-traps" I fetched from a wifi driver Makefile, or a freshly compiled distcc spit outs alignment traps in the kernel logs and sit up eating CPU doing nothing).

If all works well I'll have a base system up to date in the next few days for others to try if there's interest.

I'll reformat this post in a HOWTO as soon as I've enough experience to make it worth sharing with others.

vputz

  • Full Member
  • ***
  • Posts: 163
    • View Profile
Gentoo On Zaurus
« Reply #1 on: August 30, 2006, 10:50:54 am »
Quote
I'll reformat this post in a HOWTO as soon as I've enough experience to make it worth sharing with others.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=140182\"][{POST_SNAPBACK}][/a][/div]

...you may want to package that with a distcc cross-compilation howto as well ... installing new Gentoo software takes long enough on my Athlon 3200+; I can't imagine the fun compiling something big on the poor li'l Z...

Having said that, this is a great project.  Good luck with it!

gyver

  • Newbie
  • *
  • Posts: 16
    • View Profile
Gentoo On Zaurus
« Reply #2 on: August 30, 2006, 11:02:33 am »
Quote
...you may want to package that with a distcc cross-compilation howto as well ... installing new Gentoo software takes long enough on my Athlon 3200+; I can't imagine the fun compiling something big on the poor li'l Z...

Having said that, this is a great project.  Good luck with it!
[div align=\"right\"][a href=\"index.php?act=findpost&pid=140184\"][{POST_SNAPBACK}][/a][/div]
Of course. The zaurus isn't so bad for compiling (I've done perl and python already and that was under one hour) but distcc rocks and I had to find out how to do cross compiling with distcc. Fortunately Gentoo is especially helpful for this the setup of the server and the client only imply simple setups (use "crossdev" to automate the cross-compilation env install on the servers and some symlinks on the client to a hand-written one liner script), I'll include them in the HOWTO for reference.

grog

  • Hero Member
  • *****
  • Posts: 692
    • View Profile
    • http://
Gentoo On Zaurus
« Reply #3 on: August 30, 2006, 11:07:43 am »
Sounds *really* cool. Should I assume this would only work on C3K's, not C860's or C1K's with external microdrives? I guess even if it *did* work, we'd lose the CF slot anyway (no wifi, nic's, etc).
GROG!

gyver

  • Newbie
  • *
  • Posts: 16
    • View Profile
Gentoo On Zaurus
« Reply #4 on: August 30, 2006, 11:30:21 am »
Quote
Sounds *really* cool. Should I assume this would only work on C3K's, not C860's or C1K's with external microdrives? I guess even if it *did* work, we'd lose the CF slot anyway (no wifi, nic's, etc).
[div align=\"right\"][a href=\"index.php?act=findpost&pid=140189\"][{POST_SNAPBACK}][/a][/div]
For the C860, I'm not sure (I'm trying to use iwmmxt as gcc's cpu target), currently xscale is used instead of iwmmxt as at least bash can not compile with iwmmxt). For the C1K it will be OK as long as you can store the partition somewhere and chroot into it.

The ultimate goal is to bypass OpenZaurus and use altboot to load a Gentoo-compiled kernel and maybe (only maybe) automate the install without OpenZaurus but I probably won't need it myself as OpenZaurus is quite good in itself and probably will be used on my Zaurus as a rescue partition.

vputz

  • Full Member
  • ***
  • Posts: 163
    • View Profile
Gentoo On Zaurus
« Reply #5 on: August 30, 2006, 01:57:38 pm »
Quote
Should I assume this would only work on C3K's, not C860's or C1K's with external microdrives?

NFS, my good man (grin).  Obviously local storage would be better, and it would be dog slow doing everything with network-mounted storage, but it COULD be done.  My desktop's portage repository lives on a Debian NSLU2, so obviously portage could live there, and with a good distcc setup, it could work.

Quote
The ultimate goal is to bypass OpenZaurus and use altboot to load a Gentoo-compiled kernel and maybe (only maybe) automate the install without OpenZaurus

Gyver, I'd think pretty seriously about using the OZ kernel and basically using Portage as a package manager, sorta like Gentoo on an NSLU2 uses OpenSlug as a basis.

(I'm now almost kicking myself for not putting Gentoo on the slug, but at the time I didn't want to deal with distcc... and since it's acting as a server, I wanted Debian stability.  But I already miss portage on the wee thing, and I'm already having to learn to do distcc cross-compilation since my desktop runs AMD64 but I want it to help with compilation on my older 32-bit boxes).

Actually, Portage and BitBake (OE's package/build system) actually remind me a lot of each other.  A whole lot.

koen

  • Hero Member
  • *****
  • Posts: 1008
    • View Profile
    • http://dominion.thruhere.net/koen/cms/
Gentoo On Zaurus
« Reply #6 on: August 30, 2006, 02:12:23 pm »
Quote
Actually, Portage and BitBake (OE's package/build system) actually remind me a lot of each other.  A whole lot.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=140217\"][{POST_SNAPBACK}][/a][/div]

That's because OE was based on portage 3 years ago, but we moved on since portage was too limited.
Forums are not bugtrackers!!! Smart questions
Ångström release team
iPAQ h2210, iPAQ h5550, iPAQ hx4700, Zaurus SL-C700, Nokia 770, all running some form of GPE
My blog

Javock

  • Newbie
  • *
  • Posts: 5
    • View Profile
Gentoo On Zaurus
« Reply #7 on: August 30, 2006, 02:17:21 pm »
Quote
I'm currently trying to install Gentoo on my Zaurus C3K. The main reason for that if that I want to benefit from the huge Portage software repository.

Great, I have a 6K and I wanted to install gentoo... it would be a great learning experience if I don't brick the Z.
I would like to participate with this project, and mabe we could join efforts with the gentoo-embedded.

As soon as you post a HOWTO I will be trying it!  


Regards!

gyver

  • Newbie
  • *
  • Posts: 16
    • View Profile
Gentoo On Zaurus
« Reply #8 on: August 30, 2006, 05:25:37 pm »
Just hit a problem with linux-headers and distcc : the object files were compiled for an x86... I'll have to check how to workaround this (probably by patching an ebuild or eclass). Works without distcc though.

Javock

  • Newbie
  • *
  • Posts: 5
    • View Profile
Gentoo On Zaurus
« Reply #9 on: August 31, 2006, 11:00:04 am »
Quote
Just hit a problem with linux-headers and distcc : the object files were compiled for an x86... I'll have to check how to workaround this (probably by patching an ebuild or eclass). Works without distcc though.
[div align=\"right\"][{POST_SNAPBACK}][/a][/div]


Did you follow the corss-compile [a href=\"http://www.gentoo.org/proj/en/base/embedded/cross-development.xml]howto[/url]? and emerged sys-devel/crossdev et al?

I found this on the Gentoo forums (look at the post by Kumba), it is for cross-distcc on an intel for sparc but it could be used for a starting point, also it mentions what he did with the kernel headers, perhaps something similar could be done there...

Javock

  • Newbie
  • *
  • Posts: 5
    • View Profile
Gentoo On Zaurus
« Reply #10 on: August 31, 2006, 05:18:56 pm »
Also found the cross-distcc howto here! I hope it helps  

Regards

gyver

  • Newbie
  • *
  • Posts: 16
    • View Profile
Gentoo On Zaurus
« Reply #11 on: August 31, 2006, 06:48:13 pm »
Quote
Also found the cross-distcc howto here! I hope it helps   

Regards
[div align=\"right\"][a href=\"index.php?act=findpost&pid=140385\"][{POST_SNAPBACK}][/a][/div]
This is the howto I followed  
I've managed to get past linux-headers, hit the same problem later with uclibc (I have a workaround involving disabling distcc). Now findutils doesn't want to build properly
Code: [Select]
arm-softfloat-linux-uclibc-ar cru libfindtools.a finddata.o fstype.o parser.o pred.o tree.o util.o version.o
arm-softfloat-linux-uclibc-ranlib libfindtools.a
arm-softfloat-linux-uclibc-gcc  -Os -pipe -mcpu=xscale -mtune=iwmmxt -frename-registers -ffast-math -fno-strict-aliasing -msoft-float -malignment-traps -mlittle-endian -fno-common -mfp=3   -o oldfind  find.o ./libfindtools.a ../lib/libfind.a ../gnulib/lib/libgnulib.a
arm-softfloat-linux-uclibc-gcc  -Os -pipe -mcpu=xscale -mtune=iwmmxt -frename-registers -ffast-math -fno-strict-aliasing -msoft-float -malignment-traps -mlittle-endian -fno-common -mfp=3   -o find  ftsfind.o ./libfindtools.a ../lib/libfind.a ../gnulib/lib/libgnulib.a
./libfindtools.a(finddata.o):(.bss+0x54): multiple definition of `starting_desc'
find.o:(.bss+0x0): first defined here
./libfindtools.a(finddata.o):(.bss+0x58): multiple definition of `program_name'
find.o:(.bss+0x4): first defined here
./libfindtools.a(finddata.o):(.bss+0x5c): multiple definition of `predicates'
find.o:(.bss+0x8): first defined here
./libfindtools.a(finddata.o):(.bss+0x60): multiple definition of `last_pred'
find.o:(.bss+0xc): first defined here
../gnulib/lib/libgnulib.a(closeout.o): In function `close_stdout':
closeout.c:(.text+0x30): warning:
collect2: ld returned 1 exit status
distcc[31426] ERROR: compile (null) on localhost failed
make[3]: *** [oldfind] Error 1
make[3]: *** Waiting for unfinished jobs....
../gnulib/lib/libgnulib.a(closeout.o): In function `close_stdout':
closeout.c:(.text+0x30): warning:
make[3]: Leaving directory `/mnt/hdd/portage/tmp/portage/findutils-4.3.0/work/findutils-4.3.0/find'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/mnt/hdd/portage/tmp/portage/findutils-4.3.0/work/findutils-4.3.0/find'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/mnt/hdd/portage/tmp/portage/findutils-4.3.0/work/findutils-4.3.0'
make: *** [all] Error 2

I'll work on it tomorrow.

Ferret-Simpson

  • Hero Member
  • *****
  • Posts: 572
    • View Profile
Gentoo On Zaurus
« Reply #12 on: August 31, 2006, 06:50:14 pm »
Maybe I should do Zlackware?
Cortana: PXA250/Poodle: OZ/GPE 3.4.2RC1
Tycho PXA270/HTC_Universal WM5  .30.107/1.09.00/42.42.P8/1.30.162
HollyWatch: Fossil AU5005 - POS 4.1.2
ATLANTIS: Fujitsu Lifebook T4210 TBPC2005

Tosh256CF, Adlink CF 802.11B, 512KingSD, 128VikSD, CFChiMeiG1GPRS

Javock

  • Newbie
  • *
  • Posts: 5
    • View Profile
Gentoo On Zaurus
« Reply #13 on: September 01, 2006, 11:14:50 am »
Quote
That's because OE was based on portage 3 years ago, but we moved on since portage was too limited.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=140218\"][{POST_SNAPBACK}][/a][/div]

Really? wow, I thought of portage as a great tool!  
what was it that made it limited? if I may ask, pleaseeee  

adf

  • Hero Member
  • *****
  • Posts: 2807
    • View Profile
    • http://
Gentoo On Zaurus
« Reply #14 on: September 01, 2006, 12:43:06 pm »
wait a second. You can "move on" from a "limited" portage, but you can't make a working package manager?  Sadly, that sounds very par for the OE course...
**3100 Zubuntu Jaunty,(working on Cacko dualboot), 16G A-Data internal CF, 4G SD, Ambicom WL-1100C Cf, linksys usb ethernet,  BelkinF8T020 BT card, Belkin F8U1500-E Ir kbd, mini targus usb mouse, rechargeble AC/DC powered USB hub, psp cables and battery extenders.

**6000l  Tetsuized Sharprom, installed on internal flash only 1G sd, 2G cf