This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How to compile updated kernel modules for use with EZSDK for DM816x v5.05.01.04 ?

My goal is to add multi-touch support to the TI EZSDK for the DM816x v5.05.01.04.   I used the article below to successfully build, install, and test native x86 drivers for Ubuntu 11.04. 

Ubuntu-specific multitouch howtos

ubuntu-multitouch/drivers/hid/hid-multitouch.ko

Now I am trying to do the same and cross compile for the ARM under Ubuntu 10.04 LTS and TI EZSDK for the DM816x v5.05.01.04. The make is building object files but not building the kernel object files

Here is What I have Done:

Git the updated multi-touch source code for /drivers/hid:

git clone git://git.lii-enac.fr/linux-input/ubuntu-multitouch
cd ubuntu-multitouch
git checkout hid-multitouch-ubuntu-11.04

File: ubuntu-multitouch/Makefile

all: drivers/hid/hid-multitouch.ko

drivers/hid/hid-multitouch.ko: drivers/hid/hid-multitouch.c
	/bin/bash compile.sh

clean:
	/bin/bash compile.sh clean

install: drivers/hid/hid-multitouch.ko
	/bin/bash install.sh

uninstall:
	/bin/bash restore.sh

File: ubuntu-multitouch/compile.sh

#!/bin/bash
WORKING_DIR=$(pwd)
make -C ${EZSDK}/board-support/linux-2.6.37-psp04.04.00.01/ M=${WORKING_DIR}/drivers/hid $@

Make

/ubuntu-multitouch> make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm 
/bin/bash compile.sh
make[1]: Entering directory `/home/z3/ti-ezsdk_dm816x-evm_5_05_01_04/board-support/linux-2.6.37-psp04.04.00.01'
  CC      /home/z3/projects/Boeing_SDU/sandbox/hid-multitouch-kmodule/ubuntu-multitouch/drivers/hid/hid-lg.o
  CC      /home/z3/projects/Boeing_SDU/sandbox/hid-multitouch-kmodule/ubuntu-multitouch/drivers/hid/hid-debug.o
  CC      /home/z3/projects/Boeing_SDU/sandbox/hid-multitouch-kmodule/ubuntu-multitouch/drivers/hid/hid-core.o
  CC      /home/z3/projects/Boeing_SDU/sandbox/hid-multitouch-kmodule/ubuntu-multitouch/drivers/hid/hid-input.o
  LD      /home/z3/projects/Boeing_SDU/sandbox/hid-multitouch-kmodule/ubuntu-multitouch/drivers/hid/hid.o
  CC      /home/z3/projects/Boeing_SDU/sandbox/hid-multitouch-kmodule/ubuntu-multitouch/drivers/hid/hid-a4tech.o
  CC      /home/z3/projects/Boeing_SDU/sandbox/hid-multitouch-kmodule/ubuntu-multitouch/drivers/hid/hid-apple.o
  CC      /home/z3/projects/Boeing_SDU/sandbox/hid-multitouch-kmodule/ubuntu-multitouch/drivers/hid/hid-belkin.o
  CC      /home/z3/projects/Boeing_SDU/sandbox/hid-multitouch-kmodule/ubuntu-multitouch/drivers/hid/hid-cherry.o
  CC      /home/z3/projects/Boeing_SDU/sandbox/hid-multitouch-kmodule/ubuntu-multitouch/drivers/hid/hid-chicony.o
  CC      /home/z3/projects/Boeing_SDU/sandbox/hid-multitouch-kmodule/ubuntu-multitouch/drivers/hid/hid-cypress.o
  CC      /home/z3/projects/Boeing_SDU/sandbox/hid-multitouch-kmodule/ubuntu-multitouch/drivers/hid/hid-ezkey.o
  CC      /home/z3/projects/Boeing_SDU/sandbox/hid-multitouch-kmodule/ubuntu-multitouch/drivers/hid/hid-kensington.o
  CC      /home/z3/projects/Boeing_SDU/sandbox/hid-multitouch-kmodule/ubuntu-multitouch/drivers/hid/hid-kye.o
  LD      /home/z3/projects/Boeing_SDU/sandbox/hid-multitouch-kmodule/ubuntu-multitouch/drivers/hid/hid-logitech.o
  CC      /home/z3/projects/Boeing_SDU/sandbox/hid-multitouch-kmodule/ubuntu-multitouch/drivers/hid/hid-microsoft.o
  CC      /home/z3/projects/Boeing_SDU/sandbox/hid-multitouch-kmodule/ubuntu-multitouch/drivers/hid/hid-monterey.o
  CC      /home/z3/projects/Boeing_SDU/sandbox/hid-multitouch-kmodule/ubuntu-multitouch/drivers/hid/usbhid/hid-core.o
  CC      /home/z3/projects/Boeing_SDU/sandbox/hid-multitouch-kmodule/ubuntu-multitouch/drivers/hid/usbhid/hid-quirks.o
  LD      /home/z3/projects/Boeing_SDU/sandbox/hid-multitouch-kmodule/ubuntu-multitouch/drivers/hid/usbhid/usbhid.o
  LD      /home/z3/projects/Boeing_SDU/sandbox/hid-multitouch-kmodule/ubuntu-multitouch/drivers/hid/usbhid/built-in.o
  LD      /home/z3/projects/Boeing_SDU/sandbox/hid-multitouch-kmodule/ubuntu-multitouch/drivers/hid/built-in.o
  Building modules, stage 2.
  MODPOST 0 modules
make[1]: Leaving directory `/home/z3/ti-ezsdk_dm816x-evm_5_05_01_04/board-support/linux-2.6.37-psp04.04.00.01'

