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.

A strange problem when compiling the driver for android.

Hi guys!

I am junior for developing driver in android for omap3-beagle. Now I miss a strange problem. I want to build a driver through several source files. But I find the binary created can't be load during OS starting. If I comment all source files except the main source file, the binary will be load correctly. I don't know the reason of this. Would somebody be kind to help me? Thx!

Regards!

  • Please provide some more information.

    - Which DevKit release are you working on?
    - Which drivers are you trying to compile and load?
    - What log messages do you see when the driver is loaded?

    etc

  • 1. The version of the Devkit release I'm working on is 2.3.4

    2. The driver I trying to compile and load is developed myself. It's a SPI driver. The complete Makefile I am using is as below:

    KERNDIR ?= ~/kong/kernel
    PWD = $(shell pwd)
    PROSLIC_PATH := ./proslic_api
    CODEC_PATH := ./codec_lib
    obj-y := si3217x.o
    si3217x-objs +=  $(PROSLIC_PATH)/src/proslic.o \
            $(PROSLIC_PATH)/src/si_voice_version.o $(PROSLIC_PATH)/src/si_voice.o \
            $(PROSLIC_PATH)/si321x_constants.o ./vdaa_constants.o pcm_ctrl.o \
            $(CODEC_PATH)/codec_api.o
    all:
        $(MAKE) -C $(KERNDIR) M=$(PWD) modules
    .PHONY:
        clean
    clean:
        rm -f *.o

    If I add # ahead of the line "si3217x-objs += ..." and 3 lines following, the binary created will be correct. The command to build is:

     make ARCH=arm CROSS_COMPILE=arm-eabi- uImage

    3. To debug this driver, I print some log when the driver is initialize and probe the hardware. When I build from several files, no log was printed. If build-ed from only one file, the log in init() and probe() are all printed.