Hi
I want to compile a simple application that just prints "Hello World" On Linux Kernel. How can I do so?
Thanks
Himansu
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi
I want to compile a simple application that just prints "Hello World" On Linux Kernel. How can I do so?
Thanks
Himansu
Hi,
You would have to write the kernel module, and print "Hello World" in the module init function. You can either build your kernel module in the kernel source tree, or outside of the kernel source tree. Please search it on the internet, there is plenty of tutorials teaching to write a simple kernel module.
Yes but what cross compiler do I need to use. When I compile with arm-linux-gnueabihf corss compiler its showing "Invalid Module format"
root@am64xx-evm:/test# insmod main.ko
insmod: ERROR: could not insert module main.ko: Invalid module format
AM64x is a 64bit processor, so you need to use aarch64-none-linux-gnu cross compiler instead. Please also ensure ARCH=arm64 is used, not ARCH=arm.