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

Problem With Non Raspberry OS #32

Open
DSH850 opened this issue Jul 1, 2023 · 5 comments
Open

Problem With Non Raspberry OS #32

DSH850 opened this issue Jul 1, 2023 · 5 comments

Comments

@DSH850
Copy link

DSH850 commented Jul 1, 2023

My Raspberry Pi 3 on Debian 12 is giving me the following errors when txtempus is run.

non-existent Revision: Could not determine Pi model
mmap error: : Operation not permitted
MMapping from base 0x3f000000, offset 0x200000
Need to be root

All of this is conjecture on my part as I am not a programmer, but after poking around the code, it appears that the programming is using /proc/cpuinfo to determine the needed information on model etc. Unfortunately it also appears that the /proc/cpuinfo information provided by the Raspberry Pi OS is non standard (at least it doesn’t match the Debain or Slackware versions) and gives more information than was intended. Is it possible for the code to query the needed information from the user when needed, so it can be used on all Raspberry Pis regardless of the OS?

@hzeller
Copy link
Owner

hzeller commented Jul 1, 2023

If txtempus gives out that message, then it would fall back to Raspberry Pi 3, so that should probably just work in your case.

But you need to be root to be able to access the GPIO pins. Did you start txtempus with sudo ?

@DSH850
Copy link
Author

DSH850 commented Jul 1, 2023

I su to root rather than have a user with sudo privileges, so I ran it as root.

@hzeller
Copy link
Owner

hzeller commented Jul 1, 2023

it couldn't memory map the GPIO area of the Raspberry Pi, that should not be dependent on the operating system (I used it at least with DietPi). This is why it looks like you're not running as root.

Anyway, if you're running a non-standard operating system on your Pi, you'll have to figure out the details involved getting it to run.

@DSH850
Copy link
Author

DSH850 commented Jul 2, 2023

OK. Thanks. It was worth a shot.

@lachesis
Copy link

lachesis commented Nov 5, 2023

I'm running Debian 10 on my Pi Zero W v1.1. Debian sets CONFIG_STRICT_DEVMEM=y which blocks mmapping on /dev/mem unless you pass iomem=relaxed on the kernel command line (by editing /boot/firmware/cmdline.txt). This may not apply in OP's specific situation but leads to a similar error, so I found myself here.

https://wiki.debian.org/RaspberryPi4#GPIO_support

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