- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I tried to build simple kernel module as instruction in the website below :
https://www.cyberciti.biz/tips/build-linux-kernel-module-against-installed-kernel-source-tree.html
But I got into the problem of missing the header folder "build" in /lib/modules/4.5.0-00185-g3bb556b .
Is there anyone here tried to create .ko modules for DE10 Nano LXDE?
I am so thankful if anyone comes with solution for this issue.
John.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi John,
can you try with the linux LXDE version given at the terasic site and try to create kernel modules and let us know the results.
https://www.terasic.com.tw/cgi-bin/page/archive.pl?Language=English&No=1081&PartNo=4
If you are looking for a custom bsp , please follow the steps below
https://github.com/intel/meta-de10-nano/blob/master/README.md
In either case let us know the results of the .ko module creation.
Thanks and Regards
Anil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Anil,
Your answer brought me confusing.
First thing : I already wrote LXDE image from Terasic website and got the errors when I tried to build .ko module.
Second thing: the link you sent to me mention about Angstrom Distro, and look like it asks me to rebuild the distro. Have you tried this method before to get build folder?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
There is end to end example for building a Linux driver for the DE10 nano SoC board available.
The section 12 in the below link describes about the custom driver with code in details.
https://rocketboards.org/foswiki/Documentation/EmbeddedLinuxBeginnerSGuide
Thanks and Regards
Anil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have spent my time to do research and follow two websites :
https://www.raspberrypi.org/documentation/linux/kernel/building.md
https://github.com/umiddelb/armhf/wiki/How-To-compile-a-custom-Linux-kernel-for-your-ARM-device
and then I tried follow commands to compile and update the current kernel:
//Download the kernel as you suggested
$git clone https://github.com/terasic/linux-socfpga.git
$git checkout 3bb556b -b console
// Export to PATH environment
$export ARCH=arm
$export CROSS_COMPILE=arm-linux-gnueabihf-
//Clean the configuration and create .config file
$ make mrproper
$ make socfpga_defconfig
$ make menuconfig // I didn't change any default setting in this step
// Create zImage, modules and dtbs
$ make -j14 zImage modules dtbs
// Mount SD card
$ mkdir mnt
$ mkdir mnt/fat32
$ mkdir mnt/ext4
$ sudo mount /dev/sdc1 mnt/fat32
$ sudo mount /dev/sdc2 mnt/ext4
// Install the modules:
$sudo env PATH=$PATH make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- INSTALL_MOD_PATH=mnt/ext4 modules_install
// Copy the kernel and Device Tree blobs onto the SD card
$ sudo cp arch/arm/boot/zImage mnt/fat32/
$ sudo cp arch/arm/boot/dts/*.dtb mnt/fat32/
//Unmount SD card
$ sudo umount mnt/fat32
$ sudo umount mnt/ext4
And finally, I put the SD card back to DE10 Nano Board. But the board cannot boot into Linux OS. Nothing output on the HDMI Screen.
I don't know what happens with Kernel or I already did somethings wrong in steps above.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
Please follow the link which was mentioned previously ,
https://rocketboards.org/foswiki/Documentation/EmbeddedLinuxBeginnerSGuide
The Rocket boards link. The section 8 mentions about compiling the Linux kernel.
If you can follow from section 1 to 12 and let us know if the still the issue exist .There are some differences in steps you have followed , like in the Rocketboards link you have to select some configuration while building the kernel, which is not mentioned in the links which you have referred to.
Also as a side note the below link also gives a pretty much detailed approach on writing device drivers.
https://rocketboards.org/foswiki/pub/Documentation/WS3DevelopingDriversForAlteraSoCLinux/WS3_Developing_Drivers_for_Altera_SoC.pdf
Thanks and Regards
Anil

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page