Jump to content
stemmo

Compile a simple driver

Recommended Posts

Hi all,

I need to compile a simple serial driver but I miss something. First of all the kernel-related files.

uname -r

returns 4.4.194

So I downloaded both kernel-linux-4.4-rk3399-debian10.zip and linux-4.4.194.tar.gs files from tinkerboard and kernel git sites.

The compilation is run by:

root@linaro-alip:/home/amtek/linux_customVCOM_103# more compile.sh
#!/bin/bash
make -C /lib/modules/`uname -r`/build M=$PWD

and the Makefile contains:

root@linaro-alip:/home/amtek/linux_customVCOM_103# more Makefile
#
# Makefile for the USB serial custom driver.
#

# Object file lists.

obj-m                   := customvcom.o

KDIR    := /lib/modules/$(shell uname -r)/build
PWD    := $(shell pwd)

default:
        $(MAKE) -C $(KDIR) M=$(PWD)

clean:
        $(MAKE) -C $(KDIR) M=$(PWD) clean

If I copy the kernel folder from zip files to /source/kernel/ folder I have:

root@linaro-alip:/home/amtek/linux_customVCOM_103# ./compile.sh
make: Entering directory '/source/kernel'
make: *** No rule to make target 'FORCE', needed by '/config_data.gz'.  Stop.
make: Leaving directory '/source/kernel'

 

Any idea?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...