cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
bfung_2
Adventurer
Adventurer
578 Views
Registered: ‎07-02-2020

kernel module source include file in petalinux

Jump to solution

I've got the following 2 files:

driver.c

driver.h

Within driver.c, I have

#include "driver.h"

How must I correctly include this header file in the associated Makefile to build? The template is as follows:

obj-m := driver.o

MY_CFLAGS += -g -DDEBUG
ccflags-y += ${MY_CFLAGS} -I$(src)

SRC := $(shell pwd)

all:
$(MAKE) -C $(KERNEL_SRC) M=$(SRC)

modules_install:
$(MAKE) -C $(KERNEL_SRC) M=$(SRC) modules_install

clean:
rm -f *.o *~ core .depend .*.cmd *.ko *.mod.c
rm -f Module.markers Module.symvers modules.order
rm -rf .tmp_versions Modules.symvers

0 Kudos
1 Solution

Accepted Solutions
bfung_2
Adventurer
Adventurer
551 Views
Registered: ‎07-02-2020

Ah. The thing to do is to add the header file to the driver.bb file

View solution in original post

0 Kudos
1 Reply
bfung_2
Adventurer
Adventurer
552 Views
Registered: ‎07-02-2020

Ah. The thing to do is to add the header file to the driver.bb file

View solution in original post

0 Kudos