-
Notifications
You must be signed in to change notification settings - Fork 205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ioctl_set_msg failed:-1
from rpi-eeprom-config
after reboot
#647
Comments
What does "vcgencmd bootloader_config" report in this configuration? That's a rather larger EEPROM config but should be legal |
Same output:
The configuration does appear to have applied, as
… which includes |
Error -1 is -EPERM. Running under strace, i.e. |
Additionally, almost the same configuration file (with the |
Running on the Pi 400 I have to hand eventually gets to:
|
… so it seems to be the VCIO driver which is unhappy, even though other And also note that the only system change between this command working and now when it doesn't was uploading the new configuration and then rebooting… although that could be due to a formerly loaded module now not being automatically loaded? Update: I've loaded every module for the current kernel, and I'm still getting the same error. |
Does it still fail if you make the configuration file smaller e.g. delete the comments to get it under 2K ? |
Hmm - it seems not: I've reduced the length to 1677 characters and I'm still seeing the same behaviour. I guess that either means that this occurs well below 2k in size, that once the problem is triggered it keeps happening, or that it's related to the latest firmware or kernel releases (as both were updated between when this last worked as anticipated and now). Is there any way (… short of recompiling the kernel with an updated driver with debug enabled?) to get more information about what's causing the ioctl syscall on the |
I think the limit is probably in vcgencmd in our utils repo. You can try increasing this constant: https://github.com/raspberrypi/utils/blob/master/vcgencmd/vcgencmd.c#L44 |
Happy to give that a try! Are you able to tell me the physical limit/size of the EEPROM area reserved for bootloader configuration that sets an upper-limit for this constant? |
For now, just make it 10 times larger to see if it fixes the problem. |
That's got it - I increased This post - https://forums.raspberrypi.com/viewtopic.php?t=243549 seems to suggest that RPi4/CM4 models have 512KiB EEPROM capacity… should this therefore be the limit in https://github.com/raspberrypi/utils/blob/master/vcgencmd/vcgencmd.c#L44? |
Were the legitimate, useful content to expand to the point that an existing EEPROM configuration no longer fitted, the tools would fail and users would get upset. It's much better to set a sensible limit that we will always support and that cannot be exceeded - 4kB feels about right, but I wouldn't object to 2kB. |
4K is a safe bet, it certainly won't exceed 8KB because there isn't enough free space in the Pi4/CM4 SPI flash to have a larger config file! |
Describe the bug
I used
EDITOR=vim rpi-eeprom-config -e
to create a ~2248-byte firmware configuration file on a series of CM4 devices with the latest firmware (1733575168
/Sat 7th Dec) - this change was accepted and an update written to apply on reboot.After rebooting, however, I can't recall the current configuration:
So there appear to be two issues here:
rpi-eeprom-config
has allowed a configuration to be deployed which it can't later read-back;If there is an error, then
rpi-eeprom-config -e
will open an editor with the error message, rather than erroring-out - potentially allowing a valid configuration to be overwritten with the error message if the user isn't careful to erase the content and save before exiting their editor (which is likely non-obvious to most users, even those making low-level changes such as firmware configuration edits).Steps to reproduce the behaviour
Upload the following firmware configuration file with
EDITOR=vim rpi-eeprom-config -e
:Device (s)
Raspberry Pi CM4
Bootloader configuration.
Previous configuration (from
backup
directory) read:System
Gentoo userland
Bootloader logs
USB boot
No response
NVMe boot
No response
Network (TFTP boot)
No response
The text was updated successfully, but these errors were encountered: