-
Notifications
You must be signed in to change notification settings - Fork 33
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
Small fixes: use /dev instead of /tmp for mailbox, fixed unmapmem() to avoid exit(-1) at ws2811_fini, use 249 as device major to avoid crash on Kernel >=4.1 #2
base: master
Are you sure you want to change the base?
Conversation
…e a file system that does not allow creating character devices.
…uests. In particular, munmap() often failed because in case of a non-page-aligned mapping, the value passed to munmap() was different from what mmap() originally returned. This caused programs to exit with -1 at ws2811_fini(). This is a problem when exit codes are actually evaluated.
I've started getting reports of issues with this library and permissions errors/missing devices in /tmp, is this fix somewhat related? I'm going to give it a try in our Unicorn HAT library either way. |
I have the same behavior, seems like the program can create the /tmp/mailbox-XXXX but can't open it. I added this code to the mbox_open() function in mailbox.c: if (file_desc < 0) { And return this: /tmp/mailbox-3725: character special |
Sorry, I forgot mention my kernel info: uname -a |
@Gadgetoid yes, this fix is related. The regular tmpfs (ram disk file system) cannot have character device nodes, so if /tmp is mapped to a tmpfs (as it is on minibian, a stripped down flavor of the Raspian distribution) the original library does not work. |
Looks like this fix is related to the Minibian issue, but not to the new one that has developed as of Kernel 4.1.6 which is what @tejonbiker is referring to. I've updated the firmware on a Pi and confirmed the problem- since there's no way of raising issues against this repository, and it's off-topic for this PR, I've raised a new one upstream for discussion: jgarff#41 |
…e for mailbox must not use reserved major number 100 (telephony for linux). Fix is to use a number in the 240..254 range (local/experimental use), as a commenter on github recommended, I chose 249. See "devices.txt" Linux doc file for a list of device major numbers
Take a look at this, with the changes from the link rpi_ws281x works fine for me. |
No description provided.