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!