GPIO on Pi4B. (Later rev)
Gareth Lock (2186) 51 posts |
Has anybody tried tp compile a softloadable GPIO module for the 5.28 kernel that supports the use of the GPIO pins on these later Pi4s? I managed to compile a RAM module earlier today from what I thought were the latest sources, but when I tried to run it, I still got the dreaded “Unsupported Hardware Configuration” message that’s been reported here before… Am I missing something, or is a 5.29 beta the only option?? |
Stuart Swales (8827) 1357 posts |
I believe you need the updated HAL to support the new Pi4s, rather than the GPIO module. |
Gareth Lock (2186) 51 posts |
Ah… That would explain my failure to change the situation by compiling the GPIO module from sources yesterday… OK… Thanks for the response. I’m guessing here that the HAL, although a seperate module, would be much harder to softload… |
Steve Pampling (1551) 8172 posts |
Gareth, I’m pretty sure that was a fair bit of chat the other year about GPIO changes on the newer Pi4 and that the fix was in the revised HAL that Stuart referenced. |
David Pitt (9872) 363 posts |
My recollection is that updates for rev 5 RPi4’s were back ported into a second issue of OS5.28 dated 10 Feb 2022. Just for fun I built a standalone GPIO module from the latest beta tarball and it softloaded just fine over that version of OS5.28, at which point I noticed that the RAM and ROM GPIO modules are the same version. What date is the OS5.28? RPi4B 2GB rev 5 (B03115) *fx0 RISC OS 5.28 (10 Feb 2022) *help gpio Module is: GPIO 1.00 (24 Jun 2021) HAL.7 From Verma 135 127 Active UnSqueezeAIF 0.10 (18 Nov 2013) Y 136 - Dormant GPIO 1.00 - 128 Loaded GPIO 1.00 (24 Jun 2021) Y - 131 Loaded Fat32fs 1.54 (02 Mar 2020) Y This is all a bit theoretical in that I have not tried to use the GPIO module and is not to say that a later ROM is not required. The current OS5.29 is at a late beta stage in its development into OS5.30, with lots of bugs fixed. In real terms it might be more stable in use than OS5.28. |
Gareth Lock (2186) 51 posts |
Not in front of the machine at the moment, IIRC it’s the early 2020 variant of 5.28 though… I guess I was wondering/experimenting how much you could softload to fix the issue without updating the ROM… I guess I’ve just found the limit… Will have another play when I get back from work this afternoon… |
David Pitt (9872) 363 posts |
The changes required are in the HAL, there is no way around that. That ROM needs updating. The current OS5.28 is all but identical to the first issue, the only change is to the HAL to accommodate later Pi’s, the bit that is required in this case. |
Gareth Lock (2186) 51 posts |
Thanks David for confirming what I guess I’d sort of figured out for myself… Will mess around sorting that out tonight… |
Dave Higton (1515) 3534 posts |
Gareth: I update my desktop machine’s ROM frequently with the latest CI version. Warnings of possible problems are, in my experience, overdone. It does occasionally go wrong (I can remember one thing going wrong, and it took an embarrassingly long time to be reverted), but I keep several earlier known working ROMs to go back to. I have 231209/IMG, 231216/IMG, 240109/IMG and 240128/IMG, and I’m running with a copy of the last one. This is with a Pi 3B+, but I think similar considerations apply to all platforms. |
George T. Greenfield (154) 749 posts |
As a matter of interest, how often do you update HD4? Or do you just drop the new ROM into !Boot.Loader.CONFIG.TXT (while the latter is straightforward, the former can be a bit of a PITA)? |
Dave Higton (1515) 3534 posts |
Much less often than I feel I ought to.
I keep the new and a small number of recent known good ROMs on the SD card with filenames based on date, e.g. 240228/IMG, and copy the one I want as RISCOS/IMG. So it’s dead easy to revert if necessary; doesn’t even need an editor. In theory it should be possible on a foreign system if the worst comes to the worst, but it never has so far. The fundamental requirement is a FAT partition big enough to hold a few ROMs. Mine’s set at 32 MB (or MiB, I forget which). |