Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Generic ARM Stage 3 Install
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures
View previous topic :: View next topic  
Author Message
samus8zero2x
n00b
n00b


Joined: 08 Jul 2005
Posts: 30
Location: OKC, OK

PostPosted: Wed Jul 18, 2007 7:37 pm    Post subject: Generic ARM Stage 3 Install Reply with quote

Hello All,

I've been working on an Atmel AT91SAM9261 Evaluation Kit and so far have had great luck getting Linux booted up and running. This configuration uses uClibc and BusyBox to build everything you need...well to a point. The trouble is I'd really like to take advantage of X11 (or similar GUI platform) and I cannot get any of the GUI softwares to compile using the buildroot tool.

So, I'm thinking I should switch to mainstream glibc to get the compatibility I need to build X.org/TinyX. I tried setting up a RFS with Gentoo and ran into some problems. I tried two methods with little success and will outline them below.

Method 1 - Gentoo Handbook Install
1. Boot my platform into Linux (using buildroot RFS and Kernel)
2. Mount an NFS share from my x86 Linux Host on the target FS
3. Download stage 3 ARM tarball and portage tarball. Unpack them.
4. Go through the steps to configure the stage 3 tarball and chroot to the new RFS.
5. emerge --sync (FAILS!). Looks like the arm profile is too far out of date for the latest portage snapshots? Or maybe I'm out of memory (64MB)? Or maybe there are bugs with the DM9000 ethernet adapter?

So, I tried the method I used to get a bootable kernel for my OldWorld Mac...

Method 2 - Crossdev
1. emerge crossdev (on x86 host)
2. Trial and error installs of an arm toolchain (for arm-unknown-linux-gnu-) until one finishes without errors
3. Configure host system to cross compile via portage
4. emerge system (to get a RFS) (FAILS!). Looks like this combination of crossdev toolchain install doesn't work quite right?

So anyway, I'm sort of stuck now. Any ideas? Anyone know if there is a known, solidly working, combination of binaries to pass to crossdev to get a working gnu ARM toolchain?

Thanks!
_________________
~DMP


Last edited by samus8zero2x on Wed Jul 25, 2007 4:50 pm; edited 1 time in total
Back to top
View user's profile Send private message
samus8zero2x
n00b
n00b


Joined: 08 Jul 2005
Posts: 30
Location: OKC, OK

PostPosted: Fri Jul 20, 2007 3:49 pm    Post subject: Reply with quote

Alright, I revisited method 1. I had a combination of problems before and they were:

1 - Not enough memory.
2 - Rsync timeout (after 180 seconds).

I resolved these by adding a swap file on a USB Thumb Drive and adding RSYNC_TIMEOUT=500 to make.conf. Now, I run emerge --sync and the process completes, but I have a TON of "Failed cache update:" messages. Anyways, I proceed because I probably need to emerge portage anyway (after all, it tells me I should)...

So, I try emerge portage and I get this error:
Code:

!!!ARCH is not set... Are you missing the /etc/make.profile symlink?
!!!Is the symlink correct?  Is your portage tree complete?


Lo and behold, when I check out the symlink, it points to a non-existent folder:
../usr/portage/profiles/default-arm-2004.0

So after updating to a current folder, such as /usr/portage/profiles/default-arm/2007.0 and running emerge portage, I get the same error as before. Thinking it might be too new, I try instead the other profile folder, /usr/portage/profiles/default-arm/2004.3. I now get this error after trying emerge portage:
Code:

!!! 'str' object has no attribute 'insert'
!!! 'rm -Rf /usr/portage/profiles; emerge sync' may fix this.  If it does
!!! not then please report this to bugs.gentoo.org and, if possible, a dev
!!! on #gentoo (irc.freenode.org)


Now this seems to be a bit of paradox...I guess I can try blowing away the profiles folder, but I have a feeling that isn't going to work. I'll give it a try. In the meantime, any ideas?
_________________
~DMP
Back to top
View user's profile Send private message
samus8zero2x
n00b
n00b


Joined: 08 Jul 2005
Posts: 30
Location: OKC, OK

PostPosted: Fri Jul 20, 2007 4:41 pm    Post subject: Reply with quote

A new update!

I messed around for a while and discovered I had yet another error in my sync session. I increased the timeout value again (this time to 1000, I am using a 200 MHz ARM after all ;-)) and ran the sync again...it finished with complete success this time (no errors anywhere in the log).

Now about the profiles. It looks like both 2004.3 and 2007 are broken. I unwittingly tried the base profile (/usr/portage/profiles/default-linux/arm) and it works without either of the errors I received before.

Now I've got to update my clock and try again to make sure the builds are good :-).
_________________
~DMP
Back to top
View user's profile Send private message
Civil
Retired Dev
Retired Dev


Joined: 24 Feb 2006
Posts: 16
Location: Berlin

PostPosted: Fri Jul 20, 2007 7:51 pm    Post subject: Reply with quote

Quote:
Now about the profiles. It looks like both 2004.3 and 2007 are broken.


Quote:
lrwxrwxrwx 1 root root 46 2007-07-15 05:11 /etc/make.profile -> /usr/portage/profiles/default-linux/arm/2007.0

This is what I have on my PDA. And it works.
Back to top
View user's profile Send private message
samus8zero2x
n00b
n00b


Joined: 08 Jul 2005
Posts: 30
Location: OKC, OK

PostPosted: Mon Jul 23, 2007 6:39 pm    Post subject: Reply with quote

Hi Civil,

I'm wondering what arm core your PDA uses. Most I know of run ARMv4 (strongARM or XScale) which is what the stage3 gentoo tarballs seemed to be configured for. My core is the ARM926EJ-S (using ARMv5TEJ instruction set), so I'm working on re-bootstrapping the stage3 tarball for ARMv5TEJ.

Also, which stage3 tarball did you use? I used the one under [gentoo mirror]/experimental/arm/stages/arm. Maybe the 2007.0 profile is correct using the armv4l tarball?
_________________
~DMP
Back to top
View user's profile Send private message
samus8zero2x
n00b
n00b


Joined: 08 Jul 2005
Posts: 30
Location: OKC, OK

PostPosted: Tue Jul 24, 2007 1:47 pm    Post subject: Reply with quote

After updating portage and re-syncing, I am able to use the 2007.0 profile. Here's the new path from my host PC:
Code:

TestEnv1 buildroot-atmel # ls -al /nfs/gentoo/etc/make.profile
lrwxrwxrwx 1 root root 46 Jul 24 08:16 /nfs/gentoo/etc/make.profile -> /usr/portage/profiles/default-linux/arm/2007.0


