[maemo-developers] [maemo-developers] building an application with custom kernel-headers

From: Yves-Alexis Perez corsac at corsac.net
Date: Tue Oct 17 17:23:11 EEST 2006
Hi list,

I run into probleme trying to build an application which requires custom
kernel headers on scratchbox ( using maemo rootstrap 2.0, cpu
transparency via qemu-arm.

I've built a patched kernel (which boots fine on the device), following
the Howto Kernel Compilation found on Maemo wiki. I've installed
su-18-kernel-headers too, and those headers are located
in /usr/src/su-18-kernel-headers/include in the scratchbox root.

I've checked that these headers have the correct files, with correct

The configure script tries to build a sample c file with a test on a
#define'd variable which exists in the custom headers files (and not in
the vanilla ones), and fails.

I tried with the sample c file by hand, using:

gcc -c -Wall -g -O2 -isystem /usr/src/su-18-kernel-headers/include

conftest.c contains:
#include <linux/rtnetlink.h>

main ()
  char *p = (char *) IFA_F_HOMEADDRESS;

  return 0;

[sbox-fitz: ~] > grep
IFA_F_HOMEADDRESS /usr/src/su-18-kernel-headers/include/linux/rtnetlink.h
#define IFA_F_HOMEADDRESS       0x10

I guess gcc doesn't use correct kernel headers due to cross compilation,
but have not clue how to fix this.

If anybody can help me on this, it would be really nice. 

Thanks & regards,
Yves-Alexis Perez

More information about the maemo-developers mailing list