It should be defined as deviceinfo_codename
in /etc/deviceinfo
.
this post was submitted on 10 Oct 2021
1 points (100.0% liked)
postmarketOS
1026 readers
1 users here now
postmarketOS - a real Linux distribution for phones and other mobile devices 🐧 📱 👩💻
Rules:
- Be nice, follow CoC
- Don't ask for device ports, consider DIY
- Report bugs in the issue tracker (not here! 🐛)
See also:
founded 4 years ago
MODERATORS
Thanks, it’s indeed there on both of my test devices.
Yep, /etc/deviceinfo
exists for all devices in postmarketOS. So if you want to do a quick hack, you can simply source the file in a shell script and add logic based on the codename defined there.
If you want a distro-agnostic solution, use the device-tree string, e.g.:
$ cat /proc/device-tree/compatible
pine64,pinephone-1.2pine64,pinephoneallwinner,sun50i-a64
This is what we use in megapixels for example.