Cross compiling a kernel module

后端 未结 6 2028
囚心锁ツ
囚心锁ツ 2020-12-04 18:22

I\'m trying to cross compile a helloworld kernel (2.6.x) module for ARM architecture on my intel x86 host.

The codesourcery tool chain for ARM is located at: /ho

6条回答
  •  醉话见心
    2020-12-04 18:33

    could you try, you forgot to add ARCH and CROSS_COMPILE into the default and clean

    ARCH=arm
    COMPILER=arm-none-linux-gnueabi
    obj-m := Hello.o
    KERNELDIR := /home/ravi/workspace/hawk/linux-omapl1
    PWD := $(shell pwd)
    default:
        $(MAKE) -C $(KERNELDIR) M=$(PWD) ARCH=$(ARCH) CROSS_COMPILE=$(COMPILER) modules
    
    clean:
        $(MAKE) -C $(KERNELDIR) M=$(PWD) ARCH=$(ARCH) clean
    

提交回复
热议问题