Can Asus Tinker Board run LINUXCNC
09 Sep 2019 14:04 #144608
by PCW
Replied by PCW on topic Can Asus Tinker Board run LINUXCNC
Did you read the hm2_spi manual page?
man hm2_spi
hm2_spi uses the unix spi driver so the path to the driver must be included in the command line that launches hm2_spi
man hm2_spi
hm2_spi uses the unix spi driver so the path to the driver must be included in the command line that launches hm2_spi
Please Log in or Create an account to join the conversation.
10 Sep 2019 08:13 #144680
by JackyWu
Replied by JackyWu on topic Can Asus Tinker Board run LINUXCNC
1.
I had read the hm2_spi manual(linuxcnc.org/docs/2.7/html/man/man9/hm2_spi.9.html).
And I checked the file in the default folder ( /dev/spidev1.0 ).
I found that I don't have the file named "spidev1.0", but there are "spidev0.0", "spidev0.1", "spidev2.0", "spidev2.1".
So I tried to change the default folder. The error shows as follows
Since the error shows permission denied, I also tried to do it at root.
However, I even can't use halrun at root.
2.
Since I found this (forum.linuxcnc.org/27-driver-boards/30548-mesa-7i90-in-spi-mode ).
I also tried to install mesaflash, but it didn't work, either.
The error are as follows
Does anyone know the reason of permission denied?
Is it because of I execute these commands without linking the mesa 7i90 card ?
I had read the hm2_spi manual(linuxcnc.org/docs/2.7/html/man/man9/hm2_spi.9.html).
And I checked the file in the default folder ( /dev/spidev1.0 ).
I found that I don't have the file named "spidev1.0", but there are "spidev0.0", "spidev0.1", "spidev2.0", "spidev2.1".
So I tried to change the default folder. The error shows as follows
atech@tinkerboard:~/linuxcnc-dev/src$ halrun
halcmd: loadrt hostmot2
Note: Using POSIX realtime
hm2: loading Mesa HostMot2 driver version 0.15
halcmd: loadrt hm2_spi spidev_path=/dev/spidev0.0
probe 24000000
hm2_spi: rtapi_app_main: Permission denied (-13)
<stdin>:2: waitpid failed /home/atech/linuxcnc-dev/bin/rtapi_app hm2_spi
<stdin>:2: /home/atech/linuxcnc-dev/bin/rtapi_app exited without becoming ready
<stdin>:2: insmod for hm2_spi failed, returned -1
atech@tinkerboard:~/linuxcnc-dev/src$ halrun
halcmd: loadrt hostmot2
Note: Using POSIX realtime
hm2: loading Mesa HostMot2 driver version 0.15
halcmd: loadrt hm2_spi spidev_path=/dev/spidev0.1
probe 24000000
hm2_spi: rtapi_app_main: Permission denied (-13)
<stdin>:2: waitpid failed /home/atech/linuxcnc-dev/bin/rtapi_app hm2_spi
<stdin>:2: /home/atech/linuxcnc-dev/bin/rtapi_app exited without becoming ready
<stdin>:2: insmod for hm2_spi failed, returned -1
atech@tinkerboard:~/linuxcnc-dev/src$ halrun
halcmd: loadrt hostmot2
Note: Using POSIX realtime
hm2: loading Mesa HostMot2 driver version 0.15
halcmd: loadrt hm2_spi spidev_path=/dev/spidev2.0
probe 24000000
hm2_spi: rtapi_app_main: Permission denied (-13)
<stdin>:2: waitpid failed /home/atech/linuxcnc-dev/bin/rtapi_app hm2_spi
<stdin>:2: /home/atech/linuxcnc-dev/bin/rtapi_app exited without becoming ready
<stdin>:2: insmod for hm2_spi failed, returned -1
atech@tinkerboard:~/linuxcnc-dev/src$ halrun
halcmd: loadrt hostmot2
Note: Using POSIX realtime
hm2: loading Mesa HostMot2 driver version 0.15
halcmd: loadrt hm2_spi spidev_path=/dev/spidev2.1
probe 24000000
hm2_spi: rtapi_app_main: Permission denied (-13)
<stdin>:2: waitpid failed /home/atech/linuxcnc-dev/bin/rtapi_app hm2_spi
<stdin>:2: /home/atech/linuxcnc-dev/bin/rtapi_app exited without becoming ready
<stdin>:2: insmod for hm2_spi failed, returned -1
Since the error shows permission denied, I also tried to do it at root.
However, I even can't use halrun at root.
2.
Since I found this (forum.linuxcnc.org/27-driver-boards/30548-mesa-7i90-in-spi-mode ).
I also tried to install mesaflash, but it didn't work, either.
The error are as follows
atech@tinkerboard:~/mesaflash$ ./mesaflash --device 7I90 --spi --addr /dev/spidev0.0 --readhmid
open: Permission denied
No 7I90 board found
Does anyone know the reason of permission denied?
Is it because of I execute these commands without linking the mesa 7i90 card ?
Please Log in or Create an account to join the conversation.
10 Sep 2019 13:40 #144698
by PCW
Replied by PCW on topic Can Asus Tinker Board run LINUXCNC
Not sure, on the RPI you need to specifically enable SPI access to run mesaflash
It may be that you have to change the SPI device permissions, though normally
halcmd uses root permissions to access hardware drivers (like LinuxCNC does)
How did you install LinuxCNC? You might also have these issues if you built
LinuxCNC from source but forgot to run the "sudo make setuid" step so LinuxCNC
and halcmd can launch drivers with root permissions.
It may be that you have to change the SPI device permissions, though normally
halcmd uses root permissions to access hardware drivers (like LinuxCNC does)
How did you install LinuxCNC? You might also have these issues if you built
LinuxCNC from source but forgot to run the "sudo make setuid" step so LinuxCNC
and halcmd can launch drivers with root permissions.
Please Log in or Create an account to join the conversation.
11 Sep 2019 05:11 - 11 Sep 2019 05:23 #144779
by JackyWu
Replied by JackyWu on topic Can Asus Tinker Board run LINUXCNC
I installed LinuxCNC following the guide of (linuxcnc.org/docs/devel/html/code/building-linuxcnc.html)
I had run the "sudo make setuid" when I tried to run "loadrt hm2_spi" yesterday.
The message showed when I ran the "sudo make setuid" were
And I ran "source ../scripts/rip-environment" and "halrun" after that.
Is there anything wrong?
P.S. The SPI function is enabled as the attached image "spi_enable" shown,
I had run the "sudo make setuid" when I tried to run "loadrt hm2_spi" yesterday.
The message showed when I ran the "sudo make setuid" were
atech@tinkerboard:~/linuxcnc-dev/src$ sudo make setuid
[sudo] password for atech:
chown root ../bin/rtapi_app
chmod 4750 ../bin/rtapi_app
chown root ../bin/linuxcnc_module_helper
chmod 4750 ../bin/linuxcnc_module_helper
And I ran "source ../scripts/rip-environment" and "halrun" after that.
Is there anything wrong?
P.S. The SPI function is enabled as the attached image "spi_enable" shown,
Last edit: 11 Sep 2019 05:23 by JackyWu.
Please Log in or Create an account to join the conversation.
11 Sep 2019 08:04 - 11 Sep 2019 08:32 #144792
by terry1992
Replied by terry1992 on topic Can Asus Tinker Board run LINUXCNC
I tried to install LinuxCNC 2.7.14 on my Tinker Board S for few days.
The deb file I download is "LinuxCNC Uspace 2.7.14 Docs".
When I install it, terminal window showsDoes that means the installation done?
How should I run it?
The deb file I download is "LinuxCNC Uspace 2.7.14 Docs".
When I install it, terminal window shows
atech@tinkerboard:~/Downloads$ sudo dpkg -i linuxcnc-doc-en_2.7.14_all.deb
[sudo] password for atech:
Selecting previously unselected package linuxcnc-doc-en.
(Reading database ... 171926 files and directories currently installed.)
Preparing to unpack linuxcnc-doc-en_2.7.14_all.deb ...
Unpacking linuxcnc-doc-en (1:2.7.14) ...
Setting up linuxcnc-doc-en (1:2.7.14) ...
Processing triggers for desktop-file-utils (0.23-4) ...
Processing triggers for mime-support (3.62) ...
How should I run it?
Last edit: 11 Sep 2019 08:32 by terry1992.
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19190
- Thank you received: 6433
11 Sep 2019 10:06 #144805
by tommylight
Replied by tommylight on topic Can Asus Tinker Board run LINUXCNC
@terry
That is the documents you have installed, not Linuxcnc.
You need the deb without the doc in the name.
That is the documents you have installed, not Linuxcnc.
You need the deb without the doc in the name.
The following user(s) said Thank You: terry1992
Please Log in or Create an account to join the conversation.
11 Sep 2019 14:43 #144824
by PCW
Replied by PCW on topic Can Asus Tinker Board run LINUXCNC
What are the permissions of the SPI device?
( ls -l /dev/sp* )
I know mesaflash works on the Raspberry PI and it uses the SPI device
(and it needed to be enabled before it worked with mesaflash)
( ls -l /dev/sp* )
I know mesaflash works on the Raspberry PI and it uses the SPI device
(and it needed to be enabled before it worked with mesaflash)
Please Log in or Create an account to join the conversation.
12 Sep 2019 02:09 #144871
by JackyWu
Replied by JackyWu on topic Can Asus Tinker Board run LINUXCNC
The permissions are as follows
It seems that the file can be read and write, but not executable.
Is it normal to a LinuxCNC system?
If it is abnormal, how can I deal with it ?
atech@tinkerboard:~$ ls -l /dev/sp*
crw------- 1 root root 153, 1 Sep 12 09:07 /dev/spidev0.0
crw------- 1 root root 153, 0 Sep 12 09:07 /dev/spidev0.1
crw------- 1 root root 153, 3 Sep 12 09:07 /dev/spidev2.0
crw------- 1 root root 153, 2 Sep 12 09:07 /dev/spidev2.1
It seems that the file can be read and write, but not executable.
Is it normal to a LinuxCNC system?
If it is abnormal, how can I deal with it ?
Please Log in or Create an account to join the conversation.
12 Sep 2019 03:12 #144886
by PCW
Replied by PCW on topic Can Asus Tinker Board run LINUXCNC
Not sure, I'll take a look at my RPI tomorrow and see what its SPI device
permissions are
permissions are
Please Log in or Create an account to join the conversation.
20 Sep 2019 03:16 - 20 Sep 2019 07:38 #145647
by JackyWu
Replied by JackyWu on topic Can Asus Tinker Board run LINUXCNC
I was finished install hm2_tkboard.c. And I loaded halrun with hm2_tkboard, but the error was as follows:
I also tried to use mesaflash utility by running this command:How can I flash firmware spi for mesa 7i90hd board?
Can you help me?
Thank you very much!
atech@tinkerboard:~/linuxcnc-dev/src$ halcompile --install ./hm2_tkboard.c
Compiling realtime hm2_tkboard.c
Linking hm2_tkboard.so
cp hm2_tkboard.so /home/atech/linuxcnc-dev/rtlib/
atech@tinkerboard:~/linuxcnc-dev/src$ halrun
halcmd: loadrt hostmot2
Note: Using POSIX realtime
hm2: loading Mesa HostMot2 driver version 0.15
halcmd: loadrt hm2_tkboard
Invalid cookie
Read: ffffffff ffffffff ffffffff ffffffff
hm2_tkboard: rtapi_app_main: No such device (-19)
<stdin>:4: waitpid failed /home/atech/linuxcnc-dev/bin/rtapi_app hm2_tkboard
<stdin>:4: /home/atech/linuxcnc-dev/bin/rtapi_app exited without becoming ready
<stdin>:4: insmod for hm2_tkboard failed, returned -1
I also tried to use mesaflash utility by running this command:
atech@tinkerboard:~/mesaflash$ sudo ./mesaflash --device 7I90 --spi --addr /dev/spidev0.0 --fallback --write ../7i90/configs/fallback/7i90_spi_fallback.bit
[sudo] password for atech:
unable to set bpw32, fallback to bpw8
Unexpected cookie at 0100..0110:
ffffffff ffffffff ffffffff
No 7I90 board found
atech@tinkerboard:~/mesaflash$ sudo ./mesaflash --device 7i90 --spi --write /home/atech/Downloads/7i90/configs/hostmot2/7i90_spi_svst4_8.bit
open: Bad address
No 7I90 board found
Can you help me?
Thank you very much!
Last edit: 20 Sep 2019 07:38 by JackyWu.
Please Log in or Create an account to join the conversation.
Time to create page: 0.114 seconds