I am trying to build a simple Linux Kernel Module for the Ariane RISC-V implementation. I must say that I am using the modified version of the riscv-tools of Ariane-SDK, but I didn't know anywhere else to ask for help, as I am really struggling with the creation of the Makefile for the cross-compile.
The code of my LKM is the following:
/* Kernel Programming */
#include <linux/module.h> // Needed by all modules
#include <linux/kernel.h>
static int init_module(void)
{
printk("Hello, world 2\n");
return 0;
}
static void cleanup_module(void)
{
printk("Goodbye, world 2\n");
}
Hi,
I am trying to build a simple Linux Kernel Module for the Ariane RISC-V implementation. I must say that I am using the modified version of the riscv-tools of Ariane-SDK, but I didn't know anywhere else to ask for help, as I am really struggling with the creation of the Makefile for the cross-compile.
The code of my LKM is the following:
My initial Makefile attempt was the following:
After a discussion I had on this thread, I tried to build a Makefile, following the example shown here. Now my Makefile is the following:
The
buildroot/output/build/linux-ariane-v0.7
folder has the kernel tree of the Ariane-sdk that I am trying to cross-compile for.When I run the above Makefile (the 2nd one), I get the following:
but no .ko file is generated, only 2 blank files Module.symvers and modules.order.
Can someone please advise me on where I am wrong with my Makefile?
Thank you in advance for your help and time!
Kind regards, Nassos