SPI driver for Debian
Clash Royale CLAN TAG#URR8PPP
up vote
2
down vote
favorite
This is the Linux:
PRETTY_NAME="Debian GNU/Linux 8 (jessie)"
NAME="Debian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=debian
The Kernel version is:
4.1.15-gcfb25fd
And this is the Hardware platform: http://variwiki.com/index.php?title=DART-6UL
So I am familiar with SPI interface (I have developed SPI drivers for microcotrollers) but I am new in linux .
I found out nodeJs package for SPI but it requires SPIDEV in /dev/ directory, which is missing in the device list.
After some research I found out that I can rebuild the Kernel with new configuration so the SPIDEVx can appear in the device list. But this seems to more laborious approach. I have to install everything again.
Is it possible to write a C program to utilize the SPI interface on the installed OS/ I found out there is spidev.h
file in /ust/include/linux/spi/
but it contains only typedefs
and macros
, no function declarations.
What would you advice me? What would be the least painful approach?
debian drivers devices
add a comment |Â
up vote
2
down vote
favorite
This is the Linux:
PRETTY_NAME="Debian GNU/Linux 8 (jessie)"
NAME="Debian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=debian
The Kernel version is:
4.1.15-gcfb25fd
And this is the Hardware platform: http://variwiki.com/index.php?title=DART-6UL
So I am familiar with SPI interface (I have developed SPI drivers for microcotrollers) but I am new in linux .
I found out nodeJs package for SPI but it requires SPIDEV in /dev/ directory, which is missing in the device list.
After some research I found out that I can rebuild the Kernel with new configuration so the SPIDEVx can appear in the device list. But this seems to more laborious approach. I have to install everything again.
Is it possible to write a C program to utilize the SPI interface on the installed OS/ I found out there is spidev.h
file in /ust/include/linux/spi/
but it contains only typedefs
and macros
, no function declarations.
What would you advice me? What would be the least painful approach?
debian drivers devices
add a comment |Â
up vote
2
down vote
favorite
up vote
2
down vote
favorite
This is the Linux:
PRETTY_NAME="Debian GNU/Linux 8 (jessie)"
NAME="Debian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=debian
The Kernel version is:
4.1.15-gcfb25fd
And this is the Hardware platform: http://variwiki.com/index.php?title=DART-6UL
So I am familiar with SPI interface (I have developed SPI drivers for microcotrollers) but I am new in linux .
I found out nodeJs package for SPI but it requires SPIDEV in /dev/ directory, which is missing in the device list.
After some research I found out that I can rebuild the Kernel with new configuration so the SPIDEVx can appear in the device list. But this seems to more laborious approach. I have to install everything again.
Is it possible to write a C program to utilize the SPI interface on the installed OS/ I found out there is spidev.h
file in /ust/include/linux/spi/
but it contains only typedefs
and macros
, no function declarations.
What would you advice me? What would be the least painful approach?
debian drivers devices
This is the Linux:
PRETTY_NAME="Debian GNU/Linux 8 (jessie)"
NAME="Debian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=debian
The Kernel version is:
4.1.15-gcfb25fd
And this is the Hardware platform: http://variwiki.com/index.php?title=DART-6UL
So I am familiar with SPI interface (I have developed SPI drivers for microcotrollers) but I am new in linux .
I found out nodeJs package for SPI but it requires SPIDEV in /dev/ directory, which is missing in the device list.
After some research I found out that I can rebuild the Kernel with new configuration so the SPIDEVx can appear in the device list. But this seems to more laborious approach. I have to install everything again.
Is it possible to write a C program to utilize the SPI interface on the installed OS/ I found out there is spidev.h
file in /ust/include/linux/spi/
but it contains only typedefs
and macros
, no function declarations.
What would you advice me? What would be the least painful approach?
debian drivers devices
debian drivers devices
edited Aug 8 at 10:32
Jeff Schaller
32.4k849110
32.4k849110
asked Aug 8 at 8:59
Rikotech
112
112
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
1
down vote
Briefly: You'll need device nodes in /dev to have user application use SPI. It doesn't matter of you use NodeJS or a C program to access those devices. And yes, /usr/include/linux/spi/
will only include the typedefs to use the device node. This will also be used by the NodeJS package, or any other userland package.
The device nodes in /dev are the kernel drivers that do the hardware access. If your current kernel is not configured for them, you need to configure it. In the best case, you just have to change the device tree. You may have to compile additional modules (which can e.g. be done with DKMS under Debian). You may also have to compile the complete kernel. Which of those applies depends on your current kernel configuration, which you have told us nothing about.
Any in case, you never have to "install everything again". Even if you need to compile the whole kernel, just install the new kernel and reboot.
I was looking for a device tree configuration file(*.dtb), but didn't find any. Is it possible this file to be missing?
â Rikotech
Aug 9 at 16:00
I'm not familiar enough with DART-6UL to know how they do this in this platform. You installed the Debian that is available on the page you linked? Have you examined the configuration of the kernel that was included?
â dirkt
Aug 9 at 17:14
Yes but it is preinstalation configuration. I am trying to avoid kernel rebuild ( if possible) .
â Rikotech
Aug 9 at 17:54
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
Briefly: You'll need device nodes in /dev to have user application use SPI. It doesn't matter of you use NodeJS or a C program to access those devices. And yes, /usr/include/linux/spi/
will only include the typedefs to use the device node. This will also be used by the NodeJS package, or any other userland package.
The device nodes in /dev are the kernel drivers that do the hardware access. If your current kernel is not configured for them, you need to configure it. In the best case, you just have to change the device tree. You may have to compile additional modules (which can e.g. be done with DKMS under Debian). You may also have to compile the complete kernel. Which of those applies depends on your current kernel configuration, which you have told us nothing about.
Any in case, you never have to "install everything again". Even if you need to compile the whole kernel, just install the new kernel and reboot.
I was looking for a device tree configuration file(*.dtb), but didn't find any. Is it possible this file to be missing?
â Rikotech
Aug 9 at 16:00
I'm not familiar enough with DART-6UL to know how they do this in this platform. You installed the Debian that is available on the page you linked? Have you examined the configuration of the kernel that was included?
â dirkt
Aug 9 at 17:14
Yes but it is preinstalation configuration. I am trying to avoid kernel rebuild ( if possible) .
â Rikotech
Aug 9 at 17:54
add a comment |Â
up vote
1
down vote
Briefly: You'll need device nodes in /dev to have user application use SPI. It doesn't matter of you use NodeJS or a C program to access those devices. And yes, /usr/include/linux/spi/
will only include the typedefs to use the device node. This will also be used by the NodeJS package, or any other userland package.
The device nodes in /dev are the kernel drivers that do the hardware access. If your current kernel is not configured for them, you need to configure it. In the best case, you just have to change the device tree. You may have to compile additional modules (which can e.g. be done with DKMS under Debian). You may also have to compile the complete kernel. Which of those applies depends on your current kernel configuration, which you have told us nothing about.
Any in case, you never have to "install everything again". Even if you need to compile the whole kernel, just install the new kernel and reboot.
I was looking for a device tree configuration file(*.dtb), but didn't find any. Is it possible this file to be missing?
â Rikotech
Aug 9 at 16:00
I'm not familiar enough with DART-6UL to know how they do this in this platform. You installed the Debian that is available on the page you linked? Have you examined the configuration of the kernel that was included?
â dirkt
Aug 9 at 17:14
Yes but it is preinstalation configuration. I am trying to avoid kernel rebuild ( if possible) .
â Rikotech
Aug 9 at 17:54
add a comment |Â
up vote
1
down vote
up vote
1
down vote
Briefly: You'll need device nodes in /dev to have user application use SPI. It doesn't matter of you use NodeJS or a C program to access those devices. And yes, /usr/include/linux/spi/
will only include the typedefs to use the device node. This will also be used by the NodeJS package, or any other userland package.
The device nodes in /dev are the kernel drivers that do the hardware access. If your current kernel is not configured for them, you need to configure it. In the best case, you just have to change the device tree. You may have to compile additional modules (which can e.g. be done with DKMS under Debian). You may also have to compile the complete kernel. Which of those applies depends on your current kernel configuration, which you have told us nothing about.
Any in case, you never have to "install everything again". Even if you need to compile the whole kernel, just install the new kernel and reboot.
Briefly: You'll need device nodes in /dev to have user application use SPI. It doesn't matter of you use NodeJS or a C program to access those devices. And yes, /usr/include/linux/spi/
will only include the typedefs to use the device node. This will also be used by the NodeJS package, or any other userland package.
The device nodes in /dev are the kernel drivers that do the hardware access. If your current kernel is not configured for them, you need to configure it. In the best case, you just have to change the device tree. You may have to compile additional modules (which can e.g. be done with DKMS under Debian). You may also have to compile the complete kernel. Which of those applies depends on your current kernel configuration, which you have told us nothing about.
Any in case, you never have to "install everything again". Even if you need to compile the whole kernel, just install the new kernel and reboot.
answered Aug 8 at 9:18
dirkt
14.3k2931
14.3k2931
I was looking for a device tree configuration file(*.dtb), but didn't find any. Is it possible this file to be missing?
â Rikotech
Aug 9 at 16:00
I'm not familiar enough with DART-6UL to know how they do this in this platform. You installed the Debian that is available on the page you linked? Have you examined the configuration of the kernel that was included?
â dirkt
Aug 9 at 17:14
Yes but it is preinstalation configuration. I am trying to avoid kernel rebuild ( if possible) .
â Rikotech
Aug 9 at 17:54
add a comment |Â
I was looking for a device tree configuration file(*.dtb), but didn't find any. Is it possible this file to be missing?
â Rikotech
Aug 9 at 16:00
I'm not familiar enough with DART-6UL to know how they do this in this platform. You installed the Debian that is available on the page you linked? Have you examined the configuration of the kernel that was included?
â dirkt
Aug 9 at 17:14
Yes but it is preinstalation configuration. I am trying to avoid kernel rebuild ( if possible) .
â Rikotech
Aug 9 at 17:54
I was looking for a device tree configuration file(*.dtb), but didn't find any. Is it possible this file to be missing?
â Rikotech
Aug 9 at 16:00
I was looking for a device tree configuration file(*.dtb), but didn't find any. Is it possible this file to be missing?
â Rikotech
Aug 9 at 16:00
I'm not familiar enough with DART-6UL to know how they do this in this platform. You installed the Debian that is available on the page you linked? Have you examined the configuration of the kernel that was included?
â dirkt
Aug 9 at 17:14
I'm not familiar enough with DART-6UL to know how they do this in this platform. You installed the Debian that is available on the page you linked? Have you examined the configuration of the kernel that was included?
â dirkt
Aug 9 at 17:14
Yes but it is preinstalation configuration. I am trying to avoid kernel rebuild ( if possible) .
â Rikotech
Aug 9 at 17:54
Yes but it is preinstalation configuration. I am trying to avoid kernel rebuild ( if possible) .
â Rikotech
Aug 9 at 17:54
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f461233%2fspi-driver-for-debian%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password