FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo Embedded

 
 
LinkBack Thread Tools
 
Old 11-01-2009, 12:09 PM
Petric Frank
 
Default Beginner: Target Mips + nommu

Hello,

i'm rather a beginner when it comes to embedded systems.
My (play) system is a mips (i assume a mips32 big endian) system without a
mmu, so i started with
crossdev --target mips-softfloat-linux-uclibc

which runs well (after unmasking uclibc-0.9.30.1-r1 for mips). So i have now
the cross-compilers and binutils available.

Due the target has no mmu i assume that i have to rebuild the uClibc with a
modified .config to cover this, right ?
Ok, in the first view switching ARCH_HAS_MMU/ARCH_USE_MMU off is obvious, but
then i think PIC (DOPIC) is also not allowed.
(anyone could share me a working .config for this target ?)

Also - as far as i read - the normal linux kernel is not capable of a mmu-less
mips system. Is uClinux the proper alternative for this or are the mips
kernels available in the portage tree patched to cover this ?

Are there other things i have to care about ?

I would be happy if someone can share some knowledge with me.

regards
Petric
 
Old 11-01-2009, 12:44 PM
Peter Stuge
 
Default Beginner: Target Mips + nommu

Petric Frank wrote:
> Is uClinux the proper alternative for this

In general it is the proper alternative for machines without MMU.


> or are the mips kernels available in the portage tree patched to
> cover this ?

In theory that's possible, but I doubt it.


//Peter
 
Old 11-02-2009, 07:22 PM
Petric Frank
 
Default Beginner: Target Mips + nommu

Hello,

On Sunday 01 November 2009 14:44:23 Peter Stuge wrote:
> > Is uClinux the proper alternative for this
>
> In general it is the proper alternative for machines without MMU.
>
> > or are the mips kernels available in the portage tree patched to
> > cover this ?
>
> In theory that's possible, but I doubt it.

Thanks for your hints.

As far as i understand the cross compile system - the uclibc built by crossdev
is the one the compiled software for the target to be linked against.
Resulting from this the uclibc must reflect the target system (here
especially: no-mmu).
Hope i am right here.

So i tried to do this using the savedconfig use-flag. I broke to compilation
process while it is compiling uclibc. Then i did a "make menuconfig" (in
/var/tmp/...) and disabled MMU and (as followup) the target file format to
"STATIC FLAT" (i assume PIE is also not possible because of the missing MMU).

At restarting the crossdev execution i got an error while installing uclibc.
The compile step of the ebuild went well. At the installation stage it
complains that it is missing "utils/ldconfig.host" when doing newbin. This can
be seen in the ebuild in the src_install step. The offending line is
newbin utils/ldconfig.host ${CTARGET}-ldconfig | die

So this file seems not to be generated during the uclibc built process when
PIE is off. This applies to ldd.host also.

What to do now?
Skip this files in the ebuild ?

Or am i doing too much and the uclibc code is clever enough to disable mmu
logic when the taget it is running on doesn't have it ?

regards
Petric
 
Old 11-03-2009, 08:44 PM
Petric Frank
 
Default Beginner: Target Mips + nommu

Hello,

On Monday 02 November 2009 21:22:38 Petric Frank wrote:
> > > Is uClinux the proper alternative for this
> >
> > In general it is the proper alternative for machines without MMU.
> >
> > > or are the mips kernels available in the portage tree patched to
> > > cover this ?
> >
> > In theory that's possible, but I doubt it.
>
> Thanks for your hints.
>
> As far as i understand the cross compile system - the uclibc built by
> crossdev is the one the compiled software for the target to be linked
> against. Resulting from this the uclibc must reflect the target system
> (here especially: no-mmu).
> Hope i am right here.
>
> So i tried to do this using the savedconfig use-flag. I broke to
> compilation process while it is compiling uclibc. Then i did a "make
> menuconfig" (in /var/tmp/...) and disabled MMU and (as followup) the
> target file format to "STATIC FLAT" (i assume PIE is also not possible
> because of the missing MMU).
>
> At restarting the crossdev execution i got an error while installing
> uclibc. The compile step of the ebuild went well. At the installation
> stage it complains that it is missing "utils/ldconfig.host" when doing
> newbin. This can be seen in the ebuild in the src_install step. The
> offending line is newbin utils/ldconfig.host ${CTARGET}-ldconfig | die
>
> So this file seems not to be generated during the uclibc built process when
> PIE is off. This applies to ldd.host also.
>
> What to do now?
> Skip this files in the ebuild ?
>
> Or am i doing too much and the uclibc code is clever enough to disable mmu
> logic when the taget it is running on doesn't have it ?

Ok - finally i got the toolchain compiled for mips-nommu using sys-
devel/crossdev - with some (dirty) patches.
Patch 1: ebuild of uclibc - remove " ... | die" suffix when trying to install
ldconfig and ldd as they are not there for nommu case
Patch 2: for building uclibc use savedconfig use flag. Use modified config to
disable mmu and generate static libs only
Patch 3: (the worst one) - add a line to toolchain.eclass to add the option --
disable-static to the configure string
Maybe this all should into a new use flag for gcc and uclibc named (for
example) "nommu".
Or an extension to crossdev is a better place ?

Would this be worth a bugzilla ticket (against which target ?) ?

regards
Petric
 
Old 11-05-2009, 05:39 PM
Petric Frank
 
Default Beginner: Target Mips + nommu

Hello,

On Tuesday 03 November 2009 22:44:43 Petric Frank wrote:
> Hello,
> > > > Is uClinux the proper alternative for this
> > >
> > > In general it is the proper alternative for machines without MMU.
> > >
> > > > or are the mips kernels available in the portage tree patched to
> > > > cover this ?
> > >
> > > In theory that's possible, but I doubt it.
> >
> > As far as i understand the cross compile system - the uclibc built by
> > crossdev is the one the compiled software for the target to be linked
> > against. Resulting from this the uclibc must reflect the target system
> > (here especially: no-mmu).
> > Hope i am right here.
> >
> > So i tried to do this using the savedconfig use-flag. I broke to
> > compilation process while it is compiling uclibc. Then i did a "make
> > menuconfig" (in /var/tmp/...) and disabled MMU and (as followup) the
> > target file format to "STATIC FLAT" (i assume PIE is also not possible
> > because of the missing MMU).
> >
> > At restarting the crossdev execution i got an error while installing
> > uclibc. The compile step of the ebuild went well. At the installation
> > stage it complains that it is missing "utils/ldconfig.host" when doing
> > newbin. This can be seen in the ebuild in the src_install step. The
> > offending line is newbin utils/ldconfig.host ${CTARGET}-ldconfig | die
> >
> > So this file seems not to be generated during the uclibc built process
> > when PIE is off. This applies to ldd.host also.

Ok - another reply to myself (must be paranoid) ...

I've introduced bug #291787 which is now completed and the changes went
already to the portage tree.

It fixes the problem with the installation stage failure, where it tries to
install ldd and ldconfig. But these files will not be generated when uclibc
was directed to build static libs only.

So it remains a problem with gcc (at crossdev / gcc stage2) which does not
detect that the uclibc is static only and tries to build libgcc_s.so (oh - a
shared lib). As result the build process fails there.

See http://bugs.gentoo.org/show_bug.cgi?id=291870

regards
Petric
 

Thread Tools




All times are GMT. The time now is 01:36 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org