Tool/software: Linux
getting error follows while compiling the code :
make ARCH=arm CROSS_COMPILE=/home/manojsai/ti-processor-sdk-linux-am335x-evm-05.02.00.10/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf- -C /home/manojsai/ti-processor-sdk-linux-am335x-evm-05.02.00.10/board-support/linux-4.14.79+gitAUTOINC+bde58ab01e-gbde58ab01e/ M=/home/manojsai/Desktop/prctc/modulespract/Helloworld modules
make[1]: Entering directory '/home/manojsai/ti-processor-sdk-linux-am335x-evm-05.02.00.10/board-support/linux-4.14.79+gitAUTOINC+bde58ab01e-gbde58ab01e'
WARNING: Symbol version dump ./Module.symvers
is missing; modules will have no dependencies and modversions.
CC [M] /home/manojsai/Desktop/prctc/modulespract/Helloworld/hello.o
In file included from ./include/linux/mmzone.h:19:0,
from ./include/linux/gfp.h:6,
from ./include/linux/umh.h:4,
from ./include/linux/kmod.h:22,
from ./include/linux/module.h:13,
from /home/manojsai/Desktop/prctc/modulespract/Helloworld/hello.c:1:
./include/linux/page-flags-layout.h:6:10: fatal error: generated/bounds.h: No such file or directory
#include <generated/bounds.h>
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
scripts/Makefile.build:334: recipe for target '/home/manojsai/Desktop/prctc/modulespract/Helloworld/hello.o' failed
make[2]: *** [/home/manojsai/Desktop/prctc/modulespract/Helloworld/hello.o] Error 1
Makefile:1527: recipe for target '_module_/home/manojsai/Desktop/prctc/modulespract/Helloworld' failed
make[1]: *** [_module_/home/manojsai/Desktop/prctc/modulespract/Helloworld] Error 2
make[1]: Leaving directory '/home/manojsai/ti-processor-sdk-linux-am335x-evm-05.02.00.10/board-support/linux-4.14.79+gitAUTOINC+bde58ab01e-gbde58ab01e'
Makefile:13: recipe for target 'all' failed
make: *** [all] Error 2
make file as follows :
ARCH=arm
CROSS_COMPILER=/home/manojsai/ti-processor-sdk-linux-am335x-evm-05.02.00.10/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-
KERNELDIR=/home/manojsai/ti-processor-sdk-linux-am335x-evm-05.02.00.10/board-support/linux-4.14.79+gitAUTOINC+bde58ab01e-gbde58ab01e/
obj-m = hello.o
PWD := $(shell pwd)
all:
$(MAKE) -C $(KERNELDIR) M=$(PWD) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILER) modules
clean:
$(MAKE) -C $(KERNELDIR) M=$(PWD) ARCH=$(ARCH) clean
#include <linux/module.h> /* Needed by all modules */
#include <linux/kernel.h> /* Needed for KERN_INFO */
#include <linux/init.h> /* Needed for the macros */
///< The license type -- this affects runtime behavior
MODULE_LICENSE("GPL");
///< The author -- visible when you use modinfo
MODULE_AUTHOR("manoj sai");
///< The description -- see modinfo
MODULE_DESCRIPTION("A simple Hello world LKM!");
///< The version of the module
MODULE_VERSION("0.1");
static int __init hello_start(void)
{
printk(KERN_INFO "Loading hello module...\n");
printk(KERN_INFO "Hello world\n");
return 0;
}
static void __exit hello_end(void)
{
printk(KERN_INFO "Goodbye Mr.\n");
}
module_init(hello_start);
module_exit(hello_end);
hello.c