Skip to content
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

Error: Failed to read nvram contents #33

Open
OpenSauce04 opened this issue Jan 23, 2025 · 6 comments
Open

Error: Failed to read nvram contents #33

OpenSauce04 opened this issue Jan 23, 2025 · 6 comments

Comments

@OpenSauce04
Copy link

Running doas asahi-bless -l throws the following error:

Error: Failed to read nvram contents, try running with sudo? Inner error: Os { code: 2, kind: NotFound, message: "No such file or directory" }

I am using the sys-apps/asahi-bless ebuild from the official Gentoo repositories.

@WhatAmISupposedToPutHere
Copy link
Collaborator

Please run ls /dev/mtd/by-name/ and post the output here. Also include the version of asahi-bless and if you are installing the kernel from sources, attach your kernel config

@OpenSauce04
Copy link
Author

OpenSauce04 commented Jan 23, 2025

ls: cannot access '/dev/mtd/by-name/': No such file or directory

asahi-bless 0.4.1
I am using the asahi-kernel package from the asahi Gentoo overlay: https://github.com/chadmed/asahi-overlay/tree/main/sys-kernel/asahi-kernel

@WhatAmISupposedToPutHere
Copy link
Collaborator

Make sure you are running the latest kernel, latest u-boot, and latest m1n1. After you did all that, run update-m1n1 one more time just to be sure and reboot.

@OpenSauce04
Copy link
Author

Did those steps, still nothing there
I did notice however that while there isn't an /dev/mtd directory, there are files named /dev/mtd0 and /dev/mtd0ro. Do these have anything to do with this?

@WhatAmISupposedToPutHere
Copy link
Collaborator

Those are the non-renamed versions of the relevant nvram device. The kernel has been changed to rename them to files under /by-name/, and that is where asahi-nvram looks for it. If kernel isn't renaming them for you, it means that your device trees are old.

@jannau
Copy link
Member

jannau commented Jan 25, 2025

/dev/mtd/by-name/* are created by udev rules. I would say supporting platforms not following defaults shouldn't be expected. However asahi-bless was missing an option to override the mtd device like the other commands. #34 adds -d DEVICE / --device DEVICE.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants