ltib
[Top][All Lists]
Advanced

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

Re: [Ltib] GLIBC 2.5


From: Steve Papacharalambous
Subject: Re: [Ltib] GLIBC 2.5
Date: Thu, 05 Mar 2009 12:12:46 +0000

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 






reply via email to

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