![]() |
Working in progress: upgrading glibc - standard c-library
1 Attachment(s)
This post is about updating glibc (libc6) on Maemo5.
Stock Maemo5 has quite old eglibc-2.5.1 (2008-04-16). glibc HISTORY: Code:
2.3 - 2002-10-03 1) get it compiled 2) get it booted and running 3) optimize for N900 INVESTIGATING I have tried to track origin of Maemo's eglibc and closest match is svn-2784 on eglibc-branch-2.5. Code:
#sources of Maemo5 libc6 STEP1: Starting with stock maemo SDK, i.e gcc-4.2. Compile latest eglibc-2.5 from svn without Maemo-patches, but using very same packeting: Code:
svn co svn://svn.eglibc.org/branches/eglibc-2_5 svn_eglibc-2.5 STEP2 Compile newer eglibc from upstream. Fastest way to test them are just skip version numbering and use same commands as above but starting with: svn co svn://svn.eglibc.org/branches/eglibc-2_6 svn_eglibc-2.5 -> works. svn co svn://svn.eglibc.org/branches/eglibc-2_7 svn_eglibc-2.5 -> works svn co svn://svn.eglibc.org/branches/eglibc-2_8 svn_eglibc-2.5 no need for "arm-asm-page-header.diff" anymore -> works svn co svn://svn.eglibc.org/branches/eglibc-2_10 svn_eglibc-2.5 -> works svn co svn://svn.eglibc.org/branches/eglibc-2_11 -r 8593 svn_eglibc-2.11_8593 #version 2.10.90. -> works NOTE: 'ldd' with this version and later needs bash! This is the end of this approach: later commits have new file ports/sysdeps/arm/eabi/backtrace.c which causes linking error: backtrace.c:105: undefined reference to `_Unwind_Backtrace' I'm pretty sure this is because of too old GCC (because it happens even I use newer binutils) (Btw: even this will be workarounded, eglibc-2.12 fails, because it needs CFI support: checking whether the CFI directive .cfi_sections is supported... no configure: error: need .cfi_sections in this configuration CFI stands for Call Frame Information and is a GNU AS extension to manage call frames. http://www.logix.cz/michal/devel/gas-cfi/ I don't know is this used, but at least it is checked and failed.) Here is the deb, I have tested it just reflashed N900 and didn't encounter any issues. http://cc.oulu.fi/~rantalai/maemo5/e...emo1_armel.deb STEP3 Use newer compiler: gcc-4.7.2 (and binutils-2.22) Upstream versions between 2.5 ... 2.15 need one patch and then they can be compiled: http://cc.oulu.fi/~rantalai/maemo5/e...ctor-nscd.diff There are problem that locales might break: Every text on the screen looks like: "wdgt_va_24h_time" (nothing helps from here: http://talk.maemo.org/showthread.php?t=52443) This is tested way to get eglibc-2.10.90 compiled with gcc-4.7 fully working (including working locales). You do not need thumb-support, but you need libstdc++6_4.7.2 and libgcc1_4.7.2 installed. Code:
#FLASH (flasher-3.5 -f -R -F RX-51_2009SE_20.2010.36-2_PR_COMBINED_MR0_ARM.bin) STEP4 Latest eglibc I could compiled so far is 2.16_r17194, version number 2.15.90. Next commit, svn-r17195, starts to complain about: intl/dcigettext.c:714: undefined reference to `__libc_enable_secure' elf/dl-addr.c:36: undefined reference to `_rtld_global' (these are defined, but it fails to link them) Commit message is "Merge changes between r17050 and r17194 from /fsf/trunk." But locales are broken. Investigating from commandline: command locale gives three errors before shows current locale: Code:
locale STEP4b: Take smaller steps. eglibc-2.11.0 (svn_r9170) with gcc-4.7 upgrading from 2.10.90. -> locales are broken, this time only: locale: Cannot set LC_CTYPE to default locale: No such file or directory locale: Cannot set LC_ALL to default locale: No such file or directory Stracing shows: Code:
Nokia-N900:~# strace locale |
Re: Working in progress: upgrading glibc - standard c-library
Maybe you need a newer locale-gen?? Also try this:
ln -s /usr/share/X11/locale/locale.alias /usr/share/locale/locale.alias The file exists in our N900 (at least in mine), got it from here: http://bts.grml.org/grml/issue655 |
Re: Working in progress: upgrading glibc - standard c-library
1 Attachment(s)
Quote:
echo en_GB.UTF-8 UTF-8 > /etc/locale.gen locale-gen Calls localedef -i en_GB -c -f UTF-8 -A /usr/share/locale/locale.alias en_GB.UTF-8 which updates file: /usr/lib/locale/locale-archive But it should create new subdirectory instead (at least locale is looking directory), so running manually localedef -i en_GB -c -f UTF-8 -A /usr/share/locale/locale.alias en_GB.UTF-8 --no-archive Creates subdirectory: /usr/lib/locale/en_GB.utf8 And locale is still looking them at /usr/lib/locale/en_GB Symlinking is enough ln -s /usr/lib/locale/en_GB.utf8/ /usr/lib/locale/en_GB ------- Summary (not tested fresh flashed) Code:
dpkg -i libc6_2.15.90-maemo1_armel.deb locales_2.15.90-maemo1_armel.deb Adding more languages to the Settings->Languages Code:
localedef -i fi_FI -c -f UTF-8 -A /usr/share/locale/locale.alias fi_FI.UTF-8 --no-archive ---------- Glibc-2.15.90: So far I haven't found any crash issues, every preinstalled application can be at least started. I have no idea about speed or battery consuming. Check screenshot: This glibc version is not fooled on scratchbox's host kernel version. |
Re: Working in progress: upgrading glibc - standard c-library
Tested with reflashed device:
Code:
#FLASH |
Re: Working in progress: upgrading glibc - standard c-library
1. When I was testing my build of Harmattan libc6, locales broke the menu translations, (wdgt and etc.)
2. There were some LC_* problems in easy debian, but don't remember which |
Re: Working in progress: upgrading glibc - standard c-library
I have a problem
HTML Code:
# apt-get -f install |
Re: Working in progress: upgrading glibc - standard c-library
Quote:
|
Re: Working in progress: upgrading glibc - standard c-library
First I like To thank you AapoRantalainen for your great efforts
What about update gstreamer Version: 0.10.34 It depends on libc6 >= 2.7 Was successfully By you libglib2.0-0 >= 2.26.0 Was successfully By you libgcc1 >= 1:4.1.1 We Have >=4.7.2-0+cssu0 libxml2 >= 2.6.27 We Have >= 2.6.32+0cssu1 and other sources is her http://xmlsoft.org/sources/old/ Think you can update gstreamer Or there are other problems ? |
Re: Working in progress: upgrading glibc - standard c-library
Do you plan to push it into cssu?
|
Re: Working in progress: upgrading glibc - standard c-library
Quote:
Seems that from Debian we can get 0.10.32 or 0.10.36. http://packages.debian.org/search?se...ords=gstreamer And from Ubuntu (Oneiric) 0.10.35. http://packages.ubuntu.com/search?la...searchon=names Will this be good version? |
All times are GMT. The time now is 22:55. |
vBulletin® Version 3.8.8