dpkg-buildpackage fails for linux-ti-omap4_ti-ubuntu-3.4-1486

Asked by Srix

I am trying to cross-compile ti-ubuntu-3.4-1486 based on the documentation provided at http://www.omappedia.com/wiki/Ubuntu_kernel_for_OMAP4 . The host platform is Ubuntu server 12.04, 3.2.0-32-generic kernel. This is the command I used.

$ fakeroot debian/rules clean
$ do_tools=false skipabi=true skipmodule=true dpkg-buildpackage -B -aarmhf -uc -us

It appears that compilation succeeds but building the deb package fails with the following message

#
# Remove files which are generated at installation by postinst,
# except for modules.order and modules.builtin
#
# NOTE: need to keep this list in sync with postrm
#
mkdir /home/srix/newbuilddir/kernel-ubuntu/debian/linux-image-3.4.0-1486-omap4/lib/modules/3.4.0-1486-omap4/_
mv /home/srix/newbuilddir/kernel-ubuntu/debian/linux-image-3.4.0-1486-omap4/lib/modules/3.4.0-1486-omap4/modules.order \
  /home/srix/newbuilddir/kernel-ubuntu/debian/linux-image-3.4.0-1486-omap4/lib/modules/3.4.0-1486-omap4/_
if [ -f /home/srix/newbuilddir/kernel-ubuntu/debian/linux-image-3.4.0-1486-omap4/lib/modules/3.4.0-1486-omap4/modules.builtin ] ; then \
     mv /home/srix/newbuilddir/kernel-ubuntu/debian/linux-image-3.4.0-1486-omap4/lib/modules/3.4.0-1486-omap4/modules.builtin \
  /home/srix/newbuilddir/kernel-ubuntu/debian/linux-image-3.4.0-1486-omap4/lib/modules/3.4.0-1486-omap4/_; \
 fi
rm -f /home/srix/newbuilddir/kernel-ubuntu/debian/linux-image-3.4.0-1486-omap4/lib/modules/3.4.0-1486-omap4/modules.*
mv /home/srix/newbuilddir/kernel-ubuntu/debian/linux-image-3.4.0-1486-omap4/lib/modules/3.4.0-1486-omap4/_/* \
  /home/srix/newbuilddir/kernel-ubuntu/debian/linux-image-3.4.0-1486-omap4/lib/modules/3.4.0-1486-omap4
rmdir /home/srix/newbuilddir/kernel-ubuntu/debian/linux-image-3.4.0-1486-omap4/lib/modules/3.4.0-1486-omap4/_
# Time for dirty temporary hack:
ln -s ../../drivers/staging/omapdrm/omap_drv.h /home/srix/newbuilddir/kernel-ubuntu/debian/linux-headers-3.4.0-1486-omap4/usr/src/linux-headers-3.4.0-1486-omap4/include/linux/omap_drv.h
ln: failed to create symbolic link `/home/srix/newbuilddir/kernel-ubuntu/debian/linux-headers-3.4.0-1486-omap4/usr/src/linux-headers-3.4.0-1486-omap4/include/linux/omap_drv.h': File exists
make: *** [install-omap4] Error 1
dpkg-buildpackage: error: fakeroot debian/rules binary-arch gave error exit status 2

I tried to compile the ti-ubuntu-3.4-1487 branch but the same result. How to fix this?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu linux-ti-omap Edit question
Assignee:
No assignee Edit question
Solved by:
Srix
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#2

sudo apt-get install kernel-image-3.4.0-1486-omap4

After adding the PPA (May need a package search)

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3
Revision history for this message
Srix (codeporukki) said :
#4

Thank you andrew-woodhead666. But I have made some changes in the kernel module and some header files. So I need to compile them from source code. So I thought first I will try compiling the vanilla source code and then add my changes and compile later. I believe the compilation was successful, but while building the deb package the above error appears.

Revision history for this message
Srix (codeporukki) said :
#5

Ok here is the fix

fix:
edit debian/rules.d/2-binary-arch.mk and change
# Time for dirty temporary hack:
ln -s ../../drivers/staging/omapdrm/omap_drv.h $(hdrdir)/include/linux/omap_drv.h
ln -s ../../drivers/staging/omapdrm/omap_drm.h $(hdrdir)/include/linux/omap_drm.h

to
# Time for dirty temporary hack:
ln -f -s ../../drivers/staging/omapdrm/omap_drv.h $(hdrdir)/include/linux/omap_drv.h
ln -f -s ../../drivers/staging/omapdrm/omap_drm.h $(hdrdir)/include/linux/omap_drm.h