Reply
Thread Tools
Posts: 804 | Thanked: 1,598 times | Joined on Feb 2010 @ Gdynia, Poland
#3051
Originally Posted by sulu View Post
Correct.
My CB2 runs a custom 3.4.67+ made by the Cubian folks, my PC runs the 3.2.51 Debian kernel.
Originally Posted by sulu View Post
Quite frankly, installing custom kernels on the CB2 is above my skills since it involves a lot of special tricks.
Kernels always have "just worked" for me. I've tried some occasional recompiles just for fun but I'm far away from actually being able to do any troubleshooting.
That's what I thought - I suspect older kernel wouldn't even boot, as it requires some patches done by project Cubian.

Originally Posted by sulu View Post
I can try to do so in a VM. I remember having done something like that in the past with some troubles due to the age of the kernel, but I can't remember what exactly was the problem.
On the other hand my experience (with x86, arm and ppc) is, that when you get that close to the hardware level you can't simply abstract from one architecture to another. So I'm sceptic if x86-experiments are useful for arm.
Yeah, that's what I think, too, so I guess that's not needed.

Here it is (wheezy/armhf image on the N900):
Code:
# ls -l /usr/lib/arm-linux-gnueabihf/libstdc++.so.6*
lrwxrwxrwx 1 root root     19 Jan  8  2013 /usr/lib/arm-linux-gnueabihf/libstdc++.so.6 -> libstdc++.so.6.0.17
-rw-r--r-- 1 root root 641216 Jan  8  2013 /usr/lib/arm-linux-gnueabihf/libstdc++.so.6.0.17
# export LD_PRELOAD=/usr/lib/arm-linux-gnueabihf/libstdc++.so.6
# echo $LD_PRELOAD
/usr/lib/arm-linux-gnueabihf/libstdc++.so.6
# export LD_PRELOAD=/usr/lib/arm-linux-gnueabihf/libstdc++.so.6
# gparted
======================
libparted : 2.3
======================
*** glibc detected *** /usr/sbin/gpartedbin: free(): invalid pointer: 0x00287210 ***
Aborted
strace outputs are attached.[/QUOTE]

Thanks for all the updates, I don't see anything obvious in them either. What does the "file /usr/sbin/gpartedbin" say (could you post the output)? Maybe it doesn't support our kernel [1], which would be a suprise, but worth checking. On my virtual machine with a bit old Debian installation the minimal supported kernel for gparted is "2.6.26" which is quite close to N900's version...

By the way, while looking for glibc, libstdc++ and kernel combination bugs, I found interesting info - Maemo's default gcc's (4.2.1) libstdc++ (6.0.9) which is present on N900s has one known binary incomatibility with all older and newer versions - see [2] and relevant gcc bug report [3]. It's marked as fixed - I wonder if "our" 6.0.9 and gcc have this fix included by some patch or all "our" binaries are abi-incompatible with all other gcc/libstdc++ version That would make me a sad panda.

Edit: I also wonder what "--enable-kernel=2.X.Y" was passed when glibc was being compiled. Anyone know how to check that, so Sulu could do that?

Edit2: I found out that GNU C Library 2.17 is compatible with kernels 2.6.16 upwards [4] while GNU C Library 2.18 doesn't even state that info in annoucement [5]...

[1] http://stackoverflow.com/questions/6...active#tab-top
[2] http://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html search for "GCC 4.2.1: libstdc++.so.6.0.9" and read further note
[3] http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33678
[4] https://sourceware.org/ml/libc-annou.../msg00001.html
[5] https://sourceware.org/ml/libc-alpha.../msg00160.html

Last edited by misiak; 2014-01-05 at 15:08.
 

The Following 3 Users Say Thank You to misiak For This Useful Post:
Posts: 915 | Thanked: 3,209 times | Joined on Jan 2011 @ Germany
#3052
Originally Posted by misiak View Post
What does the "file /usr/sbin/gpartedbin" say (could you post the output)?
from the armhf image:
Code:
# file /usr/sbin/gpartedbin
/usr/sbin/gpartedbin: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.26, BuildID[sha1]=0x6b53240fd4b63aa95583556d7b4fa2ac9d200ae9, stripped
Sorry, I lack the concentration right now to do any actual thinking. I'll get back to your post later.
 

The Following 3 Users Say Thank You to sulu For This Useful Post:
Posts: 915 | Thanked: 3,209 times | Joined on Jan 2011 @ Germany
#3053
Here's the first attempt of a Wheezy/armhf image:
http://netload.in/dateiKJ3z5OMsGg/ea..._armhf.tar.htm

Besides the image itself the archive also includes all of my recompiled pulseaudio packages (most of them should never be necessary) and afaik all the custom binaries and scripts that are still present in qole-based Easy Debian images.

edit:
the user's pasword (for sudo) is: user
the root password (for su) is: root

Here's a preliminary draft of a how-to to reproduce how I've created this image:
# create 2GB image file (adjust size if desired)
dd if=/dev/zero of=/path/to/image_file bs=1M count=2048

# format image file with ext2 (or ext3 etc.)
mkfs.ext2 /path/to/image_file

# mount image
mount -o loop /path/to/image_file /mountpoint

# install base system (if you ommit --arch debootstrap will use the host's architecture, armel on an N900, armhf on a Cubieboard2; chose the Debian mirror closest to your location [1])
debootstrap --arch=armhf wheezy /mountpoint http://ftp.de.debian.org/debian

# copy /etc/apt sources.list and /etc/apt/apt.conf (I don't want suggests and recommends [2]) from host system
cp /etc/apt/sources.list /mountpoint/etc/apt/
cp /etc/apt/apt.conf /mountpoint/etc/apt/

# In the image /var/run is a symlink to /run. For pulseaudio and dbus to work we need this to be swapped (the missing /mountpoint in the last line is not a typo)
rm -rf /mountpoint/var/run
mkdir /mountpoint/var/run
rm -rf /mountpoint/run
ln -s /var/run /mountpoint/run

# we also need directories for pulse and dbus in /var/run
mkdir /mountpoint/var/pulse
mkdir /mountpoint/var/dbus

# replace standard keyboard layout in the chroot with N900 keyboard (assuming you are already on the N900)
rm -rf /mountpoint/usr/share/X11/xkb/*
cp -r /usr/share/X11/xkb/* /mountpoint/usr/share/X11/xkb/

# chroot into image (everything after this step will happen in the chroot unless indicated otherwise)
mount -o bind /proc /mountpoint/proc
mount -o bind /sys /mountpoint/sys
mount -o bind /dev/pts /mountpoint/dev/pts
chroot /mountpoint

# update apt and install additional required packages (add any packages you like)
apt-get update
apt-get install locales lxde-core dbus-x11 roxterm-gtk2 lxde-icon-theme xserver-xephyr bash-completion sudo libgtkstylus pulseaudio

# fix this locales warning we just received (adjust the locale if you wish; info from here [3])
export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
locale-gen en_US.UTF-8
dpkg-reconfigure locales

# replace Debian's pulseaudio packages with recompiled ones, either from the provided archive or your own ones (see [4])
dpkg -i pulseaudio_2.0-6.1_armhf.deb libpulse0_2.0-6.1_armhf.deb

# make sure they won't be overwritten by future Debian updates (note: if you use synaptic you have to hold them there as well because synaptic doesn't care for what dpkg says)
echo pulseaudio hold |dpkg --set-selections
echo libpulse0:armhf hold |dpkg --set-selections

# also hold xkb-data (this is where the keyboard layout comes from)
echo xkb-data hold |dpkg --set-selections

# you'll need these binaries for keyboard focus in the chroot (take them from the provided archive, an existing image you have, or compile them on your own; sources are here [5][6])
/sbin/qobi-wmhint-fix
/usr/bin/set-focus

# if you use the provided armel binaries on a armhf image you'll need this symlink (see [7])
ln -s /lib/ld-linux-armhf.so.3 /lib/ld-linux.so.3

# additionally you'll need a script that starts lxde on $DISPLAY :1 (again, take it from the archive or an old image)
/usr/bin/startlxde1
# for an unknown reason I had to add export GTK_MODULES=libgtkstylus.so here although it's supposed to be set in debbie-sue on the host; both versions are in the archive; I believe the rest of the scripts aren't necessary anymore, but I included them nevertheless in the archive
[1] http://debgen.simplylinux.ch/
[2] http://linux.koolsolutions.com/2009/...-debian-linux/
[3] http://talk.maemo.org/showpost.php?p...6&postcount=34
[4] http://www.thomas-krenn.com/de/wiki/...d_unter_Debian
[5] http://talk.maemo.org/showpost.php?p...4&postcount=23
[6] http://talk.maemo.org/showpost.php?p=425218&postcount=7
[7] http://talk.maemo.org/showpost.php?p...postcount=3040

Last edited by sulu; 2014-01-05 at 16:07. Reason: added acount passwords
 

The Following 6 Users Say Thank You to sulu For This Useful Post:
Estel's Avatar
Posts: 5,028 | Thanked: 8,613 times | Joined on Mar 2011
#3054
Originally Posted by misiak View Post
By the way, while looking for glibc, libstdc++ and kernel combination bugs, I found interesting info - Maemo's default gcc's (4.2.1) libstdc++ (6.0.9) which is present on N900s has one known binary incomatibility with all older and newer versions - see [2] and relevant gcc bug report [3]. It's marked as fixed - I wonder if "our" 6.0.9 and gcc have this fix included by some patch or all "our" binaries are abi-incompatible with all other gcc/libstdc++ version That would make me a sad panda.

[1] http://stackoverflow.com/questions/6...active#tab-top
[2] http://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html search for "GCC 4.2.1: libstdc++.so.6.0.9" and read further note
[3] http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33678
[4] https://sourceware.org/ml/libc-annou.../msg00001.html
[5] https://sourceware.org/ml/libc-alpha.../msg00160.html
misiak, could you forward those findings to CSSU guys, and/or guy working on glibc updates for maemo (Aapo, IIRC)? I think it may be interesting outside ED, too.

Nice research, BTW!

/Estel
__________________
N900's aluminum backcover / body replacement
-
N900's HDMI-Out
-
Camera cover MOD
-
Measure battery's real capacity on-device
-
TrueCrypt 7.1 | ereswap | bnf
-
Hardware's mods research is costly. To support my work, please consider donating. Thank You!
 

The Following 3 Users Say Thank You to Estel For This Useful Post:
Posts: 915 | Thanked: 3,209 times | Joined on Jan 2011 @ Germany
#3055
Originally Posted by misiak View Post
Edit: I also wonder what "--enable-kernel=2.X.Y" was passed when glibc was being compiled. Anyone know how to check that, so Sulu could do that?
I'm not sure, but I guess one of these kernel version numbers I've encountered during my Jessie tests in the Debian package source configuration [1] should take care of that:
Code:
debian/sysdeps/linux.mk:MIN_KERNEL_SUPPORTED := 2.6.32
debian/debhelper.in/libc.preinst:        if linux_compare_versions "$kernel_ver" lt 2.6.32
ports/sysdeps/unix/sysv/linux/tile/configure.in:arch_minimum_kernel=2.6.32
ports/sysdeps/unix/sysv/linux/tile/configure:arch_minimum_kernel=2.6.32
I think I remember that in the Wheezy source I haven't seen any check above 2.6.26 but my memory might be wrong and I was probably not as thorough as I was for Jessie.
I'll check that again when I have the time.

Originally Posted by misiak View Post
Edit2: I found out that GNU C Library 2.17 is compatible with kernels 2.6.16 upwards [4] while GNU C Library 2.18 doesn't even state that info in annoucement [5]...
That reminds me of what I've read in the Debian changelogs. [2]


[1] http://talk.maemo.org/showpost.php?p...postcount=3030
[2] http://ftp-master.metadata.debian.or...7-97_changelog
 

The Following 2 Users Say Thank You to sulu For This Useful Post:
Posts: 915 | Thanked: 3,209 times | Joined on Jan 2011 @ Germany
#3056
Here's a summary of kernel version mentions in Debian's eglibc source package [1]:

A full egrep output is attached.
This is what remains if all kernel versions <=2.6.28 and all lines explicitely only valid for other architectures are eliminated:
Code:
ChangeLog.17:	O_DSYNC to match 2.6.33+ kernels.
ChangeLog.17:	headers up to 2.6.30.
ChangeLog.17:	architectures have preadv/pwritev in 2.6.30.
ChangeLog.17:	have preadv/pwritev in 2.6.30.
ChangeLog.17:	preadv/pwritev in 2.6.30.
ChangeLog.17:	* version.h (VERSION): Set to 2.6.90.
debian/debhelper.in/libc.preinst:        # 2.6.32 kernel is needed.
debian/debhelper.in/libc.preinst:            vmin=2.6.32
ports/sysdeps/unix/sysv/linux/arm/kernel-features.h:/* Support for pselect6, ppoll and epoll_pwait was added in 2.6.32.  */
ports/ChangeLog.arm:	O_DSYNC to match 2.6.33+ kernels.
ports/ChangeLog.arm:	__ASSUME_PPOLL): Don't undefine for kernel 2.6.32 and later.
sysdeps/unix/sysv/linux/sys/timex.h:/* These definitions from linux/timex.h as of 2.6.30.  */
sysdeps/unix/sysv/linux/kernel-features.h:/* Support for the FUTEX_CLOCK_REALTIME flag was added in 2.6.29.  */
sysdeps/unix/sysv/linux/kernel-features.h:/* Support for the AT_RANDOM auxiliary vector entry was added in 2.6.29.  */
sysdeps/unix/sysv/linux/kernel-features.h:/* Support for preadv and pwritev was added in 2.6.30.  */
sysdeps/unix/sysv/linux/kernel-features.h:/* Support for F_GETOWN_EX was introduced in 2.6.32.  */
sysdeps/unix/sysv/linux/kernel-features.h:/* Support for the recvmmsg syscall was added in 2.6.33.  */
sysdeps/unix/sysv/linux/kernel-features.h:/* statfs fills in f_flags since 2.6.36.  */
sysdeps/unix/sysv/linux/kernel-features.h:/* prlimit64 is available in 2.6.36.  */
And short contextual excerpts:

ChangeLog.17
Code:
2009-12-11  Ulrich Drepper  <drepper@redhat.com>

        * sysdeps/unix/sysv/linux/sh/bits/fcntl.h: Redefine O_SYNC and
        O_DSYNC to match 2.6.33+ kernels.
        * sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h: Likewise.
        * sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h: Likewise.
        * sysdeps/unix/sysv/linux/sparc/bits/fcntl.h: Likewise.
        * sysdeps/unix/sysv/linux/ia64/bits/fcntl.h: Likewise.
        * sysdeps/unix/sysv/linux/i386/bits/fcntl.h: Likewise.
        * sysdeps/unix/sysv/linux/s390/bits/fcntl.h: Likewise.
[..]
2009-04-20  Ulrich Drepper  <drepper@redhat.com>

        [BZ #10086]
        * sysdeps/unix/sysv/linux/sys/timex.h: Add definitions from kernel
        headers up to 2.6.30.

        * po/ca.po: Update from translation team.
[..]
2009-04-17  Ulrich Drepper  <drepper@redhat.com>

        * malloc/malloc.c (malloc_info): Also output system memory information.

        * sysdeps/unix/sysv/linux/kernel-features.h: All supported
        architectures have preadv/pwritev in 2.6.30.

        * sysdeps/posix/preadv.c: Reading of zero bytes is no error.
        * sysdeps/posix/readv.c: Likewise.
        Reported by Markus Armbruster <armbru@redhat.com>.

        * malloc/hooks.c (top_check): Force hook value into register.
[..]
2009-04-09  Ulrich Drepper  <drepper@redhat.com>

        * sysdeps/x86_64/rawmemchr.S: New file.

        * stdio-common/vfprintf.c (vfprintf): Slightly more compact code.
        Simplified code and possible copy problem fixed.

        * sysdeps/unix/sysv/linux/preadv.c: Avoid prototype for static
        function if it is not defined.  Add some necessary casts.
        * sysdeps/unix/sysv/linux/pwritev.c: Likewise.

        * sysdeps/unix/sysv/linux/kernel-features.h: SPARC and IA64 also
        have preadv/pwritev in 2.6.30.
[..]
2007-05-17  Ulrich Drepper  <drepper@redhat.com>

        Dummy files to prevent stub versions from being used.
        * sysdeps/x86_64/fpu/k_cosl.c: New file.
        * sysdeps/x86_64/fpu/k_rem_pio2l.c: New file.
        * sysdeps/x86_64/fpu/k_sinl.c: New file.
        * sysdeps/x86_64/fpu/k_tanl.c: New file.

        * version.h (VERSION): Set to 2.6.90.
ports/sysdeps/unix/sysv/linux/arm/kernel-features.h
Code:
/* Support for pselect6, ppoll and epoll_pwait was added in 2.6.32.  */
#if __LINUX_KERNEL_VERSION < 0x020620
# undef __ASSUME_PSELECT
# undef __ASSUME_PPOLL
#endif
debian/debhelper.in/libc.preinst
Code:
        # The GNU libc requires a >= 2.6.26 kernel, except on m68k where a
        # 2.6.32 kernel is needed.
        if [ "$realarch" != m68k ]
        then
            vmin=2.6.26
        else
            vmin=2.6.32
        fi
        if linux_compare_versions "$kernel_ver" lt ${vmin}
        then
            echo WARNING: this version of the GNU libc requires kernel version
            echo ${vmin} or later.  Please upgrade your kernel before installing
            echo glibc.
            kernel26_help

            exit 1
        fi
ports/ChangeLog.arm
Code:
2009-12-15  Joseph Myers  <joseph@codesourcery.com>

        * sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Redefine O_SYNC and
        O_DSYNC to match 2.6.33+ kernels.
[..]
2009-11-19  Joseph Myers  <joseph@codesourcery.com>

        * sysdeps/unix/sysv/linux/arm/kernel-features.h (__ASSUME_PSELECT,
        __ASSUME_PPOLL): Don't undefine for kernel 2.6.32 and later.
sysdeps/unix/sysv/linux/kernel-features.h
Code:
/* Support for the FUTEX_CLOCK_REALTIME flag was added in 2.6.29.  */
#if __LINUX_KERNEL_VERSION >= 0x02061d
# define __ASSUME_FUTEX_CLOCK_REALTIME  1
#endif

/* Support for the AT_RANDOM auxiliary vector entry was added in 2.6.29.  */
#if __LINUX_KERNEL_VERSION >= 0x02061d
# define __ASSUME_AT_RANDOM     1
#endif

/* Support for preadv and pwritev was added in 2.6.30.  */
#if __LINUX_KERNEL_VERSION >= 0x02061e
# define __ASSUME_PREADV        1
# define __ASSUME_PWRITEV       1
#endif

/* Support for F_GETOWN_EX was introduced in 2.6.32.  */
#if __LINUX_KERNEL_VERSION >= 0x020620
# define __ASSUME_F_GETOWN_EX   1
#endif

/* Support for the recvmmsg syscall was added in 2.6.33.  */
#if __LINUX_KERNEL_VERSION >= 0x020621
# define __ASSUME_RECVMMSG      1
#endif

/* statfs fills in f_flags since 2.6.36.  */
#if __LINUX_KERNEL_VERSION >= 0x020624
# define __ASSUME_STATFS_F_FLAGS        1
#endif

/* prlimit64 is available in 2.6.36.  */
#if __LINUX_KERNEL_VERSION >= 0x020624
# define __ASSUME_PRLIMIT64     1
#endif
sysdeps/unix/sysv/linux/sys/timex.h has only the comment from the egrep output and the rest of the code seems either totally irrelevant or totally relevant to me, so I'll attach the whole file.

Maybe someone can gather any insight from this.


[1] http://packages.debian.org/source/wheezy/eglibc
Attached Files
File Type: txt egrep.txt (9.8 KB, 120 views)
File Type: txt timex.h.txt (5.5 KB, 88 views)

Last edited by sulu; 2014-01-06 at 18:28. Reason: the note was nonsense
 

The Following 3 Users Say Thank You to sulu For This Useful Post:
Posts: 3,328 | Thanked: 4,476 times | Joined on May 2011 @ Poland
#3057
And what is the maximal version the Fremantle kernel could be (theoretically upgraded)?
__________________
If you want to support my work, you can donate by PayPal or Flattr

Projects no longer actively developed: here
 
Posts: 915 | Thanked: 3,209 times | Joined on Jan 2011 @ Germany
#3058
As far a I understand you can't go beyond 2.6.28 (which is why KP still is 2.6.28, although heavily tweaked) because some of the non-free components (drivers, probably apps) would cease to work.

The Linux kernel infrastructure (modules) is highly version dependent. Have a look at /lib/modules and you'll see that there is a directory for every kernel!
Linux experiences frequent ABI changes, which means to be on the safe side you'll have to recompile all your kernel modules for every new minor revision (3rd number in 2.x kernels).
For that of course you need the code of these modules. Unfortunately we don't have this code for all the modules in the Maemo kernel, which means we can't move on.

This is why it's so important for the Neo900 to be as free (libre) as possible and identifying (easy) and replacing (hard?) non-free components is an important task for FPTF. In fact being able to use a newer kernel (3.x) is one of their main goals.
 

The Following 3 Users Say Thank You to sulu For This Useful Post:
Posts: 3,328 | Thanked: 4,476 times | Joined on May 2011 @ Poland
#3059
Hmm... And did anyone try whether 2.6.32 works? I know that type of situation from the meecolay development. Everybody said - it won't work soft vs hard float but some of the apps worked even though. Maybe the ABI changes are not so big...

Or maybe it would be possible to use an analogical approach as with LD_PRELOAD?

But, we're not m68k, so we don't need the newer kernel, do we?
__________________
If you want to support my work, you can donate by PayPal or Flattr

Projects no longer actively developed: here
 

The Following User Says Thank You to marmistrz For This Useful Post:
FlashInTheNight86's Avatar
Posts: 138 | Thanked: 185 times | Joined on Feb 2014
#3060
306 pages is bloody long and the first page hasn't been updated for ages, so I'll ask a (stupid) newbie question.

I want to use EasyDebian when my N900 is working as a desktop (i.e. with external keyboard, mouse, TV as a monitor, ntfs hdd for additional storage). The main goal is to use OpenOffice, but it would also be nice to use IceWeasel or something else for browsing. The device will most likely be overclocked to 900MHz during that kind of operation.

Which image should I download from http://qole.org/files/ to suit my needs best? Any recommendations on Easy-Debian package version itself?
 

The Following 3 Users Say Thank You to FlashInTheNight86 For This Useful Post:
Reply

Tags
beta, debian, easy debian, extras-devel, fremantle, i <3 qole, squeeze


 
Forum Jump


All times are GMT. The time now is 17:44.