RPI4b Revision 7 not supported by HAL_PI_GIO

More
12 Jul 2023 15:24 #275286 by itsme
I received a new Raspberry 4b (4Gig) and after switching it with an older one Linuxcnc refuses to start.
There is an error message that Revision 7 is not supported by HAL_PI_GPIO...

How can this be resolved?

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

More
16 Jul 2023 15:17 #275572 by elovalvo
Replied by elovalvo on topic RPI4b Revision 7 not supported by HAL_PI_GIO
The problem is that the cpuinfo.c module needs to be updated.

To temporarily overcome the problem, copy the file /proc/cpuinfo in /tmp with the following command:
cp /proc/cpuinfo /tmp/cpuinfo.txt

Edit the contents of the /tmp/cpuinfo.txt file by changing the Revision to this

Revision: c03112

and then use the following command
mount --bind /tmp/cpuinfo.txt /proc/cpuinfo

and start LinuxCNC.

However it would be useful to completely review the functioning of the cpuinfo.c and hal_pi_gpio module as suggested in this link www.raspberrypi.com/documentation/comput...ry-pi-revision-codes

Let me know what revision your new Raspberry has.
To find out  you need to type
cat /proc/cpuinfo |  grep Revision

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

More
16 Jul 2023 15:44 #275575 by andypugh
Replied by andypugh on topic RPI4b Revision 7 not supported by HAL_PI_GIO

However it would be useful to completely review the functioning of the cpuinfo.c and hal_pi_gpio module as suggested in this link www.raspberrypi.com/documentation/comput...ry-pi-revision-codes


cpuinfo.c was changed last night.
github.com/LinuxCNC/linuxcnc/commit/2cb7...602d279d0bf5aca40e26
The following user(s) said Thank You: elovalvo

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

More
16 Jul 2023 16:04 - 16 Jul 2023 16:05 #275576 by itsme
Here is my cpuinfo:
Hardware    : BCM2835
Revision    : c03115
Serial        : 10000000eeeXXXXX
Model        : Raspberry Pi 4 Model B Rev 1.5
Last edit: 16 Jul 2023 16:05 by itsme.

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

More
16 Jul 2023 16:11 #275577 by itsme
I downloaded the corresponding files from github and used halcompile to generate the .so file.
Then i copied the file to /usr/lib/linuxcnc/modules.
unfortunately i still have an error on startup of Linuxcnc:
hal_pi2_gpio: dlopen: /usr/lib/linuxcnc/modules/hal_pi2_gpio.so: undefined symbol: get_rpi_revision
./RPI-mill.hal:39: waitpid failed /usr/bin/rtapi_app hal_pi2_gpio
./RPI-mill.hal:39: /usr/bin/rtapi_app exited without becoming ready
./RPI-mill.hal:39: insmod for hal_pi2_gpio failed, returned -1
 

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

More
16 Jul 2023 16:17 #275578 by elovalvo
Replied by elovalvo on topic RPI4b Revision 7 not supported by HAL_PI_GIO

Here is my cpuinfo:
Hardware    : BCM2835
Revision    : c03115
Serial        : 10000000eeeXXXXX
Model        : Raspberry Pi 4 Model B Rev 1.5


Did you try the workaround given here?

forum.linuxcnc.org/24-hal-components/495...by-hal-pi-gio#275572
The following user(s) said Thank You: itsme

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

More
16 Jul 2023 16:32 #275580 by itsme
I now tried the given workaround and this works well with the unmodified HAL_PI_GPIO.

Thank you!

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

More
16 Jul 2023 16:59 #275585 by itsme
Unfortunately this workaround is not persistent, after a reboot the cpuinfo is reset by the system and the workaround has to be done again to make LCNC start.

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

More
16 Jul 2023 17:20 - 16 Jul 2023 17:30 #275587 by elovalvo
Replied by elovalvo on topic RPI4b Revision 7 not supported by HAL_PI_GIO

startlcnc.txt[/attachment]itsme post=275585 userid=28738"]Unfortunately this workaround is not persistent, after a reboot the cpuinfo is reset by the system and the workaround has to be done again to make LCNC start. 
 


While waiting for Andy to complete his precious work, download this file to the Raspberry then run the following commands:

sudo cp startlcnc.txt /usr/local/bin/startlcnc
sudo chmod a+x /usr/local/bin/startlcnc

and LinuxCNC will always start at the command:
startlcnc

File Attachment:

File Name: startlcnc_...7-16.txt
File Size:0 KB


P.S.  the system changed the file name by adding day and year. Once downloaded rename it startcnc.txt deleting the addition
Attachments:
Last edit: 16 Jul 2023 17:30 by elovalvo.

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

More
16 Jul 2023 20:57 #275597 by itsme
Thank you for your suggestion! I have not tested it yet, but I assume it will not work as expected.
The tmp folder is purged on startup...

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

Time to create page: 0.072 seconds
Powered by Kunena Forum