Gentoo Archives: gentoo-embedded

From: Petric Frank <pfrank@×××.de>
To: gentoo-embedded@l.g.o
Subject: Re: [gentoo-embedded] Beginner: Target Mips + nommu
Date: Tue, 03 Nov 2009 21:44:44
Message-Id: 200911032244.43435.pfrank@gmx.de
In Reply to: Re: [gentoo-embedded] Beginner: Target Mips + nommu by Petric Frank
1 Hello,
2
3 On Monday 02 November 2009 21:22:38 Petric Frank wrote:
4 > > > Is uClinux the proper alternative for this
5 > >
6 > > In general it is the proper alternative for machines without MMU.
7 > >
8 > > > or are the mips kernels available in the portage tree patched to
9 > > > cover this ?
10 > >
11 > > In theory that's possible, but I doubt it.
12 >
13 > Thanks for your hints.
14 >
15 > As far as i understand the cross compile system - the uclibc built by
16 > crossdev is the one the compiled software for the target to be linked
17 > against. Resulting from this the uclibc must reflect the target system
18 > (here especially: no-mmu).
19 > Hope i am right here.
20 >
21 > So i tried to do this using the savedconfig use-flag. I broke to
22 > compilation process while it is compiling uclibc. Then i did a "make
23 > menuconfig" (in /var/tmp/...) and disabled MMU and (as followup) the
24 > target file format to "STATIC FLAT" (i assume PIE is also not possible
25 > because of the missing MMU).
26 >
27 > At restarting the crossdev execution i got an error while installing
28 > uclibc. The compile step of the ebuild went well. At the installation
29 > stage it complains that it is missing "utils/ldconfig.host" when doing
30 > newbin. This can be seen in the ebuild in the src_install step. The
31 > offending line is newbin utils/ldconfig.host ${CTARGET}-ldconfig | die
32 >
33 > So this file seems not to be generated during the uclibc built process when
34 > PIE is off. This applies to ldd.host also.
35 >
36 > What to do now?
37 > Skip this files in the ebuild ?
38 >
39 > Or am i doing too much and the uclibc code is clever enough to disable mmu
40 > logic when the taget it is running on doesn't have it ?
41
42 Ok - finally i got the toolchain compiled for mips-nommu using sys-
43 devel/crossdev - with some (dirty) patches.
44 Patch 1: ebuild of uclibc - remove " ... | die" suffix when trying to install
45 ldconfig and ldd as they are not there for nommu case
46 Patch 2: for building uclibc use savedconfig use flag. Use modified config to
47 disable mmu and generate static libs only
48 Patch 3: (the worst one) - add a line to toolchain.eclass to add the option --
49 disable-static to the configure string
50 Maybe this all should into a new use flag for gcc and uclibc named (for
51 example) "nommu".
52 Or an extension to crossdev is a better place ?
53
54 Would this be worth a bugzilla ticket (against which target ?) ?
55
56 regards
57 Petric

Replies

Subject Author
Re: [gentoo-embedded] Beginner: Target Mips + nommu Petric Frank <pfrank@×××.de>