Jump to content

PINE64 PineNote (pine64-pinenote)

From postmarketOS Wiki
PINE64 PineNote
The PineNote showing a pdf
The PineNote showing a pdf
Manufacturer PINE64
Name PineNote
Codename pine64-pinenote
Released 2021
Type ebook reader
Hardware
Chipset Rockchip RK3566
CPU 4x 2Ghz Cortex-A55
GPU Mali G52 2EEUsing ebook reader hardware
Display 1404x1872 e-paper
Storage 128 GB
Memory 4GB
Architecture aarch64
Software
Original software
The software and version the device was shipped with.
Debian 13
Extended version
The most recent supported version from the manufacturer.
Debian
postmarketOS
Category testing
Mainline
Instead of a Linux kernel fork, it is possible to run (Close to) Mainline.
yes
Device package device-pine64-pinenote
Kernel package linux-pine64-pinenote
Features
Flashing
It is possible to flash the device with pmbootstrap flasher.
Works
USB Networking
After connecting the device with USB to your PC, you can connect to it via telnet (initramfs) or SSH (booted system).
Broken
Battery
Charging and battery level reporting works
Works
Screen
Display works. Ideally with sleep mode and brightness control.
Works
Touchscreen
Works
Multimedia
3D Acceleration
Works
Audio
Audio playback, microphone, headset and buttons.
Works
Connectivity
WiFi
Works
Bluetooth
Works
Miscellaneous
FDE
Full disk encryption and unlocking with unl0kr.
Broken
USB OTG
USB On-The-Go or USB-C Role switching
Works
Sensors
Accelerometer
Auto screen rotation works in desktops e.g. Phosh or Plasma Mobile
Works


The PineNote is a 10.3" e-ink tablet produced by Pine64 for the Linux mobile community. For information on optimizing application for e-ink displays, please go to this page.

Installation

The latest Community edition of the PineNote ships with a Debian image that is setup for dual-booting, while the Developer edition shipped with Android. If you still have Android on your device, these steps will not work. Please refer to PNDeb's guide to upgrade your PineNote to the Community edition.

Build image

First, lets build the postmarketOS image with pmbootstrap. Currently, only Sway has been optimized for this device. Support for Gnome, based on the stock configuration, is in the works. Depending on the configuration, you may need to add some extra space to the initial rootfs.

$ pmbootstrap init # pine64 pinenote
$ pmbootstrap install

Boot rockusb mode

The device is only flashable using the rkusb bootloader mode. This can be done with the opensource rkdeveloptool utility avilable on Alpine's testing branch or from https://gitlab.com/pine64-org/quartz-bsp/rkdeveloptool.

To trigger the bootloader hold a magnet near the top right of the back of the device of the pinenote while powering it. There is a small circle printed on the back cover indicating the correct location for the magnet.

When it's booted correctly into bootloader mode it should show up in the device list of rkdeveloptool:

$ rkdeveloptool ld
DevNo=1 Vid=0x2207,Pid=0x350a,LocationID=100    Loader

As the standard SPL does not have all the necessary commands, we have to boot into Rockchip's proprietary SPL. As it is packaged by the device's u-boot package, it is already available in the installation's chroot:

$ rkdeveloptool reboot-maskrom
$ rkdeveloptool boot ~/.local/share/pmbootstrap/chroot_rootfs_pine64-pinenote/usr/share/u-boot/pine64-pinenote/rk356x_spl_loader_v1.12.112.bin

Backup important partitions

The device includes some important firmare blobs on its storage, which we should backup. While this installation process does not touch these partitions, these blobs are unique to each device, and should be kept safe.

$ rkdeveloptool read 0 41943040 first_40mb_of_disc.img
$ rkdeveloptool read-partition waveform part_waveform.img

Repartition storage

We need then to repartition the storage, as there isn't by default a seperate kernel partition. The partition table is set by a seperate partition-table.txt file and must contain:

mtdparts=rk3566mmc:0x3FC0@0x40(idbloader),0x20000@0x4000(uboot),0x1000@0x24000(waveform),0x800@0x25000(uboot_env),0x20000@0x25800(logo),0x85800@0x45800(boot:bootable),-@0xcb000(os1:grow)

With this file we can flash the new partition table:

$ rkdeveloptool write-partition-table partition_table.txt

Flash the images

After this step, we are ready to flash the system by starting with the u-boot:

$ rkdeveloptool write-partition idbloader ~/.local/share/pmbootstrap/chroot_rootfs_pine64-pinenote/usr/share/u-boot/pine64-pinenote/idbloader.img
$ rkdeveloptool write-partition uboot ~/.local/share/pmbootstrap/chroot_rootfs_pine64-pinenote/usr/share/u-boot/pine64-pinenote/u-boot.itb

And then the actual system partitions. You may need to to reset the device between flashing the rootfs and kernel and putting it back into rockusb mode.

$ pmbootstrap flasher flash_rootfs
$ pmbootstrap flasher flash_kernel

Run pmbootstrap shutdown to exit out of pmbootstrap, and reboot via long-pressing the power button. The first boot will take a few moments as the system is first setup.

Contributors

  • MartijnBraam
  • Petr Hodina
  • Casey Connolly
  • Antoine Martin (ayakael)

Users owning this device

Recover from a broken bootloader

If uboot image is overwritten the rockusb mode won't work anymore. The device might boot into maskrom mode in which case it should show up in `rkdeveloptool list` as maskrom. If the uboot image is partially overwritten but still recognized by the maskrom it won't stay in maskrom mode and you'd have to open the back of the device and short TP1301 and TP1302 while powering up. This will make eMMC reads fail so maskrom always runs.

Once the device is in maskrom mode the only thing you can do is push a new loader into ram and start that.

$ rkdeveloptool list
here it lists maskrom now

The .bin file is build by u-boot and might have a slightly different version
$ rkdeveloptool db rk356x_spl_loader_v1.04.108.bin
$ rkdeveloptool ptt
now it's able to read flash and list the partitions

Waveform

There exists a GNOME Shell extension for selecting the waveform for the panel. The waveform affects the quality and speed of the refresh. Different waveforms

You can also adjust waveform settings using sysfs parameters under /sys/module/rockchip_ebc/parameters

Waveform parameters
Parameter Function Possible values
bw_mode Sets black and white mode of display 0: grayscale, 1: bw + dithering, 2: bw, 3: DU4 waveform
bw_threshold Sets threshold where pixel is considered white or black. If default, all pixel values lower than 7 will be cast to 0 (left), and all values larger larger or equivalent will be cat to 15 (white) 0-15, 7 is default
auto_refresh Global refreshes are triggered based on the area drawing using partial refreshes, in units of total screen area. 0: enabled, 1: disabled (default)
refresh_threshold Global refreshes are triggered based on the area drawing using partial refreshes, in units of total screen area. 20 is default
refresh_waveform Sets the waveform to use for global refreshes. 4 is default
dclk_select Controls how fast data is sent to the ebc display, allowing for a "quality" mode that reduces visible artifacts as much as possible, with the downside of having bad latency, and a "performance" mode where speed is gained at the expense of visual quality. 0: quality mode (default), 1: performance mode

dclk_select changes should also be accompanied with a display mode change. On the debian image, "quality" mode is associated with a 5hz refresh rate, while "performance" is 80hz.

The following command, after installing pinenote-dbus-service and starting the pinenote service, can force a refresh of the screen:

$ dbus-send --system --print-reply --dest=org.pinenote.ebc /ebc org.pinenote.ebc.TriggerGlobalRefresh

See also