ltib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Ltib] NEW LTIB...and Full Toolchain build....


From: Morrison, Tom
Subject: [Ltib] NEW LTIB...and Full Toolchain build....
Date: Mon, 30 Mar 2009 16:55:02 -0400

Hi everyone...

I have been using a LTIB image from Freescale and have successfully
built a rootfs that I am happy with. It is working well enough that
we want to use this as our standard rootfs (aka: DISTRO) - which means
that the application(s) - NOT built in LTIB - need to have a full
compiler that supports all of the standard Linux utils (e.g.: binutils)
as well as all the include files (i.e.: include/linux/i2c.h)

So, the compiler version supported in this release is 4.2-171 and the
target platform is a MPC85xx (E500v2 (SPE=yes))

How do I go about building a full Toolchain for my application to use?


Tom


>> -----Original Message-----
>> From: Geary Sean-R60898 [mailto:address@hidden
>> Sent: Thursday, March 05, 2009 12:08 PM
>> To: Morrison, Tom; Papacharlambous Steve-R61559
>> Cc: McCormick Ralph-R58423
>> Subject: RE: [Ltib] GLIBC 2.5
>> 
>> I did use the 171 files but am about to try again with the 187
version
>> 
>> Just to verify you are still attempting to build this within LTIB
>> correct?
>> 
>> 
>> 
>> 
>> -----Original Message-----
>> From: Morrison, Tom [mailto:address@hidden
>> Sent: Thursday, March 05, 2009 12:03 PM
>> To: Geary Sean-R60898; Papacharlambous Steve-R61559
>> Cc: McCormick Ralph-R58423
>> Subject: RE: [Ltib] GLIBC 2.5
>> 
>> Thank you - thank you - thank you Sean!
>> 
>> I am very grateful that you've been very active with this and gotten
the
>> ball rolling (I figured I should at least 'officially' put the SR in
-
>> so we can track this...sorry to cross paths with your work...
>> 
>> 
>> Attached is a text file with the failure...
>> 
>> If you look in this file:
>> 
>>
/opt/freescale/usr/local/gcc-4.2.171-eglibc-2.5.171-dp-2/powerpc-none-li
>> nux-gnuspe/lib/gcc/powerpc-none-linux-gnuspe/4.2.3/include/spe.h
>> 
>> It seems to be want a definition for
>> 
>>    __ev64_opaque__
>> 
>> And in my 'toolchain' there seems to NOT be a definition for this?
>> 
>> I did follow Steve's instructions (and I used -187 version (not -171
>> that came with the LTIB image - this may be part of the problem)?
>> 
>> T
>> 
>> >> -----Original Message-----
>> >> From: Geary Sean-R60898 [mailto:address@hidden
>> >> Sent: Thursday, March 05, 2009 11:46 AM
>> >> To: Papacharlambous Steve-R61559; Morrison, Tom
>> >> Cc: McCormick Ralph-R58423
>> >> Subject: RE: [Ltib] GLIBC 2.5
>> >>
>> >> Hi Tom,
>> >>
>> >> I saw the SR that you created and had one of our apps guys grab
it..
>> >> Also the BSP team has been looking into this issue as well since
last
>> >> night when I passed your emails on to them for investigation.
This
>> >> team is in Beijing so hopefully we'll hear something back tomorrow
>> >> morning in regards to this.
>> >>
>> >> I have been rebuilding glibc and it actually just finished without
>> error
>> >> once I installed gawk.   Where in your build does it actually
fail?
>> >>
>> >>
>> >> Sean
>> >>
>> >>
>> >> -----Original Message-----
>> >> From: Papacharlambous Steve-R61559
>> >> Sent: Thursday, March 05, 2009 11:23 AM
>> >> To: Morrison, Tom
>> >> Cc: Geary Sean-R60898; McCormick Ralph-R58423
>> >> Subject: RE: [Ltib] GLIBC 2.5
>> >>
>> >> Hi Tom,
>> >>
>> >> Just out of interest I checked how glibc was built in the
toolchain,
>> and
>> >> the following cflags were used to build glibc: "-O -mcpu=8548
>> -mspe=yes
>> >> -mabi=spe -mhard-float -mfloat-gprs=double" which looks correct to
>> me.
>> >>
>> >> Just a thought but are you building all your user space packages
with
>> >> these flags?
>> >>
>> >> Best regards,
>> >>
>> >> Steve
>> >>
>> >> On Thu, 2009-03-05 at 10:36 -0500, Morrison, Tom wrote:
>> >> > Fyi - Prep OK - build failed because spe.h defines something
called
>> >> > __ev64_opaque__ and this is NOT defined anywhere (so there is
still
>> >> > some missing patch).....:-(...
>> >> >
>> >> > Now I am at the mercy of Sean and Ralph t
>> >> >
>> >> > >> -----Original Message-----
>> >> > >> From: Steve Papacharalambous [mailto:address@hidden
>> >> > >> Sent: Thursday, March 05, 2009 7:13 AM
>> >> > >> To: Morrison, Tom
>> >> > >> Cc: address@hidden
>> >> > >> Subject: Re: [Ltib] GLIBC 2.5
>> >> > >>
>> >> > >> Hi Tom,
>> >> > >>
>> >> > >> It looks like you are using an iso from Freescale in which
case
>> you
>> >> > need
>> >> > >> to get support from Freescale for this iso.  I've put
>> instructions
>> >> > >> of how to obtain support at the end of this email.
>> >> > >>
>> >> > >> The decision to use the libraries and headers from the
toolchain
>> in
>> >> > the
>> >> > >> target root file system is a deliberate choice to ensure
>> >> > compatibility
>> >> > >> between the run time environment on the target root file
system
>> and
>> >> > the
>> >> > >> executables that are built using the cross toolchain.
>> >> > >>
>> >> > >> Having said that you should be able to build the glibc
package,
>> and
>> >>
>> >> > >> you're right the two patches have not been uploaded to the
GPP
>> yet.
>> >> > >> I'll look into this and get them uploaded for you.  In the
>> meantime
>> >> > you
>> >> > >> can extract these two patches from the toolchain source rpm
>> which
>> >> > >> is available from the GPP.  One way to extract these files is
to
>> >> > >> use the
>> >> > >> following:
>> >> > >>
>> >> > >> "rpm2cpio freescale-powerpc-linux-gnu-4.2-187.src.rpm | cpio
>> -ivd"
>> >> > >>
>> >> > >> Obtaining support from Freescale:
>> >> > >> ------------
>> >> > >> As you are using an iso image downloaded from
>> >> > http://www.freescale.com/
>> >> > >> you should post support questions by following these steps:
>> >> > >>
>> >> > >>    * go to http://www.freescale.com
>> >> > >>    * click on "Support / Technical support"
>> >> > >>    * click on "Submit a Service Request"
>> >> > >>    * register to get a user name and password.
>> >> > >>    * login in with your user name and password
>> >> > >>    * on the "New Service Request" page:
>> >> > >>       * category = Technical Request
>> >> > >>       * topic = Linux BSP
>> >> > >>       * Click on "Continue"
>> >> > >>    * fill out the information for the service request
>> >> > >>    * click on the "Submit" button at the bottom of the page.
>> >> > >> ------------
>> >> > >>
>> >> > >> Best regards,
>> >> > >>
>> >> > >> Steve
>> >> > >>
>> >> > >> On Wed, 2009-03-04 at 17:28 -0500, Morrison, Tom wrote:
>> >> > >> > I am using an LTIB package from Freescale for the MPC8572
>> (dated
>> >> > >> > 121208)...
>> >> > >> >
>> >> > >> >
>> >> > >> >
>> >> > >> > It seems that the subject line package of this BSP is a
>> pre-built
>> >> > RPM
>> >> > >> > (it doesn't go through
>> >> > >> >
>> >> > >> > the a full build when using generic <./ltib> build process.
It
>> >> > looks
>> >> > >> > like this full library gets
>> >> > >> >
>> >> > >> > untars a pre-built one into the as a uses a pre-built rpm
>> GLIBC
>> >> > (and
>> >> > >> > an associated native
>> >> > >> >
>> >> > >> > GCC compiler (whose source is available luckily)...
>> >> > >> >
>> >> > >> >
>> >> > >> >
>> >> > >> > The problem with this pre-built one is that it was NOT
built
>> >> > correctly
>> >> > >> > for the E500 and/or
>> >> > >> >
>> >> > >> > with a compiler that supports SPE (correctly)...
>> >> > >> >
>> >> > >> >
>> >> > >> >
>> >> > >> > I determined this by noticing that when executing startup
>> scripts
>> >>
>> >> > >> > (executing out of new rootfs),
>> >> > >> >
>> >> > >> > I am getting multiple math emulation exceptions (when
traced
>> >> > >> > close
>> >> > to
>> >> > >> > - it looks like it is
>> >> > >> >
>> >> > >> > coming from GLIBC type functions).  I determine that this
is
>> case
>> >> > with
>> >> > >> > both the New Linux
>> >> > >> >
>> >> > >> > Kernel associated with this NEW LTIB Package, and my older
>> (more
>> >> > >> > stable) Linux Kernel
>> >> > >> >
>> >> > >> > which has been thoroughly QA'd..
>> >> > >> >
>> >> > >> >
>> >> > >> >
>> >> > >> > OK, I can deal with most of those exceptions - but
>> unfortunately,
>> >>
>> >> > >> > there is something I
>> >> > >> >
>> >> > >> > am trying to execute that is NOT handled correctly with my
>> OLDER
>> >> > >> > / more stable
>> >> > >> >
>> >> > >> > Linux kernel...and thus causes an ILLEGAL instruction (and
>> thus,
>> >> > >> > my
>> >> > NEW
>> >> > >> > user program
>> >> > >> >
>> >> > >> > is NOT working)...
>> >> > >> >
>> >> > >> >
>> >> > >> >
>> >> > >> > OK - well, maybe somebody who built this LTIB image took a
>> lazy
>> >> > >> > approach - so I decide I
>> >> > >> >
>> >> > >> > want to try to build the GLIBC again (and make sure it has
all
>> >> > >> > the proper configuration switches
>> >> > >> >
>> >> > >> > to NOT cause this problem)...
>> >> > >> >
>> >> > >> >
>> >> > >> >
>> >> > >> > So, I try ./ltib -m prep -p glibc
>> >> > >> >
>> >> > >> >
>> >> > >> >
>> >> > >> > >> Try glibc-2.5.tar.bz2.md5 from the GPP
>> >> > >> >
>> >> > >> > >> 18:49:52
>> >> > >> > >> URL:http://www.bitshrine.org/gpp/glibc-2.5.tar.bz2.md5
>> >> > >> > [51/51] -> "glibc-2.5.tar.bz2.md5" [1]
>> >> > >> >
>> >> > >> > >> Try glibc-2.5.tar.bz2 from the GPP
>> >> > >> >
>> >> > >> >
>> >> > >> >
>> >> > >> > And it fails utterly...
>> >> > >> >
>> >> > >> >
>> >> > >> >
>> >> > >> > I REALLY want to use this OLD/Stable kernel (with the new
LTIB
>> >> > rootfs
>> >> > >> > (because I can run Java with this version))...
>> >> > >> >
>> >> > >> >
>> >> > >> >
>> >> > >> > a)     Have I made the proper analysis of this pre-built
LTIB
>> >> image
>> >> > >> > not being built correctly (I KNOW that this is
>> >> > >> >
>> >> > >> > the source of my math exceptions - 99.5% sure
>> >> > >> >
>> >> > >> > b)     How do I get a new version
>> >> > >> >
>> >> > >> > c)     Will this fix my problem?
>> >> > >> >
>> >> > >> >
>> >> > >> >
>> >> > >> > Here is the spec file that came with the NEW LTIB image...
>> >> > >> >
>> >> > >> >
>> >> > >> >
>> >> > >> > %define pfx /opt/freescale/rootfs/%{_target_cpu}
>> >> > >> >
>> >> > >> > %define cs_version 4.2-187
>> >> > >> >
>> >> > >> >
>> >> > >> >
>> >> > >> > Summary         : GNU standard C library with NPTL thread
>> >> library.
>> >> > >> >
>> >> > >> > Name            : glibc
>> >> > >> >
>> >> > >> > Version         : 2.5
>> >> > >> >
>> >> > >> > Release         : 1
>> >> > >> >
>> >> > >> > License         : LGPL
>> >> > >> >
>> >> > >> > Vendor          : Freescale
>> >> > >> >
>> >> > >> > Packager        : Stuart Hughes & Steve Papacharalambous
>> >> > >> >
>> >> > >> > Group           : System Environment/Libraries
>> >> > >> >
>> >> > >> > Source0         : %{name}-%{version}.tar.bz2
>> >> > >> >
>> >> > >> > Source1         : %{name}-ports-%{version}.tar.bz2
>> >> > >> >
>> >> > >> > Source2         : %{name}-libidn-%{version}.tar.bz2
>> >> > >> >
>> >> > >> > Patch0          :
%{name}-%{cs_version}-from-fsf-2_5.diff.gz
>> >> > >> >
>> >> > >> > Patch1          :
>> >> %{name}_ports-%{cs_version}-from-fsf-2_5.diff.gz
>> >> > >> >
>> >> > >> > BuildRoot       : %{_tmppath}/%{name}
>> >> > >> >
>> >> > >> > Prefix          : %{pfx}
>> >> > >> >
>> >> > >> >
>> >> > >> >
>> >> > >> > %Description
>> >> > >> >
>> >> > >> > %{summary}
>> >> > >> >
>> >> > >> >
>> >> > >> >
>> >> > >> > This glibc package is built using glibc-2.5 and
>> glibc-ports-2.5
>> >> > plus
>> >> > >> > the
>> >> > >> >
>> >> > >> > following patches from the CodeSourcery %{cs_version}
release:
>> >> > >> >
>> >> > >> >
>> >> > >> >
>> >> > >> > - glibc-4.2-187-from-fsf-2_5.diff
>> >> > >> >
>> >> > >> > - glibc_ports-4.2-187-from-fsf-2_5.diff
>> >> > >> >
>> >> > >> >
>> >> > >> >
>> >> > >> > The glibc and glibc-ports tarballs can be obtained from any
of
>> >> > >> > the
>> >> > GNU
>> >> > >> > ftp
>> >> > >> >
>> >> > >> > sites or their mirrors.
>> >> > >> >
>> >> > >> > The CodeSourcery patch can be obtained by downloading the
>> source
>> >> > rpm:
>> >> > >> >
>> >> > >> > freescale-powerpc-linux-gnu-%{cs_version}.src.rpm from:
>> >> > >> >
>> >> > >> >
http://www.codesourcery.com/gnu_toolchains/power/download.html
>> >> > >> > and then
>> >> > >> >
>> >> > >> > extracting the glibc and glibc-ports patchs from this
source
>> rpm.
>> >> > >> >
>> >> > >> >
>> >> > >> >
>> >> > >> >
>> >> > >> >
>> >> > >> > %Prep
>> >> > >> >
>> >> > >> > %setup
>> >> > >> >
>> >> > >> > %patch0 -p1
>> >> > >> >
>> >> > >> > tar jxvf %{SOURCE1}
>> >> > >> >
>> >> > >> > cd glibc-ports-%{version}
>> >> > >> >
>> >> > >> > %patch1 -p1
>> >> > >> >
>> >> > >> > cd ..
>> >> > >> >
>> >> > >> > ln -s glibc-ports-%{version} ports
>> >> > >> >
>> >> > >> > tar jxvf %{SOURCE2}
>> >> > >> >
>> >> > >> > ln -s glibc-libidn-%{version} libidn
>> >> > >> >
>> >> > >> >
>> >> > >> >
>> >> > >> >
>> >> > >> >
>> >> > >> > %Build
>> >> > >> >
>> >> > >> > # Temporary hack - stevep
>> >> > >> >
>> >> > >> > # For building toolchain components an optimized version of
>> the
>> >> > >> >
>> >> > >> > # target is needed.  This should really be defined in the
>> config
>> >> > >> >
>> >> > >> > # area of ltib, and not done in the toolchain spec files.
>> >> > >> >
>> >> > >> > # For now we assume that the optimised target can be
derived
>> by
>> >> > >> >
>> >> > >> > # stripping the trailing "-" off the toolchain prefix, but
>> this
>> >> > >> >
>> >> > >> > # will not be true for all cases, eg when using uClibc
>> >> toolchains.
>> >> > >> >
>> >> > >> > OPT_CFGHOST=`echo ${TOOLCHAIN_PREFIX} | perl -n -e
>> >> > >> > 's,-$,,;print'`
>> >> > >> >
>> >> > >> >
>> >> > >> >
>> >> > >> > # Use the toolchain headers as the default for the glibc
>> build.
>> >> > >> >
>> >> > >> > # TODO: Add a configuration option to allow selection of
the
>> BSP
>> >> > >> > kernel
>> >> > >> >
>> >> > >> > # headers for the build - stevep
>> >> > >> >
>> >> > >> > TC_HEADERS_DIR="`dirname \`${TOOLCHAIN_PREFIX}gcc
>> >> > ${TOOLCHAIN_CFLAGS}
>> >> > >> > -print-file-name=libc.so\` | perl -p -e
's,/lib$,,'`/include"
>> >> > >> >
>> >> > >> >
>> >> > >> >
>> >> > >> > rm -rf build-glibc
>> >> > >> >
>> >> > >> > mkdir build-glibc
>> >> > >> >
>> >> > >> > cd build-glibc
>> >> > >> >
>> >> > >> > echo "libc_cv_forced_unwind=yes" > config.cache
>> >> > >> >
>> >> > >> > echo "libc_cv_c_cleanup=yes" >> config.cache
>> >> > >> >
>> >> > >> > BUILD_CC="${BUILDCC}" \
>> >> > >> >
>> >> > >> > CFLAGS="-O" \
>> >> > >> >
>> >> > >> > ../configure \
>> >> > >> >
>> >> > >> >   --prefix=/usr \
>> >> > >> >
>> >> > >> >   --build=%{_build} \
>> >> > >> >
>> >> > >> >   --host=${OPT_CFGHOST} \
>> >> > >> >
>> >> > >> >   --disable-profile \
>> >> > >> >
>> >> > >> >   --without-gd \
>> >> > >> >
>> >> > >> >   --without-cvs \
>> >> > >> >
>> >> > >> >   --cache-file=config.cache \
>> >> > >> >
>> >> > >> >   --enable-kernel=2.6.10 \
>> >> > >> >
>> >> > >> >   --with-headers=${TC_HEADERS_DIR} \
>> >> > >> >
>> >> > >> >   --enable-add-ons=ports,nptl,libidn
>> >> > >> >
>> >> > >> > make
>> >> > >> >
>> >> > >> >
>> >> > >> >
>> >> > >> > %Install
>> >> > >> >
>> >> > >> > cd build-glibc
>> >> > >> >
>> >> > >> > make install install_root=${RPM_BUILD_ROOT}/%{pfx}
>> >> > >> >
>> >> > >> >
>> >> > >> >
>> >> > >> > # remove absolute paths from text search files (if they
exist)
>> >> > >> >
>> >> > >> > perl -w -e '
>> >> > >> >
>> >> > >> >     @ARGV = grep { `file $_` =~ m,ASCII C program text, }
>> @ARGV;
>> >> > >> >
>> >> > >> >     exit(0) unless @ARGV;
>> >> > >> >
>> >> > >> >     $^I = ".bak";
>> >> > >> >
>> >> > >> >     while(<>) {
>> >> > >> >
>> >> > >> >         s,[\S/]+/,,g if m,^GROUP,;
>> >> > >> >
>> >> > >> >         print;
>> >> > >> >
>> >> > >> >     }
>> >> > >> >
>> >> > >> >     ' ${RPM_BUILD_ROOT}/%{pfx}/lib/libc.so \
>> >> > >> >
>> >> > >> >       ${RPM_BUILD_ROOT}/%{pfx}/lib/libpthread.so \
>> >> > >> >
>> >> > >> >       ${RPM_BUILD_ROOT}/%{pfx}/%{_prefix}/lib/libc.so \
>> >> > >> >
>> >> > >> >       ${RPM_BUILD_ROOT}/%{pfx}/%{_prefix}/lib/libpthread.so
>> >> > >> >
>> >> > >> >
>> >> > >> >
>> >> > >> > # Remove libtool .la files.
>> >> > >> >
>> >> > >> > find $RPM_BUILD_ROOT/%{pfx} -name \*.la -exec rm {} \;
>> >> > >> >
>> >> > >> >
>> >> > >> >
>> >> > >> >
>> >> > >> >
>> >> > >> > %Clean
>> >> > >> >
>> >> > >> > rm -rf ${RPM_BUILD_ROOT}
>> >> > >> >
>> >> > >> >
>> >> > >> >
>> >> > >> >
>> >> > >> >
>> >> > >> > %Files
>> >> > >> >
>> >> > >> > %defattr(-,root,root)
>> >> > >> >
>> >> > >> > %{pfx}/*
>> >> > >> >
>> >> > >> >
>> >> > >> >
>> >> > >> > Tom Morrison
>> >> > >> > Principal Software Engineer
>> >> > >> >
>> >> > >> > EMPIRIX
>> >> > >> > 20 Crosby Drive - Bedford, MA  01730
>> >> > >> > p: 781.266.3567 f: 781.266.3670
>> >> > >> > email: address@hidden
>> >> > >> > www.empirix.com
>> >> > >> >
>> >> > >> >
>> >> > >> >
>> >> > >> >
>> >> > >> >
>> >> > >> >
>> >> > >> >
>> >> > >> > _______________________________________________
>> >> > >> > LTIB home page: http://bitshrine.org
>> >> > >> >
>> >> > >> > Ltib mailing list
>> >> > >> > address@hidden
>> >> > >> > http://lists.nongnu.org/mailman/listinfo/ltib
>> >> > >> --
>> >> > >> Steve Papacharalambous
>> >> > >> Developer Technology.
>> >> > >>
>> >> > >> Registered address:
>> >> > >> Freescale Semiconductor UK Ltd
>> >> > >> Colvilles Road
>> >> > >> East Kilbride
>> >> > >> Glasgow
>> >> > >> Scotland
>> >> > >> G75 OTG
>> >> > >>
>> >> > >> Registration number: SC262720
>> >> > >> VAT number: GB831329053
>> >> > >>
>> >> > >> (X) Public
>> >> > >> ( ) Freescale Internal Use Only
>> >> > >> ( ) Freescale Confidential Proprietary
>> >> > >>
>> >> > >>
>> >> >
>> >> >
>> >> --
>> >> Steve Papacharalambous
>> >> Developer Technology.
>> >>
>> >> Registered address:
>> >> Freescale Semiconductor UK Ltd
>> >> Colvilles Road
>> >> East Kilbride
>> >> Glasgow
>> >> Scotland
>> >> G75 OTG
>> >>
>> >> Registration number: SC262720
>> >> VAT number: GB831329053
>> >>
>> >> (X) Public
>> >> ( ) Freescale Internal Use Only
>> >> ( ) Freescale Confidential Proprietary
>> >>
>> >>
>> >>
>> 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]