LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-15-2018, 04:25 PM   #1
KernelKombat
LQ Newbie
 
Registered: Oct 2018
Posts: 6

Rep: Reputation: Disabled
Newbie problems with setting up and compiling iio drivers and modules


Hi, so I already know that this is going to sound quite stupid. I'm somewhat of a clueless beginner (although not a complete beginner anymore) to developing on the kernel. I've read Linux Kernel Development by Robert Love, and have already contributed a few patches (mostly just checkpatch.pl patches). However, I'm trying to do a few of the tasks from this list in the IIO subsystem: https://kernelnewbies.org/IIO_tasks. I'm just on the first one, and I've read the source code in the IIO/dummy directory and the proper documentation, but I can't seem to figure out even the very first part under the "Dummy Modules Compilation" where it asks me to select the config options. Where do I find these? I couldn't find anything when using make menuconfig command which should be giving me options to enable certain things on certain drivers and modules. How do I do this?

The second thing I'd like to ask is far simpler, and it's even embarrassing for me ask, but I must, so I will. I followed the initial FirstKernelPatch tutorial on getting started https://kernelnewbies.org/FirstKernelPatch. I created a branch called staging and am doing my work in there, but am I supposed to compile this branch and run that, or do I need to get into the code that the computer is actually running on and use that? Or is it just that when working with driver code, I can just loosely take the iio/dummy files and compile them as a module?

I'm asking this because when the task tells me to use the command
Code:
make drivers/iio/dummy/iio_dummy_evgen.ko
, it gives me errors such as no .config file (a config file local to the dummy driver?).
There appears to be some sort of causal piece of knowledge that I'm somehow missing. I'm new to working on projects like this so I would really appreciate it someone could break this down for me. Preferably, just run me through how to do this whole part if you have the time and patience for a lost soul like me:

Quote:
You need to select the following config options:

CONFIG_IIO_CONFIGFS - for creating the dummy device under configfs

CONFIG_IIO_SIMPLE_DUMMY - for building iio_dummy kernel module

CONFIG_IIO_SIMPLE_DUMMY_EVENTS, CONFIG_IIO_SIMPLE_DUMMY_BUFFER should be selected for events and buffer functionality.

CONFIG_IIO_DUMMY_EVGEN - for building iio_dummy_evgen kernel module

Mount the configfs filesystem: read Documentation/iio/iio_configfs.txt
Use the following commands for modules compilation:

$ make drivers/iio/dummy/iio_dummy_evgen.ko

$ make drivers/iio/dummy/iio_dummy.ko

Use the following commands for module loading:

$ insmod iio_dummy_evgen.ko

$ insmod iio_dummy.ko

Use the following command to create your dummy device under the configfs filesystem:

$ mkdir /config/iio/devices/dummy/my_dummy_device
(although everything after the make commands seems self-explanatory).
Thanks so much in advance!
 
Old 11-17-2018, 11:36 AM   #2
KernelKombat
LQ Newbie
 
Registered: Oct 2018
Posts: 6

Original Poster
Rep: Reputation: Disabled
Yea I'm getting the impression that this is some sort of prior knowledge I'm supposed to have. I'm surprised I can't find an answer anywhere
 
Old 11-18-2018, 08:43 PM   #3
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=14, FreeBSD_12{.0|.1}
Posts: 5,407
Blog Entries: 11

Rep: Reputation: 3359Reputation: 3359Reputation: 3359Reputation: 3359Reputation: 3359Reputation: 3359Reputation: 3359Reputation: 3359Reputation: 3359Reputation: 3359Reputation: 3359
If you do not receive a helpful response here, you might consider having your thread moved to the kernel forum.

To request the thread be moved please use the Report button at bottom of your original post and simply ask a site admin to do that for you. Please do not open a new thread with the same topic in another forum as this can be confusing.

Good luck!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
udev rules for iio devices Pieter Cardoen Linux - Hardware 0 04-13-2017 04:50 PM
[SOLVED] IIO: Why cannot open same iio device node twice ? Aniroop Mathur Linux - General 3 08-13-2014 09:01 AM
IIO: Advantages of IIO subsystem Aniroop Mathur Linux - General 1 08-03-2014 08:47 PM
Re: modprobe: Note: /etc/modules.conf is more recent than lib/modules/2.4.9/modules.d Andy.M Linux - General 1 01-24-2002 01:50 AM
Re: modprobe: Note: /etc/modules.conf is more recent than lib/modules/2.4.9/modules.d Andy.M Linux - Newbie 2 01-24-2002 01:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration