maruel
-
Posts
3 -
Joined
-
Last visited
Content Type
Forums
Store
Crowdfunding
Applications
Events
Raffles
Community Map
Posts posted by maruel
-
-
That's my point; /dev/gpiomem was created to give only access to a few Kb of non translated memory without compromising on security.
I'd rather have my GPIO using apps not run as root and/or be able to poke into the kernel's memory as a user.
-
tkaiser, udev rules files can be easily added by a user as root. So it's not a big deal if it is not done in the image, it can be fixed afterward.
On the other hand, /dev/gpiomem has real benefit to run gpio apps fast (read the pin directly from the CPU register), without using gpio sysfs, without requiring root. This is a pure "Raspbianism" but I think it's a good feature to be looked into.
This requires writing a kernel driver something like https://github.com/raspberrypi/linux/blob/rpi-4.4.y/drivers/char/broadcom/bcm2835-gpiomem.cbut for other processors. That's harder to do for a end user than adding udev rules.
Allwinner A64: As per http://files.pine64.org/doc/datasheet/pine64/Allwinner_A64_User_Manual_V1.0.pdf page 73~75 and page 81, base address 0x01C20000 for a few Kb could be mapped the same way. http://dl.linux-sunxi.org/H3/Allwinner_H3_Datasheet_V1.0.pdfpage 90 implies that Allwinner H3 uses a similar memory mapping so it could probably be shared at least for these two processors.
Amlogic S905: I did a quick peek at datasheet at http://dn.odroid.com/S905/DataSheet/S905_Public_Datasheet_V1.1.4.pdfpage 45 and 80, tells 0xc8834000 being the interesting base address.
I didn't look for other processors.
I have no linux kernel dev experience though so it may take a while for me to create a functional one, albeit copy pasting the raspbian's one (yay GPL I guess?).
Does this sound like a "good" idea?
[RfC] Make Armbian more IoT friendly?
in Armbian build framework
Posted