Created
November 24, 2017 23:00
-
-
Save adventureloop/37a9c523e989530ac2f28a06bf93664a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Title: FreeBSD on the GPD Pocket | |
Tags: hardware freebsd drivers kernel gpdpocket | |
Date: 2017-08-22 | |
Preview: FreeBSD on the GPD Pocket | |
Permalink: 0288 | |
In the distant past before smart phones became identical black rectangles there | |
was a category of devices called [palmtops][0]. Palmtops were a class of PDA PC | |
thing that fit in the palm of your hand. Today the Psion 5 series of devices | |
most often capture peoples attention. Not only are they small and awesome, but | |
they have something like a real keyboard. | |
This form factor is so popular that there are [projects trying to update Psion | |
5 devices][1] with new internals. The Psion 5 is the sort of device I have | |
complained isn't made for a long time, at some point I picked one up on ebay | |
with the intention of [running the NetBSD port][4] on it. | |
Earlier this year the world caught up and two big crowd funding projects | |
appeared for modern Psion like palmtop devices. Neither the [Gemini][3] or the | |
[GPD Pocket][2] campaigns convinced me that real hardware would ever appear. In | |
May reviews of the GPD Pocket started to appear and I became aware of people | |
that had backed and received their earlier campaign for the [GPD WIN][5]. | |
With a quirk in indiegogo allowing me to still back the campaign I jumped on | |
board and ordered a tiny little laptop computer. | |
![GPD Pocket vs Psion 5mx](/images/gpdpocketvspsion5mx.jpg "GPD Pocket vs Psion 5mx") | |
## FreeBSD | |
[FreeBSD][6] is the only choice of OS for a [pc computer][13]. Support is good enough | |
that I could boot and install without any real issues, but there was enough | |
hardware support missing that I wanted to fix things before writing a blog post | |
about it. | |
Somethings don't work out of the box others will need drivers before they will | |
work: | |
- ~~Display rotation~~ | |
- WiFi (broadcom 4356) | |
- Bluetooth (broadcom BCM2045A0) | |
- Audio (cherry trail audio chrt54...) | |
- Graphics | |
- ~~Nipple~~ | |
- USB C | |
- ~~Keyboard vanishes sometimes~~ | |
- Battery | |
- Suspend | |
- Touch Screen (goodix) | |
- fan (there is some pwm hardware) | |
- backlight | |
- ~~I2C~~ | |
- gpio | |
## Display | |
The most obvious issue is the display panel, the panel it self reports as being | |
a high resolution portrait device. This problem exists in the bios menus and | |
the windows boot splash is rotated for most of the time. | |
![GPD Pocket FreeBSD bootsplash](/images/gpdpocketfreebsdbootsplash.jpg "GPD Pocket FreeBSD bootsplash") | |
Of course the FreeBSD bootsplash and framebuffer are also rotated, but a little | |
neck turning makes the installer usable. Once installed we can address the | |
rotated panel in X, accelerated graphics are probably in the future for this | |
device, but the X framebuffer drive is good enough for FreeBSD hacking. | |
With X we can sort of the rotation problem. `xf86-video-scfb` is [required to | |
use the framebuffer][7]. | |
# pkg install xf86-video-scfb | |
And the following lines have to be added to | |
`/usr/local/etc/X11/xorg.conf.d/driver-scfb.conf` | |
Section "Device" | |
Identifier "Generic FB" | |
Driver "scfb" | |
Option "Rotate" "CW" | |
EndSection | |
Section "Device" | |
Identifier "Card0" | |
Driver "scfb" | |
EndSection | |
![GPD Pocket FreeBSD](/images/gpdpocketfreebsd.jpg "GPD Pocket FreeBSD") | |
The screen resolution is still super high, there doesn't seem to be anyway to | |
do DPI hinting with the framebuffer driver (or in i3 at all), but I can make | |
terminals usable by cranking up the font size. | |
## Keyboard and touchpoint | |
A Keyboard is vital for a usable computer, out of the box the keyboard works, | |
but the [touch point][8] does not. Worse, touching the touch point caused the | |
built in USB keyboard to die. | |
Some faffing trying to debug the problem with [gavin@][9] at [BSDCam][10] and | |
we got both keyboard and mouse working. For some reason my planck keyboard | |
presents as a mouse among other things, pluggin in a mouse and power cycling | |
the USB device caused [ums(4)][11] to correctly probe and attach. | |
Manually loading `ums(4)` at boot got the touch point working correctly. In | |
fact, `ig4(4)` also attaches when manually loaded. | |
Add these lines to `/boot/loader.conf` | |
ums_load="YES" | |
ig4_load="YES" | |
The [dmesg][12] shows some problems with ACPI probing, this is probably the | |
source of some of the device problems. | |
## Other devices | |
Wifi, bluetooth and graphics are bigger problems that will hopefully be caught | |
up in others work and made to work soon. The touchscreen controller is adding a | |
driver and support for Cherry View GPIO, there are datasheets for these and I am | |
working on them. | |
No battery level indicator makes it annoying to use the GPD Pocket out and | |
about. Without a driver the charge controller is using a really low current to | |
recharge the battery. Datasheets are quite readily available for these devices | |
and I am writing drivers now. | |
## GPD Pocket | |
The Pocket is a great little device, I think its 'cuteness' makes everyone fall | |
in love with it on first sight. I am really looking forward to getting the | |
final things working and using this as a daily device. | |
[0]: https://en.wikipedia.org/wiki/Palmtop_PC | |
[1]: https://hackaday.io/project/4042-psio | |
[2]: https://www.indiegogo.com/projects/gpd-pocket-7-0-umpc-laptop-ubuntu-or-win-10-os-laptop--2#/ | |
[3]: https://www.indiegogo.com/projects/gemini-pda-android-linux-keyboard-mobile-device-phone#/ | |
[4]: http://wiki.netbsd.org/ports/epoc32/ | |
[5]: https://www.indiegogo.com/projects/gpd-win-intel-z8700-win-10-os-game-console-laptop#/ | |
[6]: http://adventurist.me/tag/freebsd | |
[7]: https://wiki.freebsd.org/Graphics/SCFB | |
[8]: https://xkcd.com/243/ | |
[9]: https://wiki.freebsd.org/GavinAtkinson | |
[10]: https://wiki.freebsd.org/DevSummit/201708 | |
[11]: https://www.freebsd.org/cgi/man.cgi?query=ums&sektion=4 | |
[12]: http://dmesgd.nycbug.org/index.cgi?do=index&fts=gpd+pocket | |
[13]: https://youtu.be/Q77YBmtd2Rw?t=22s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment