* [U-Boot-Users] software FP yada yada yada
@ 2006-10-12 20:00 Matt Gessner
2006-10-12 20:30 ` Wolfgang Denk
0 siblings, 1 reply; 12+ messages in thread
From: Matt Gessner @ 2006-10-12 20:00 UTC (permalink / raw)
To: u-boot
Howdy,
I've got a 1.1.2 u-boot that someone else set up and configured, and it
builds just fine (it doesn't run yet, but that's a different story). It
builds with a 3.4.1 gcc toolchain. I'm building for ARM91RM9200DK.
When I got 1.1.4, I get the infamous message about how u-boot needs a
software FP whereas my gcc is set up for hardware fp.
What I would LIKE to know is why 1.1.2 builds just fine but 1.1.4 does
not.
Any light you can shed would be appreciated.
Thanks,
Matt Gessner
Avidyne Corp.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [U-Boot-Users] software FP yada yada yada
2006-10-12 20:00 [U-Boot-Users] software FP yada yada yada Matt Gessner
@ 2006-10-12 20:30 ` Wolfgang Denk
2006-10-12 20:49 ` Ulf Samuelsson
0 siblings, 1 reply; 12+ messages in thread
From: Wolfgang Denk @ 2006-10-12 20:30 UTC (permalink / raw)
To: u-boot
In message <131AF8573CF31945B5B11E4201D3F1E142BA28@mail3.Avidyne.com> you wrote:
>
> When I got 1.1.4, I get the infamous message about how u-boot needs a
> software FP whereas my gcc is set up for hardware fp.
>
> What I would LIKE to know is why 1.1.2 builds just fine but 1.1.4 does
> not.
There have been so many changes between 1.1.2 and 1.1.4 that it's
difficult to tell which specific change causes the problem, but if
you check the "make" output you can clearly see where the problem is
coming from - your compiler fails to provide the required softfloat
routines. Which is kind of funny, since there are not so many ARM
systems with FPU around.
My recommendation is to fix the toolchain.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
I am pleased to see that we have differences. May we together become
greater than the sum of both of us.
-- Surak of Vulcan, "The Savage Curtain", stardate 5906.4
^ permalink raw reply [flat|nested] 12+ messages in thread
* [U-Boot-Users] software FP yada yada yada
@ 2006-10-12 20:32 Matt Gessner
2006-10-12 21:02 ` Wolfgang Denk
0 siblings, 1 reply; 12+ messages in thread
From: Matt Gessner @ 2006-10-12 20:32 UTC (permalink / raw)
To: u-boot
> -----Original Message-----
> From: u-boot-users-bounces at lists.sourceforge.net [mailto:u-boot-users-
> bounces at lists.sourceforge.net] On Behalf Of Wolfgang Denk
> Sent: Thursday, October 12, 2006 4:30 PM
> To: Matt Gessner
> Cc: u-boot-users at lists.sourceforge.net
> Subject: Re: [U-Boot-Users] software FP yada yada yada
>
> In message <131AF8573CF31945B5B11E4201D3F1E142BA28@mail3.Avidyne.com>
you
> wrote:
> >
> > When I got 1.1.4, I get the infamous message about how u-boot needs
a
> > software FP whereas my gcc is set up for hardware fp.
> >
> > What I would LIKE to know is why 1.1.2 builds just fine but 1.1.4
does
> > not.
>
> There have been so many changes between 1.1.2 and 1.1.4 that it's
> difficult to tell which specific change causes the problem, but if
> you check the "make" output you can clearly see where the problem is
> coming from - your compiler fails to provide the required softfloat
> routines. Which is kind of funny, since there are not so many ARM
> systems with FPU around.
>
> My recommendation is to fix the toolchain.
It certainly does seem odd that it was built with the floating point
hardware stuff compiled in, given that the unit has no floating point
support. My hands are a bit tied in that I don't have control over the
toolchain, but I will bring it up with them. If I have to, I suppose
I'll just have to stick with the 1.1.2 build, and figure out how to make
it work.
>
> Best regards,
>
> Wolfgang Denk
>
> --
> Software Engineering: Embedded and Realtime Systems, Embedded Linux
> Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
> I am pleased to see that we have differences. May we together become
> greater than the sum of both of us.
> -- Surak of Vulcan, "The Savage Curtain", stardate 5906.4
>
>
------------------------------------------------------------------------
-
> Using Tomcat but need to do more? Need to support web services,
security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
>
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> U-Boot-Users mailing list
> U-Boot-Users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/u-boot-users
Thanks for your prompt reply.
Regards,
Matt Gessner
^ permalink raw reply [flat|nested] 12+ messages in thread
* [U-Boot-Users] software FP yada yada yada
2006-10-12 20:30 ` Wolfgang Denk
@ 2006-10-12 20:49 ` Ulf Samuelsson
2006-10-12 21:35 ` Brent Cook
` (2 more replies)
0 siblings, 3 replies; 12+ messages in thread
From: Ulf Samuelsson @ 2006-10-12 20:49 UTC (permalink / raw)
To: u-boot
> In message <131AF8573CF31945B5B11E4201D3F1E142BA28@mail3.Avidyne.com> you wrote:
>>
>> When I got 1.1.4, I get the infamous message about how u-boot needs a
>> software FP whereas my gcc is set up for hardware fp.
>>
>> What I would LIKE to know is why 1.1.2 builds just fine but 1.1.4 does
>> not.
>
> There have been so many changes between 1.1.2 and 1.1.4 that it's
> difficult to tell which specific change causes the problem, but if
> you check the "make" output you can clearly see where the problem is
> coming from - your compiler fails to provide the required softfloat
> routines. Which is kind of funny, since there are not so many ARM
> systems with FPU around.
>
According to the crosstool documentation at www.kegel.com:
Most combinations of gcc 3.x.x and binutils fails when you try to build a softfloat toolchain
All tested combinations of gcc-4.x.x and binutils fails if softfloat is enabled.
If you want to use gcc 4, you cannot build u-boot as is.
> My recommendation is to fix the toolchain
IIRC, An file included by the top makefile defines CFLAGS to include -msoftfloat.
Removing -msoftfloat from CFLAGS allows you to build U-boot with your normal compiler.
I did that, and u-boot 1.1.4 compiled fine after that.
Personally, I think -msoftfloat should be optional.
Before Wolfgang start complaining about bloat, I'd like to point
out that due to segment boundaries in the AT45DB642D
a total of 256 kB is av ailable for the dataflashboot, u.boot and
u-boot environment and it is meaningless to save a byte here and there.
It is worth 10s of kB to be able to use a single toolchain to build
u-.boot, Linux and filesystem
.
> Best regards,
>
> Wolfgang Denk
>
> --
Best Regards
Ulf Samuelsson
^ permalink raw reply [flat|nested] 12+ messages in thread
* [U-Boot-Users] software FP yada yada yada
2006-10-12 20:32 Matt Gessner
@ 2006-10-12 21:02 ` Wolfgang Denk
0 siblings, 0 replies; 12+ messages in thread
From: Wolfgang Denk @ 2006-10-12 21:02 UTC (permalink / raw)
To: u-boot
In message <131AF8573CF31945B5B11E4201D3F1E142BA29@mail3.Avidyne.com> you wrote:
>
> It certainly does seem odd that it was built with the floating point
> hardware stuff compiled in, given that the unit has no floating point
> support. My hands are a bit tied in that I don't have control over the
> toolchain, but I will bring it up with them. If I have to, I suppose
> I'll just have to stick with the 1.1.2 build, and figure out how to make
> it work.
Maybe you can use the ELDK instead of your toolchain...
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Being schizophrenic is better than living alone.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [U-Boot-Users] software FP yada yada yada
2006-10-12 20:49 ` Ulf Samuelsson
@ 2006-10-12 21:35 ` Brent Cook
2006-10-12 21:44 ` Ulf Samuelsson
2006-10-12 21:48 ` Leonid
2006-10-12 23:16 ` Wolfgang Denk
2 siblings, 1 reply; 12+ messages in thread
From: Brent Cook @ 2006-10-12 21:35 UTC (permalink / raw)
To: u-boot
On Thursday 12 October 2006 15:49, Ulf Samuelsson wrote:
> > In message <131AF8573CF31945B5B11E4201D3F1E142BA28@mail3.Avidyne.com> you
wrote:
> >> When I got 1.1.4, I get the infamous message about how u-boot needs a
> >> software FP whereas my gcc is set up for hardware fp.
> >>
> >> What I would LIKE to know is why 1.1.2 builds just fine but 1.1.4 does
> >> not.
> >
> > There have been so many changes between 1.1.2 and 1.1.4 that it's
> > difficult to tell which specific change causes the problem, but if
> > you check the "make" output you can clearly see where the problem is
> > coming from - your compiler fails to provide the required softfloat
> > routines. Which is kind of funny, since there are not so many ARM
> > systems with FPU around.
>
> According to the crosstool documentation at www.kegel.com:
>
> Most combinations of gcc 3.x.x and binutils fails when you try to build a
> softfloat toolchain All tested combinations of gcc-4.x.x and binutils fails
> if softfloat is enabled. If you want to use gcc 4, you cannot build u-boot
> as is.
FYI, I have successfully used GCC 4.1.1 and binutils 2.16.1 to build not only
a working armv5teb softfloat toolchain (with glibc 2.4 to boot), but also
build and use u-boot 1.1.4 and the latest git head with no problems at all.
Granted, I built the toolchain from scratch - it takes a number of tweaks to
build correctly, all of which are not in crosstool.
I did notice that the floating point routines used when u-boot is built do not
come from gcc, but from the libarm routines in u-boot itself. Some FP
division operations (for instance, when dividing a u32 by a float) cause the
linker to barf that it's missing a lot of FP routines, but I worked around
this by just using integer math (didn't care to fixup the softfloat library
in libarm.)
> > My recommendation is to fix the toolchain
>
> IIRC, An file included by the top makefile defines CFLAGS to include
> -msoftfloat. Removing -msoftfloat from CFLAGS allows you to build U-boot
> with your normal compiler. I did that, and u-boot 1.1.4 compiled fine after
> that.
>
> Personally, I think -msoftfloat should be optional.
> Before Wolfgang start complaining about bloat, I'd like to point
> out that due to segment boundaries in the AT45DB642D
> a total of 256 kB is av ailable for the dataflashboot, u.boot and
> u-boot environment and it is meaningless to save a byte here and there.
>
> It is worth 10s of kB to be able to use a single toolchain to build
> u-.boot, Linux and filesystem
> .
>
> > Best regards,
> >
> > Wolfgang Denk
> >
> > --
>
> Best Regards
> Ulf Samuelsson
>
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier Download IBM WebSphere Application Server v.1.0.1 based on Apache
> Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> U-Boot-Users mailing list
> U-Boot-Users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/u-boot-users
^ permalink raw reply [flat|nested] 12+ messages in thread
* [U-Boot-Users] software FP yada yada yada
2006-10-12 21:35 ` Brent Cook
@ 2006-10-12 21:44 ` Ulf Samuelsson
2006-10-12 21:57 ` Brent Cook
0 siblings, 1 reply; 12+ messages in thread
From: Ulf Samuelsson @ 2006-10-12 21:44 UTC (permalink / raw)
To: u-boot
>> According to the crosstool documentation at www.kegel.com:
>>
>> Most combinations of gcc 3.x.x and binutils fails when you try to build a
>> softfloat toolchain All tested combinations of gcc-4.x.x and binutils fails
>> if softfloat is enabled. If you want to use gcc 4, you cannot build u-boot
>> as is.
>
> FYI, I have successfully used GCC 4.1.1 and binutils 2.16.1 to build not only
> a working armv5teb softfloat toolchain (with glibc 2.4 to boot), but also
> build and use u-boot 1.1.4 and the latest git head with no problems at all.
>
> Granted, I built the toolchain from scratch - it takes a number of tweaks to
> build correctly, all of which are not in crosstool.
>
Is there any true benefit of using a softfloat toochain?
The number of floating point operation is surely minimal in U.boot.
Anyone got an idea if there is any code saving.
Best Regards
Ulf Samuelsson
^ permalink raw reply [flat|nested] 12+ messages in thread
* [U-Boot-Users] software FP yada yada yada
2006-10-12 20:49 ` Ulf Samuelsson
2006-10-12 21:35 ` Brent Cook
@ 2006-10-12 21:48 ` Leonid
2006-10-12 23:16 ` Wolfgang Denk
2 siblings, 0 replies; 12+ messages in thread
From: Leonid @ 2006-10-12 21:48 UTC (permalink / raw)
To: u-boot
On Thursday, October 12, 2006 1:49 PM Ulf Samuelsson wrote:
>>>
>>> When I got 1.1.4, I get the infamous message about how u-boot needs
a
>>> software FP whereas my gcc is set up for hardware fp.
>>>
> According to the crosstool documentation at www.kegel.com:
> Most combinations of gcc 3.x.x and binutils fails when you try to
build a > softfloat toolchain
I could successfully build u-boot 1.1.1 and 1.1.4 for ATMEL at91rm9200
CPU with softfloat option using following Kegel combination:
gcc-3.4.5-glibc-2.3.6/arm-softfloat-linux-gnu (linux kernel and root
file systems are also built and working).
However I could run only u-boot 1.1.1 and that only after change:
==== //depot/L150/uboot/u-boot-1.1.1/include/asm-arm/global_data.h#2
(text)
63a64
> #ifdef GD_PTR_IN_REGISTER
64a66,68
> #else
> #define DECLARE_GLOBAL_DATA_PTR extern volatile gd_t *gd
> #endif
==== //depot/L150/uboot/u-boot-1.1.1/lib_arm/board.c#3 (text) ====
39a40
> volatile gd_t *gd;
Basically, I don't put gd into the register - crosstool somehow doesn't
compile it properly (I examined the assembler).
Leonid.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [U-Boot-Users] software FP yada yada yada
2006-10-12 21:44 ` Ulf Samuelsson
@ 2006-10-12 21:57 ` Brent Cook
0 siblings, 0 replies; 12+ messages in thread
From: Brent Cook @ 2006-10-12 21:57 UTC (permalink / raw)
To: u-boot
On Thursday 12 October 2006 16:44, Ulf Samuelsson wrote:
> >> According to the crosstool documentation at www.kegel.com:
> >>
> >> Most combinations of gcc 3.x.x and binutils fails when you try to build
> >> a softfloat toolchain All tested combinations of gcc-4.x.x and binutils
> >> fails if softfloat is enabled. If you want to use gcc 4, you cannot
> >> build u-boot as is.
> >
> > FYI, I have successfully used GCC 4.1.1 and binutils 2.16.1 to build not
> > only a working armv5teb softfloat toolchain (with glibc 2.4 to boot), but
> > also build and use u-boot 1.1.4 and the latest git head with no problems
> > at all.
> >
> > Granted, I built the toolchain from scratch - it takes a number of tweaks
> > to build correctly, all of which are not in crosstool.
>
> Is there any true benefit of using a softfloat toochain?
> The number of floating point operation is surely minimal in U.boot.
> Anyone got an idea if there is any code saving.
>
> Best Regards
> Ulf Samuelsson
It's pretty darn minimal in u-boot. If you build Linux with this toolchain
however, and have a non-trivial number of floating point operations in your
application code, you could end up causing a lot of processor exceptions,
which get caught by the kernel and run through the FP emulator. The gist
would be that userland code has to do a context switch to the kernel for
every FP operation if you build with a hard-float toolchain. With a
soft-float toolchain, it stays in userland, and is a bit faster and more
efficient (as efficient as soft floating point can be.)
- Brent
^ permalink raw reply [flat|nested] 12+ messages in thread
* [U-Boot-Users] software FP yada yada yada
2006-10-12 20:49 ` Ulf Samuelsson
2006-10-12 21:35 ` Brent Cook
2006-10-12 21:48 ` Leonid
@ 2006-10-12 23:16 ` Wolfgang Denk
2006-10-13 4:44 ` Ulf Samuelsson
2 siblings, 1 reply; 12+ messages in thread
From: Wolfgang Denk @ 2006-10-12 23:16 UTC (permalink / raw)
To: u-boot
Dear Ulf,
in message <011f01c6ee45$0eefaba0$0d68fe51@atmel.com> you wrote:
>
> According to the crosstool documentation at www.kegel.com:
>
> Most combinations of gcc 3.x.x and binutils fails when you try to build a softfloat toolchain
> All tested combinations of gcc-4.x.x and binutils fails if softfloat is enabled.
> If you want to use gcc 4, you cannot build u-boot as is.
This is not correct. See for example ELDK 4.0: based on GCC 4.0, based
on crosstool, and works just fine :-)
> It is worth 10s of kB to be able to use a single toolchain to build
> u-boot, Linux and filesystem
Agreed. That's how we do it with the ELDK. I don't see why this
should be impossible for others.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"I may be synthetic, but I'm not stupid" - the artificial person,
from _Aliens_
^ permalink raw reply [flat|nested] 12+ messages in thread
* [U-Boot-Users] software FP yada yada yada
2006-10-12 23:16 ` Wolfgang Denk
@ 2006-10-13 4:44 ` Ulf Samuelsson
2006-10-13 7:54 ` Robert Schwebel
0 siblings, 1 reply; 12+ messages in thread
From: Ulf Samuelsson @ 2006-10-13 4:44 UTC (permalink / raw)
To: u-boot
> Dear Ulf,
>
> in message <011f01c6ee45$0eefaba0$0d68fe51@atmel.com> you wrote:
>>
>> According to the crosstool documentation at www.kegel.com:
>>
>> Most combinations of gcc 3.x.x and binutils fails when you try to build a softfloat toolchain
>> All tested combinations of gcc-4.x.x and binutils fails if softfloat is enabled.
>> If you want to use gcc 4, you cannot build u-boot as is.
>
> This is not correct. See for example ELDK 4.0: based on GCC 4.0, based
> on crosstool, and works just fine :-)
>
I quite often work with customers which has little or no experience with Linux
but still wants to start using this for new embedded systems
My goal is to have a customer download a file, decompress it and type make.
After that, everything needed to install a demo on a target should be ready.
I have choosen to use "buildroot" as the framework for this.
Buildroot will build the toolchain as part of the build process, so there is no need
to download and install a toolchain.
Avoiding extra steps like this has high value to me.
It is going to be very complicated to use buildroot with two toolchains and
there is of course nothing in buildroot which installs ELDK as the toolset.
I do want to have u-boot built as part of the buildroot make process.
Since most combinations of gcc/binutils fail it is much easier to use a
NWFPE version of the compiler also for U-boot.
>> It is worth 10s of kB to be able to use a single toolchain to build
>> u-boot, Linux and filesystem
>
> Agreed. That's how we do it with the ELDK. I don't see why this
> should be impossible for others.
>
> Best regards,
>
> Wolfgang Denk
>
Best Regards
Ulf Samuelsson ulf at atmel.com
Atmel Nordic AB
Mail: Box 2033, 174 02 Sundbyberg, Sweden
Visit: Kavalleriv?gen 24, 174 58 Sundbyberg, Sweden
Phone +46 (8) 441 54 22 Fax +46 (8) 441 54 29
GSM +46 (706) 22 44 57
Technical support when I am not available:
AT89 C51 Applications Group: mailto:micro.hotline at nto.atmel.com
AT90 AVR Applications Group: mailto:avr at atmel.com
AT91 ARM Applications Group: mailto:at91support at atmel.com
FPSLIC Application Group: mailto:fpslic at atmel.com
Best AVR link: www.avrfreaks.net
^ permalink raw reply [flat|nested] 12+ messages in thread
* [U-Boot-Users] software FP yada yada yada
2006-10-13 4:44 ` Ulf Samuelsson
@ 2006-10-13 7:54 ` Robert Schwebel
0 siblings, 0 replies; 12+ messages in thread
From: Robert Schwebel @ 2006-10-13 7:54 UTC (permalink / raw)
To: u-boot
Hi Ulf,
On Fri, Oct 13, 2006 at 06:44:07AM +0200, Ulf Samuelsson wrote:
> I quite often work with customers which has little or no experience
> with Linux but still wants to start using this for new embedded
> systems
Well, I know that it's a common habit of customers out there to expect
that with Linux everything works with a click, one doesn't have to learn
anything, wants all the features and it shoudl be free of cost of
course. Nevertheless, the knowledge has to be somewhere, and until
something goes wrong there are OSS projects out there which do both -
conserving the knowledge and providing a one-click solution.
> My goal is to have a customer download a file, decompress it and type
> make. After that, everything needed to install a demo on a target
> should be ready.
We do similar things for our customers' OSELAS.BSP()s. Do you know
PTXdist? It was heavily inspired by buildroot when it started in 2002,
although had a menuconfig frontend from the beginning and recently
evolved into something which is really powerful for that kind of project
work.
> I have choosen to use "buildroot" as the framework for this.
>
> Buildroot will build the toolchain as part of the build process, so
> there is no need to download and install a toolchain. Avoiding extra
> steps like this has high value to me.
Well, you probably don't want to build the toolchain every time you
build your rootfs. With PTXdist, building toolchains is just another
"project", and "projects" are being built with "ptxdist go" once they
have been defined by somebody.
> It is going to be very complicated to use buildroot with two
> toolchains and there is of course nothing in buildroot which installs
> ELDK as the toolset.
IMHO there is no need for two toolchains. Do your processors have
hardware floating point? If not, build everything with a softfloat
toolchain. We do that all the time and it works like a charm, up to
gcc-4.2 previews.
> I do want to have u-boot built as part of the buildroot make process.
With PTXdist, you could simply define an u-boot packet in your project.
> Since most combinations of gcc/binutils fail it is much easier to use
> a NWFPE version of the compiler also for U-boot.
I can imagine only one reason at this moment to use hardware floating
point toolchains on ARMs without harware float units: Java. The kaffe vm
has still no jit support which works with softfloat/vfp.
Robert
--
Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de
Pengutronix - Linux Solutions for Science and Industry
Handelsregister: Amtsgericht Hildesheim, HRA 2686
Hannoversche Str. 2, 31134 Hildesheim, Germany
Phone: +49-5121-206917-0 | Fax: +49-5121-206917-9
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2006-10-13 7:54 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-12 20:00 [U-Boot-Users] software FP yada yada yada Matt Gessner
2006-10-12 20:30 ` Wolfgang Denk
2006-10-12 20:49 ` Ulf Samuelsson
2006-10-12 21:35 ` Brent Cook
2006-10-12 21:44 ` Ulf Samuelsson
2006-10-12 21:57 ` Brent Cook
2006-10-12 21:48 ` Leonid
2006-10-12 23:16 ` Wolfgang Denk
2006-10-13 4:44 ` Ulf Samuelsson
2006-10-13 7:54 ` Robert Schwebel
-- strict thread matches above, loose matches on Subject: below --
2006-10-12 20:32 Matt Gessner
2006-10-12 21:02 ` Wolfgang Denk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox