Natanael Copa | 13 Nov 13:05
Picon
Gravatar

[PATCH] uclibc-0.9.30 and broken gcc-3.4.6

Hi,

After compiling uclibc with gcc-3.4.6 (current hardened compiler) any
program linked with -lpthread just segfaulted.

shows up that gcc first omits the framepointer then tries to access it.
To work around it, gcc-3.4.6 need to add -fno-omit-framepointer to
libpthreads.old/*

attatched patch will help you to build a working hardened uclibc-0.9.30.

-nc
--- uClibc-0.9.30.orig/libpthread/linuxthreads.old/Makefile.in	Thu Nov 13 09:53:27 2008
+++ uClibc-0.9.30/libpthread/linuxthreads.old/Makefile.in	Thu Nov 13 10:01:35 2008
@@ -59,6 +59,13 @@
 libc-static-y += $(libpthread_OUT)/libc_pthread_init.o
 libc-shared-y += $(libpthread_libc_OBJ:.o=.oS)

+ifeq ($(TARGET_ARCH),i386)
+# Most files must not be compiled without frame pointer since we need
+# the frame base address which is stored in %ebp unless the frame pointer
+# is optimized out.
+CFLAGS += -fno-omit-frame-pointer -mpreferred-stack-boundary=4
+endif
+
 libpthread-static-y += $(patsubst $(libpthread_DIR)/%.c,$(libpthread_OUT)/%.o,$(libpthread_SPEC_SRC))
 libpthread-shared-y += $(patsubst $(libpthread_DIR)/%.c,$(libpthread_OUT)/%.oS,$(libpthread_SPEC_SRC))

(Continue reading)

Enrico Weigelt | 15 Nov 06:22
Picon

Re: Auto Repair Cross Includes?

* Ned Ludd <solar@...> schrieb:

Hi,

> I've been toying with an idea after seeing a patch which would abort()
> when it detected host includes for cross compiles. 

Funny idea, sorts out the dozens of crap makefiles easily (eg. written 
by those mindless jerks who refuse to learn not to use absolute pathes
or explicitly add standard includes).

> I did not like the idea of aborting as it prevented me from building 
> pkgs that had the same headers in $ROOT as /. 

sucessfully shot yourself ? ;-o

> Basic goal detect ^/usr/include and rewrite it to $ROOT/usr/include if
> using a cross compiler and ROOT is set.

#1: why not using the more standard and well-known $SYSROOT variable ? 

#2: why not just using the already existing '=' prefix ?

#3: WTH do you explicitly add an standard include path like 
    /usr/include ?! It's automatically done by gcc nothings an
    individual application has to cope with.

cu
Enrico Weigelt | 15 Nov 06:29
Picon

Re: Cross-Compiling Python

* Mike Frysinger <vapier@...> schrieb:

> because the python build system requires python in order to build properly.  

Yeah, that's quite funny. Several other projects (eg. perl) do
that crap, too. Just ask them about crosscompiling, get a big
spliff of popcorn and have fun ... ;-o

cu
Enrico Weigelt | 15 Nov 06:33
Picon

Re: Documentation for embedded linux beginer

* Jean-Marc Beaune <jm.beaune@...> schrieb:

> I tried several times to start with embedded linux but can't really figure
> out how to start in a proper way.
> 
> Let's say I know linux, I'm a power user or administrator but have no
> knowledge about embedded linux.

IMHO, you should start with the crosscompiler, learn what it does,
to build one and it *means* to crosscompile.

Embedded systems normally require crosscompiling. 
(note: embedded != headless appliances !).

cu
Enrico Weigelt | 15 Nov 06:46
Picon

Re: Documentation for embedded linux beginer

* wireless <wireless@...> schrieb:

Hi,

> Take one sheet of paper and specific the hardware resources you
> need to solve that problem:
> 
> Micro controller (decision making capability based on software)

Actually, I wouldn't suggest this as the first learning step,
likely too much at once for a beginner.

Better take some old box (perhaps something incompatible with your 
current workstation), choose some purpose (eg. tiny fileserver or 
router) and think about what's exactly needed for this. Then build
these packages step by step through the crosscompiler. 

Don't even consider using any distro yet (not even ptxdist) - the
goal is learning, not getting anything built quickly.

> Folks on this list will help you with identifying and
> solving your problem.

You'll also might consider subscribing to the crossgcc list.

Ah, and for building a cross-toolchain, crosstool-ng is your friend:

http://ymorin.is-a-geek.org/dokuwiki/projects/crosstool

Once you've got used to it all, you can grab out an old settop or 
(Continue reading)

Enrico Weigelt | 15 Nov 06:47
Picon

Re: Trying to get toolchain

* Jean-Marc Beaune <jm.beaune@...> schrieb:
> Hi,
> 
> I'm trying to install the toolchain and regardless of the tuple I use
> crossdev fails to compile gcc.

Did you try crosstool instead ?

http://ymorin.is-a-geek.org/dokuwiki/projects/crosstool

cu
Ahmed Ammar | 17 Nov 14:44
Picon
Favicon

Re: [linux-cirrus] Re: maverick-crunch queries

On Mon, 2008-10-13 at 13:37 +0100, Martin Guy wrote:
> On 7/31/08, Ahmed Ammar <b33fc0d3@...> wrote:
> >  I am currently working on some QEMU patches to add support for the
> >  EP93xx (and the ts-7200 board) I have had some general success but this
> >  is far from complete. My main issue is the Maverick-Crunch FPU and some
> >  question to see if anyone has had the same experience.
> >
> >  Which patch-set are people generally using, there seem to be two sets:
> >  1) futaris ones which seem to be the openembedded.org ones
> 
> Where do you find "the openembedded ones"? I have looked for them but not found.
> Do you know how to find them without setting up a whole OE build environment?

They used to have their repository available for online viewing but as
far as i can see it's been removed. Maybe too many people grabbing what
they wanted via http. 

> I know there is the tarball under files.futaris.org/gcc for 4.1.2 and 4.2.0
> > 2) the cirrus linux ones which are up to version 1.4.3.
> 
> I dunno about "people" :) but the only set ever to pass the gcc
> testsuite are the ones under files.futaris.org/gcc for 4.1.2 and
> 4.2.0. To achieve this they get round one of the problems by disabling
> all conditional instruction execution. In theory this disables some
> optimisation but in practice, if you are doing FP and can enable the
> FPU, the loss is negligable.
> Of the two, 4.1.2 requires less memory to build it and to compile
> things, compiles things faster and seems to produce smaller faster
> code.

(Continue reading)

Martin Guy | 17 Nov 18:21
Picon
Favicon

Re: [linux-cirrus] Re: maverick-crunch queries

On 11/17/08, Ahmed Ammar <b33fc0d3@...> wrote:
> On Mon, 2008-10-13 at 13:37 +0100, Martin Guy wrote:
>  > Where do you find "the openembedded ones"? I have looked for them but not found.
>  > Do you know how to find them without setting up a whole OE build environment?
>
> They used to have their repository available for online viewing but as
>  far as i can see it's been removed. Maybe too many people grabbing what
>  they wanted via http.

>  > Of the two, 4.1.2 requires less memory to build it and to compile
>  > things, compiles things faster and seems to produce smaller faster
>  > code.
oops, smaller, but not faster, though the difference is just a few %

> The 4.2.4 patches that i was using as i said probably produced a broken
>  tool-chain so i moved back to 4.1.2 as you recommended.
Yes, none of the others produced working executables as is.

>  I am pleased to hear that you are now being financed to continue where
>  others have left off as getting around certain bugs is very annoying
>  (broken unwind support)

There is support called arm-crunch-unwind.patch in the later tarballs
that is independent of the other patches and it should apply OK to the
earlier GCC versions too.
You can see it my most recent complete set under
http://martinwguy.co.uk/martin/crunch/gcc-4.3.2-patches
though this isn't prodution quality (sometimes Internal Compiler Errors)
If you'd like to try adding that patch and running some tests with
unwinds,  I'd be glad to hear of your results .
(Continue reading)

Gareth McClean | 19 Nov 12:13
Picon

Configuration of an embedded system

I figure this group is best placed to answer my questions, if not please
feel free to point me in the right direction: 

a) Do any open source projects target the initial setup of an embedded
system i.e. basics like manually configuring an Ethernet port, configuration
of wireless networking or possibly other essentials like hostname, timezone,
etc?

b) If not, do you perform your 'out-of-the-box setup' i.e. did you create
your own set of tools using packages like awk, sed, perl etc?

c) How are you communicating with the user during the installation process?

c) Are there any intentions to migrate the Linux 'system configuration' into
a machine readable format like XML. Ignore that that might sound like a call
to implement the equivalent of the windows registry and focus on the fact I
am concerned about the potential issues of processing unstructured, human
readable text files and want an easy/reliable way to programmatically change
the system configuration and manage future system updates.  

Thanks in advance, Gareth

Ryan Tandy | 20 Nov 11:50
Picon

Re: Configuration of an embedded system

On Wed, Nov 19, 2008 at 11:13:46AM -0000, Gareth McClean wrote:
> a) Do any open source projects target the initial setup of an embedded
> system i.e. basics like manually configuring an Ethernet port, configuration
> of wireless networking or possibly other essentials like hostname, timezone,
> etc?

I either use Gentoo's baselayout or openrc, or write my own simple init
script, depending on what I'm doing.  I don't know of any init system
projects that are targeted specifically at embedded.

> b) If not, do you perform your 'out-of-the-box setup' i.e. did you create
> your own set of tools using packages like awk, sed, perl etc?

Again, depending on the scale of the project, I use either a stripped
down Gentoo system or a simple Busybox-based system.

> c) How are you communicating with the user during the installation process?

Most of the systems I'm used to aren't designed to be installed by a
user - at least the software side of things.

> c) Are there any intentions to migrate the Linux 'system configuration' into
> a machine readable format like XML.

No.  Do you have any idea how long it takes to read and write XML?

> Ignore that that might sound like a call to implement the equivalent
> of the windows registry

It doesn't, although it does sound like unnecessary overhead.
(Continue reading)


Gmane