Installing Mesaflash on RPi4 64

More
16 Mar 2021 01:06 #202437 by Limedodge
Greetings

I try to fumble around and google everything I can before bother experts, but I'm stuck. Hopefully the answer is easy

I have a 7i96 connected to a RPi4 (4Gb)

I installed LinuxCNC per the instruction outlined in

RPI4 Raspbian 64 bit & LinuxCNC
forum.linuxcnc.org/9-installing-linuxcnc...bian-64-bit-linuxcnc

Everything seems to be working so far. Still making progress getting it figured out and connecting.

My issue is I can't seem to install mesaflash. I followed the instructions on the gihub page and I get the following error when trying to make the install file
pi@raspberrypi:~/Desktop/mesaflash/mesaflash-master $ make
gcc -O0 -g -Wall -Werror=format -Werror=format-security -std=c99 -D_GNU_SOURCE  -c common.c
gcc -O0 -g -Wall -Werror=format -Werror=format-security -std=c99 -D_GNU_SOURCE  -c lbp.c
lbp.c: In function ‘lbp_read’:
lbp.c:75:15: warning: variable ‘recv’ set but not used [-Wunused-but-set-variable]
     int send, recv;
               ^~~~
lbp.c:75:9: warning: variable ‘send’ set but not used [-Wunused-but-set-variable]
     int send, recv;
         ^~~~
lbp.c: In function ‘lbp_write’:
lbp.c:92:9: warning: variable ‘send’ set but not used [-Wunused-but-set-variable]
     int send;
         ^~~~
gcc -O0 -g -Wall -Werror=format -Werror=format-security -std=c99 -D_GNU_SOURCE  -c lbp16.c
lbp16.c: In function ‘lbp16_read’:
lbp16.c:39:9: warning: variable ‘send’ set but not used [-Wunused-but-set-variable]
     int send, recv;
         ^~~~
lbp16.c: In function ‘lbp16_write’:
lbp16.c:61:9: warning: variable ‘send’ set but not used [-Wunused-but-set-variable]
     int send;
         ^~~~
lbp16.c: In function ‘lbp16_board_reset’:
lbp16.c:75:9: warning: variable ‘send’ set but not used [-Wunused-but-set-variable]
     int send;
         ^~~~
lbp16.c: In function ‘lbp16_board_reload’:
lbp16.c:86:9: warning: variable ‘send’ set but not used [-Wunused-but-set-variable]
     int send;
         ^~~~
gcc -O0 -g -Wall -Werror=format -Werror=format-security -std=c99 -D_GNU_SOURCE  -c bitfile.c
gcc -O0 -g -Wall -Werror=format -Werror=format-security -std=c99 -D_GNU_SOURCE  -c hostmot2.c
gcc -O0 -g -Wall -Werror=format -Werror=format-security -std=c99 -D_GNU_SOURCE  -c eeprom.c
gcc -O0 -g -Wall -Werror=format -Werror=format-security -std=c99 -D_GNU_SOURCE  -c anyio.c
gcc -O0 -g -Wall -Werror=format -Werror=format-security -std=c99 -D_GNU_SOURCE  -c eth_boards.c
eth_boards.c: In function ‘eth_scan_one_addr’:
eth_boards.c:140:9: warning: variable ‘send’ set but not used [-Wunused-but-set-variable]
     int send = 0, recv = 0, ret = 0;
         ^~~~
gcc -O0 -g -Wall -Werror=format -Werror=format-security -std=c99 -D_GNU_SOURCE  -c epp_boards.c
epp_boards.c:22:10: fatal error: sys/io.h: No such file or directory
 #include <sys/io.h>
          ^~~~~~~~~~
compilation terminated.
make: *** [Makefile:109: epp_boards.o] Error 1

I've tried both cloning and downloading the zip file manually. I get the above error message both ways

I checked the "stubs/sys" directory and the io.h file is there.

Any ideas?

Please Log in or Create an account to join the conversation.

More
16 Mar 2021 11:40 #202466 by BigJohnT
I use OpenBox and installed on my Rpi4 from my instructions
gnipsel.com/linuxcnc/uspace/
then followed the instructions on mesaflash and had no issues installing mesaflash

Looks like your missing a dependency...

Jt

Please Log in or Create an account to join the conversation.

More
17 Mar 2021 14:48 #202601 by Limedodge
<Update>

I think I finally got it figured out.

I appears that aarch64 does not use or have the files io.h. The mesaflash git comes with those files in the stubs/sys directory but they were not getting called when it went to create the install file. Thus the fatal error no such file found

I modified the makefile to remove the conditional "ifeq ($(use_stubs),1)" and simply forced the use of stubs.

There's probably a better way to do this using the make command, but linux is not my strongest suit. For my purposes it worked and allowed the makefile to grab those include stub/sys files

Just in case someone else has this problem, this might save them some headache

Please Log in or Create an account to join the conversation.

More
18 Mar 2021 01:53 #202701 by andypugh
Are you absolutely committed to running a 64-bit kernel? If you can bear to run with a 32-bit kernel then most of these problems disappear as you can just use the LinuxCNC SD-card image and install software packages in the usual way.

Please Log in or Create an account to join the conversation.

More
18 Mar 2021 14:01 #202741 by Limedodge
Well, That's a good question.

Perhaps I'm mistaken but from my reading of these message boards, it sounded like the RPi 64 bit had better latency numbers than the 32 bit. Since my project involves running XY2-100 galvo's I figured latency will be be key later on and I might as well start out now, building with the 64bit flavor. Rather than running into issues down the line and having to back track

But I could be way off in that assumption

Please Log in or Create an account to join the conversation.

More
18 Mar 2021 14:15 #202744 by andypugh
If you are using Mesa hardware, and the Mesa XY2 galvo module, then latency is much less important than if you are usng software stepping, for example.

Any LinuxCNC configs that you make will work equally well under either OS / Realtime setup.

Please Log in or Create an account to join the conversation.

Moderators: PCWjmelson
Time to create page: 0.134 seconds
Powered by Kunena Forum