RPI4b Revision 7 not supported by HAL_PI_GIO

More
3 years 3 months ago #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 to join the conversation.

More
3 years 3 months ago #275572 by elovalvo
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:
Code:
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
Code:
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
Code:
cat /proc/cpuinfo |  grep Revision

Please Log in to join the conversation.

More
3 years 3 months ago #275575 by andypugh

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

Please Log in to join the conversation.

More
3 years 3 months ago #275576 by itsme
Here is my cpuinfo:
Code:
Hardware    : BCM2835 Revision    : c03115 Serial        : 10000000eeeXXXXX Model        : Raspberry Pi 4 Model B Rev 1.5

Please Log in to join the conversation.

More
3 years 3 months ago #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:
Code:
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 to join the conversation.

More
3 years 3 months ago #275578 by elovalvo

Here is my cpuinfo:
Code:
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

Please Log in to join the conversation.

More
3 years 3 months ago #275580 by itsme
I now tried the given workaround and this works well with the unmodified HAL_PI_GPIO.

Thank you!

Please Log in to join the conversation.

More
3 years 3 months ago #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 to join the conversation.

More
3 years 3 months ago #275587 by elovalvo

 [attachment=54524 wrote: 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:

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

and LinuxCNC will always start at the command:
Code:
startlcnc

Attachment not found



P.S.  the system changed the file name by adding day and year. Once downloaded rename it startcnc.txt deleting the addition

Please Log in to join the conversation.

More
3 years 3 months ago #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 to join the conversation.

Time to create page: 0.214 seconds
Powered by Kunena Forum