So it seems the generic arm stage3 tarball is out-of-date and portage must be updated (in case the 2004 timestamp on the tarball didn't give enough clue). To get a working portage system after unpacking the latest portage tree to /usr, I did the following:

Code:

rm /etc/make.profile
ln -snf /usr/portage/profiles/default-linux/arm /etc/make.profile
emerge --sync
emerge portage # May need to disable acl support: USE="-acl" emerge portage
emerge sandbox # To remove sandbox error messages...you may be OK not to do this
etc-update # After emerge sandbox, I auto-merged the new configs
rm /etc/make.profile
ln -snf /usr/portage/profiles/default-linux/arm/2007.0 /etc/make.profile


Now I get an error with the gcc-4.1.2 ebuild while running /usr/portage/scripts/bootstrap.sh. Will post again after a retry.
_________________
~DMP
Back to top
View user's profile Send private message
samus8zero2x
n00b
n00b


Joined: 08 Jul 2005
Posts: 30
Location: OKC, OK

PostPosted: Tue Jul 24, 2007 2:57 pm    Post subject: Reply with quote

Here's the error (I used the 2007.0 profile this time for bootstrap.sh):

Code:
...
Bootstrapping the compiler
make[1]: Entering directory `/var/tmp/portage/sys-devel/gcc-4.1.2/work/build/gcc'
make[1]: Warning: File `Makefile' has modification time 2.3e+03 s in the future
make CC="gcc" libdir=/usr/lib LANGUAGES="c " \
   CFLAGS="-O -DENABLE_CHECKING -DENABLE_ASSERT_CHECKING" \
   MAKEINFO="makeinfo --split-size=5000000" MAKEINFOFLAGS="--no-split" \
   COVERAGE_FLAGS= OBJS-onestep="tree-chrec.o tree-scalar-evolution.o tree-data-ref.o tree-cfg.o tree-dfa.o tree-eh.o tree-ssa.o tree-optimize.o tree-gimple.o gimplify.o tree-pretty-print.o tree-into-ssa.o tree-outof-ssa.o tree-ssa-ccp.o tree-vn.o tree-ssa-uncprop.o tree-ssa-dce.o  tree-ssa-copy.o tree-nrv.o tree-ssa-copyrename.o tree-ssa-pre.o tree-ssa-live.o tree-ssa-operands.o tree-ssa-alias.o tree-ssa-phiopt.o tree-ssa-forwprop.o tree-nested.o tree-ssa-dse.o tree-ssa-dom.o domwalk.o tree-tailcall.o gimple-low.o tree-iterator.o tree-phinodes.o tree-ssanames.o tree-sra.o tree-complex.o tree-vect-generic.o tree-ssa-loop.o tree-ssa-loop-niter.o tree-ssa-loop-manip.o tree-ssa-threadupdate.o tree-vectorizer.o tree-vect-analyze.o tree-vect-transform.o tree-ssa-loop-ivcanon.o tree-ssa-propagate.o tree-ssa-address.o tree-ssa-math-opts.o tree-ssa-loop-ivopts.o tree-if-conv.o tree-ssa-loop-unswitch.o alias.o bb-reorder.o bitmap.o builtins.o caller-save.o calls.o cfg.o cfganal.o cfgbuild.o cfgcleanup.o cfglayout.o cfgloop.o cfgloopanal.o cfgloopmanip.o loop-init.o loop-unswitch.o loop-unroll.o cfgrtl.o combine.o conflict.o convert.o coverage.o cse.o cselib.o dbxout.o ddg.o tree-ssa-loop-ch.o loop-invariant.o tree-ssa-loop-im.o debug.o df.o diagnostic.o dojump.o dominance.o loop-doloop.o dwarf2asm.o dwarf2out.o emit-rtl.o except.o explow.o loop-iv.o expmed.o expr.o final.o flow.o fold-const.o function.o gcse.o genrtl.o ggc-common.o global.o graph.o gtype-desc.o haifa-sched.o hooks.o ifcvt.o insn-attrtab.o insn-emit.o insn-modes.o insn-extract.o insn-opinit.o insn-output.o insn-peep.o insn-recog.o integrate.o intl.o jump.o  langhooks.o lcm.o lists.o local-alloc.o loop.o mode-switching.o modulo-sched.o optabs.o options.o opts.o params.o postreload.o postreload-gcse.o predict.o insn-preds.o pointer-set.o print-rtl.o print-tree.o profile.o value-prof.o var-tracking.o real.o recog.o reg-stack.o regclass.o regmove.o regrename.o reload.o reload1.o reorg.o resource.o rtl.o rtlanal.o rtl-error.o sbitmap.o sched-deps.o sched-ebb.o sched-rgn.o sched-vis.o sdbout.o simplify-rtx.o sreal.o stmt.o stor-layout.o stringpool.o targhooks.o timevar.o toplev.o tracer.o tree.o tree-dump.o varasm.o varray.o vec.o version.o vmsdbgout.o xcoffout.o alloc-pool.o et-forest.o cfghooks.o bt-load.o pretty-print.o ggc-page.o web.o passes.o tree-profile.o rtlhooks.o cfgexpand.o lambda-mat.o lambda-trans.o   lambda-code.o tree-loop-linear.o tree-ssa-sink.o tree-vrp.o tree-stdarg.o tree-cfgcleanup.o tree-ssa-reassoc.o tree-ssa-structalias.o tree-object-size.o arm.o  host-linux.o tree-inline.o cgraph.o cgraphunit.o tree-nomudflap.o ipa.o ipa-inline.o ipa-utils.o ipa-reference.o ipa-pure-const.o ipa-type-escape.o ipa-prop.o ipa-cp.o"
make[2]: Entering directory `/var/tmp/portage/sys-devel/gcc-4.1.2/work/build/gcc'
make[2]: Warning: File `Makefile' has modification time 2.3e+03 s in the future
test -d po || mkdir po
TARGET_CPU_DEFAULT="" \
HEADERS="auto-host.h ansidecl.h" DEFINES="" \
/bin/sh /var/tmp/portage/sys-devel/gcc-4.1.2/work/gcc-4.1.2/gcc/mkconfig.sh config.h
/usr/bin/gmsgfmt --statistics -o po/ca.gmo /var/tmp/portage/sys-devel/gcc-4.1.2/work/gcc-4.1.2/gcc/po/ca.po
make[2]: *** [po/ca.gmo] Segmentation fault
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.1.2/work/build/gcc'
make[1]: *** [stage1_build] Error 2
make[1]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.1.2/work/build/gcc'
make: *** [bootstrap-lean] Error 2

!!! ERROR: sys-devel/gcc-4.1.2 failed.
Call stack:
  ebuild.sh, line 1615:   Called dyn_compile
  ebuild.sh, line 972:   Called qa_call 'src_compile'
  ebuild.sh, line 44:   Called src_compile
  ebuild.sh, line 1305:   Called toolchain_src_compile
  toolchain.eclass, line 26:   Called gcc_src_compile
  toolchain.eclass, line 1546:   Called gcc_do_make
  toolchain.eclass, line 1420:   Called die

!!! emake failed with bootstrap-lean
!!! If you need support, post the topmost build error, and the call stack if relevant.
!!! A complete build log is located at '/var/tmp/portage/sys-devel/gcc-4.1.2/temp/build.log'.


I wonder if I can specify an earlier version of gcc (like 4.0.2 or 3.3.6)...
_________________
~DMP
Back to top
View user's profile Send private message
samus8zero2x
n00b
n00b


Joined: 08 Jul 2005
Posts: 30
Location: OKC, OK

PostPosted: Wed Jul 25, 2007 4:40 pm    Post subject: Reply with quote

Alright, so I have a question. I tried to force a different gcc version and it shows that gcc 4.1.2 is still going to be emerged.

Code:
TestEnv2 ~ # emerge --pretend =sys-devel/gcc-3.4.6-r2

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild     U ] sys-devel/gcc-config-1.3.16 [1.3.5]
[ebuild  N    ] dev-libs/gmp-4.2.1-r1 USE="-doc -nocxx"
[ebuild  N    ] dev-util/unifdef-1.20
[ebuild     U ] sys-apps/findutils-4.3.7 [4.1.20-r1] USE="nls* -static%"
[ebuild  N    ] sys-libs/timezone-data-2007e USE="nls"
[ebuild     U ] sys-kernel/linux-headers-2.6.20-r2 [2.6.5]
[ebuild  N    ] sys-devel/binutils-config-1.9-r4
[ebuild  N    ] dev-libs/mpfr-2.2.1_p5
[ebuild     U ] sys-devel/binutils-2.17 [2.15.90.0.3-r3] USE="-multislot% -test% -vanilla%"
[ebuild  NS   ] sys-devel/gcc-4.1.2 USE="fortran mudflap nls (-altivec) -bootstrap -build -d -doc -gcj -gtk (-hardened) -ip28 -ip32r10k (-multilib) -multislot (-n32) (-n64) -nocxx -objc -objc++ -objc-gc -test -vanilla"
[ebuild     U ] sys-libs/glibc-2.5-r4 [2.3.2-r10] USE="nptl* nptlonly%* -debug% -glibc-compat20% -glibc-omitfp% (-hardened) (-multilib) -profile% (-selinux)"
[ebuild  NS   ] sys-devel/gcc-3.4.6-r2 USE="fortran nls (-altivec) -bootstrap -boundschecking -build -d -doc -gcj -gtk (-hardened) -ip28 -ip32r10k (-multilib) -multislot (-n32) (-n64) -nocxx -nopie -nossp -objc -test -vanilla"


Which means I would still have the problem I posted previously. Why does portage want me to emerge gcc 4.1.2 to install gcc 3.4.6??

I looked up gmsgfmt and found it is a link to msgfmt which is part of gettext. Gettext isn't in the emerge list above, so I am going to emerge the latest "stable" gettext and try to build gcc-4.1.2 again.

Edited the subject to be more applicable since I'm not trying crossdev any longer.
_________________
~DMP
Back to top
View user's profile Send private message
samus8zero2x
n00b
n00b


Joined: 08 Jul 2005
Posts: 30
Location: OKC, OK

PostPosted: Mon Jul 30, 2007 2:25 pm    Post subject: Reply with quote

Yeah, so emerging gettext again didn't help...
_________________
~DMP
Back to top
View user's profile Send private message
soth
Apprentice
Apprentice


Joined: 12 Sep 2003
Posts: 207

PostPosted: Tue Nov 27, 2007 12:10 pm    Post subject: Reply with quote

Any progress on this one?
I wouldn't have so much trouble if the stage tarball was outdated.
I'm starting with emerging the entire system crosscompiled with buildroot crosscompiler...
_________________
- Never argue with an idiot. They just drag you down to your level and beat you with experience.

Join the adopt an unanswered post initiative today
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum