ubuntu module compilation for lpia when on hardy host and custom kernel

Stefan Bader stefan.bader at canonical.com
Thu Oct 30 20:54:37 UTC 2008


Afzal, Naeem M wrote:
> Hi Guys,
> 
> I am having problem in figuring out how I can compile linux modules for a customer kernel (2.6.24-19-lpia). This is what I have done:
> 
> 1. apt-get sources linux-image-2.6.24
> 2. cd /some/path/to/kernel/linux-2.6.24
> 3. modified config.lpia for options that need
> 4. dpkg-buildpackage -rfakroot -b -alpia
>  I get all the deb packages
> 
> Now I want to use linux-modules-2.6.24-2.6.24 to compile against this kernel. I am not able to figure out how to point it my kernel which is not being installed on the host(Hardy 2.6.24-21-generic) I am building on.
> 
> 5. I downloaded sources for ubuntu-modules
> 6. cd /some/other/patch/to/modules/linux-ubuntu-modules-2.6.24-2.6.24
> 7. copyover same config.lpia from kernel to debian/configs/lpia
> 7. ran same command "dpkg-buildpackage -rfakroot -b -alpia"  in modules directory
> 
> It is failing like for linux-ubuntu-modules as, any help is greatly appreciated
> 
> Regards
> Naeem
> 
> cd /some/other/patch/to/modules/linux-ubuntu-modules-2.6.24-2.6.24
> dpkg-buildpackage -rfakeroot -b -alpia
> 
> dpkg-buildpackage: set CPPFLAGS to default value:
> dpkg-buildpackage: set CFLAGS to default value: -g -O2
> dpkg-buildpackage: set CXXFLAGS to default value: -g -O2
> dpkg-buildpackage: set FFLAGS to default value: -g -O2
> dpkg-buildpackage: set LDFLAGS to default value: -Wl,-Bsymbolic-functions
> dpkg-buildpackage: source package linux-ubuntu-modules-2.6.24
> dpkg-buildpackage: source version 2.6.24-21.32
> dpkg-buildpackage: source changed by Stefan Bader <stefan.bader at canonical.com>
> dpkg-architecture: warning: Specified GNU system type i686-linux-gnulp does not match gcc system type i486-linux-gnu.
> dpkg-buildpackage: host architecture lpia
>  fakeroot debian/rules clean
> dh_testdir
> dh_testroot
> dh_clean
> rm -rf /home/linux-ubuntu-modules/linux-ubuntu-modules-2.6.24-2.6.24/debian/d-i-lpia
> rm -rf /home/linux-ubuntu-modules/linux-ubuntu-modules-2.6.24-2.6.24/debian/build
> rm -f /home/linux-ubuntu-modules/linux-ubuntu-modules-2.6.24-2.6.24/debian/stamps/stamp-*
> rm -rf debian/*-di debian/linux-ubuntu-modules*
> # This gets rid of the d-i packages in control
> cp -f debian/control.stub debian/control
>  debian/rules build
> Preparing lpia...
> install -d /home/linux-ubuntu-modules/linux-ubuntu-modules-2.6.24-2.6.24/debian/build/build-lpia
> cd ubuntu; find . | cpio -dumpl /home/linux-ubuntu-modules/linux-ubuntu-modules-2.6.24-2.6.24/debian/build/build-lpia
> 0 blocks
> cat /home/linux-ubuntu-modules/linux-ubuntu-modules-2.6.24-2.6.24/debian/config/lpia > /home/linux-ubuntu-modules/linux-ubuntu-modules-2.6.24-2.6.24/debian/build/build-lpia/.config
> # XXX: generate real config
> touch /home/linux-ubuntu-modules/linux-ubuntu-modules-2.6.24-2.6.24/debian/build/build-lpia/ubuntu-config.h
> touch /home/linux-ubuntu-modules/linux-ubuntu-modules-2.6.24-2.6.24/debian/build/build-lpia/ubuntu-build
> echo filtered target_flavour
> filtered target_flavour
> if [ -z "" ] && grep 'CONFIG_ALSA=m' /home/linux-ubuntu-modules/linux-ubuntu-modules-2.6.24-2.6.24/debian/build/build-lpia/.config > /dev/null ; then \
>           cd /home/linux-ubuntu-modules/linux-ubuntu-modules-2.6.24-2.6.24/debian/build/build-lpia/sound/alsa-driver && make SND_TOPDIR=`pwd` all-deps; \
>           cd /home/linux-ubuntu-modules/linux-ubuntu-modules-2.6.24-2.6.24/debian/build/build-lpia/sound/alsa-driver && aclocal && autoconf; \
>           cd /home/linux-ubuntu-modules/linux-ubuntu-modules-2.6.24-2.6.24/debian/build/build-lpia/sound/alsa-driver && ./configure --with-kernel=/lib/modules/2.6.24-21-lpia/build; \
>           sed -i 's/CONFIG_SND_S3C2412_SOC_I2S=m/CONFIG_SND_S3C2412_SOC_I2S=/' /home/linux-ubuntu-modules/linux-ubuntu-modules-2.6.24-2.6.24/debian/build/build-lpia/sound/alsa-driver/toplevel.config; \
>           cd /home/linux-ubuntu-modules/linux-ubuntu-modules-2.6.24-2.6.24/debian/build/build-lpia/sound/alsa-driver && make SND_TOPDIR=`pwd` dep; \
>         fi
> touch /home/linux-ubuntu-modules/linux-ubuntu-modules-2.6.24-2.6.24/debian/stamps/stamp-prepare-lpia
> Building lpia...
> make -C /lib/modules/2.6.24-21-lpia/build ARCH=i386 M=/home/linux-ubuntu-modules/linux-ubuntu-modules-2.6.24-2.6.24/debian/build/build-lpia UBUNTU_FLAVOUR=lpia -j4 modules
> make: *** /lib/modules/2.6.24-21-lpia/build: No such file or directory.  Stop.
> make: *** [/home/linux-ubuntu-modules/linux-ubuntu-modules-2.6.24-2.6.24/debian/stamps/stamp-build-lpia] Error 2
> dpkg-buildpackage: failure: debian/rules build gave error exit status 2
> 
I am not sure how this gets passed to dpkg-buildpackage. I usually do a
fakeroot debian/rules KDIR=<dir of headers> binary

Stefan

-- 

When all other means of communication fail, try words!






More information about the kernel-team mailing list