I tried appending "modules" near the end compile.sh make statement but still no kernel modules.

Is there a better approach for doing this sort of thing? 

-Ed


  • I think I have a more fundamental problem of trying to add a kernel module from a newer kernel into an older version.  After creating a new Makefile from scratch:

    make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm 
    make -C /home/z3/ti-ezsdk_dm816x-evm_5_05_01_04/board-support/linux-2.6.37-psp04.04.00.01/ M=/home/z3/projects/Boeing_SDU/sandbox/hid-multitouch-kmodule/ubuntu-multitouch  modules
    make[1]: Entering directory `/home/z3/ti-ezsdk_dm816x-evm_5_05_01_04/board-support/linux-2.6.37-psp04.04.00.01'
      CC [M]  /home/z3/projects/Boeing_SDU/sandbox/hid-multitouch-kmodule/ubuntu-multitouch/drivers/hid/hid-multitouch.o
    /sandbox/hid-multitouch-kmodule/ubuntu-multitouch/drivers/hid/hid-multitouch.c:34:28: error: linux/input/mt.h: No such file or directory

    The header file for /board-support/linux-2.6.37-psp04.04.00.01/ linux/input/mt.h did not exist back in kernel version 2.6.37.

    File: Makefile

    obj-m += drivers/hid/hid-multitouch.o
    
    all:
    	make -C ${EZSDK}/board-support/linux-2.6.37-psp04.04.00.01/ M=$(PWD)  modules
    
    clean:
    	make -C ${EZSDK}/board-support/linux-2.6.37-psp04.04.00.01/ M=$(PWD)  clean
    
    
    
    I think I am stumped at this point.
    -Ed
  • Never mind, I solved it.  However I can see how you could get into some real difficulties quickly attempting to pull in later kernel updates into your older kernel.  Especially when using my primitive newbie techniques.  It is becoming clear that I need to learn the ways of making diffs and patches, etc.

    I had to copy a newer hid.h to:

     ~/ti-ezsdk_dm816x-evm_5_05_01_04/board-support/linux-2.6.37-psp04.04.00.01/include/linux

    And I had to copy a newer mt.h to:

     ~/ti-ezsdk_dm816x-evm_5_05_01_04/board-support/linux-2.6.37-psp04.04.00.01/include/linux/input

    And make a simple change to hid-multitouch.c to fix some errors.  Tomorrow I will see if I can install it and test on the DM8168.