Difference between revisions of "PineNote: Getting Started"

From PINE64
Jump to navigation Jump to search
(→‎Stock Partition Layout: Updated with output from newer rkdeveloptool and described some of the partitions)
Line 48: Line 48:


=== Stock Partition Layout ===
=== Stock Partition Layout ===
Backups: https://pwarren.id.au/pinenote/partitions/


Copied from DorianRudolph's github instructions (link at the end of this document):
As output by the [https://github.com/rockchip-linux/rkdeveloptool rkdeveloptool] <code>ppt</code> (print partition) command:
 
<pre>
<pre>
> rkdeveloptool list-partitions                     
**********Partition Info(GPT)**********
#  LBA start (sectors)  LBA end (sectors)  Size (bytes)       Name                 
NO LBA      Name                 
00               16384              24575      4194304      uboot
00 00004000  uboot
01               24576              32767      4194304      trust
01 00006000  trust
02               32768              36863      2097152      waveform
02 00008000  waveform
03               36864              45055      4194304      misc
03 00009000  misc
04               45056              53247      4194304      dtbo
04 0000B000  dtbo
05               53248              55295      1048576      vbmeta
05 0000D000  vbmeta
06               55296            137215      41943040      boot
06 0000D800  boot
07               137216            145407      4194304      security
07 00021800  security
08               145408            407551    134217728      recovery
08 00023800  recovery
09               407552            1193983    402653184      backup
09 00063800  backup
10             1193984            3291135    1073741824      cache
10 00123800  cache
11             3291136            3323903      16777216      metadata
11 00323800  metadata
12             3323904            9697279    3263168512      super
12 0032B800  super
13             9697280            9730047      16777216      logo
13 0093F800  logo
14             9730048            9861119      67108864      device
14 00947800  device
15             9861120          241827775 118766927872      userdata
15  00967800  userdata
</pre>
</pre>
In order, the partitions are:
* <code>uboot</code>: holds the [https://en.wikipedia.org/wiki/Das_U-Boot Das U-Boot] open-source bootloader for embedded systems
* <code>trust</code>: holds secrets such as keys; while such secrets are usually stored in NV-RAM or in a TPM, they can also be stored in a partition encrypted by a key held in a TPM
* <code>waveform</code>: holds files specifying the voltage waveforms applied to the charged particles in the e-ink screen to manipulate them into displaying a desired image
* <code>misc</code>: stores miscellaneous files needed by the firmware
* <code>dtbo</code>: stores device tree binary files, a description of the hardware configuration of the device
For backup, the stock partition images are available for download [https://pwarren.id.au/pinenote/partitions/ here].


== General Overview of Linux Installation Process ==
== General Overview of Linux Installation Process ==

Revision as of 17:30, 5 December 2022

This page or section is under construction

Please help to review and edit this page or section. Information are subject to change.

This page is a work in progress. Its goals are to help users get their devices up and running while minimizing redundancy with other pages (e.g., Documentation, Development), and to synthesize information provided in existing guides. Sections below represent a rough outline and will need to be expanded with details and further instructions.


Who Can Contribute

Anyone! Generally, the PineNote is in a very early state, and at least an intermediate level of linux knowledge is probably necessary to be able to do anything at this moment. That said, there are multiple efforts happening at once, and there are a number of ways a person of any skill level can help:

  1. Join in the ongoing documentation effort here: PineNote Documentation.
  2. Help mainline the kernel by testing, fixing bugs.

Out of the Box

Information on software shipped with the Pinenote

As of July 2022, the Pinenote ships with a modified version of android. Under this OS, users interested only in reading ebooks and possibly leaking data to unknown parties may find the device more than satisfactory (read: use caution when handling ultra personal or sensitive data). All hardware items are functional with this OS, though the ability to tune and tweak may be limited by the proprietary nature of some drivers (e.g., the driver for the e-ink display). Ongoing support for this OS is absent, though further community development is possible and hoped for by more than a few users already.

Apps preloaded with this OS include:

  • Xphoto
  • WPS Office Lite
  • Browser from Tencent (would urge users to replace/remove)
  • Core: Notes (stylus-driven note app), Local Storage (file browser), Task List (notes list with text and handwriting input)
  • Application Management
  • More Settings

Additional apps may be added via the included browser; for example, F-droid can be installed and then used to install further android apps.

The main bar drawn along the screen's top edge features buttons for accessing the following, from left-to-right:

  • Home (house icon; opens additional bar along the screen's left edge for accessing notes and file management apps)
  • Refresh screen
  • Installed Apps (four squares)
  • Active Apps (bulleted list of three lines)
  • Settings (gear icon)
  • Back
  • Wifi Menu
  • Bluetooth Stylus Menu (pairing included stylus allows use of hardware buttons on the stylus)

When hidden by an open app, this bar can be made to reappear by swiping downward anywhere along the screen's top edge.

Accessories included in the box

As of July 2022, the Pinenote ships with the following items in the box:

  • Pinenote (duh)
  • Stylus
  • USB-c to USB-a cable
  • USB-c to micro-b cable (for stylus)
  • UART dongle

Stock Partition Layout

As output by the rkdeveloptool ppt (print partition) command:

**********Partition Info(GPT)**********
NO  LBA       Name                
00  00004000  uboot
01  00006000  trust
02  00008000  waveform
03  00009000  misc
04  0000B000  dtbo
05  0000D000  vbmeta
06  0000D800  boot
07  00021800  security
08  00023800  recovery
09  00063800  backup
10  00123800  cache
11  00323800  metadata
12  0032B800  super
13  0093F800  logo
14  00947800  device
15  00967800  userdata

In order, the partitions are:

  • uboot: holds the Das U-Boot open-source bootloader for embedded systems
  • trust: holds secrets such as keys; while such secrets are usually stored in NV-RAM or in a TPM, they can also be stored in a partition encrypted by a key held in a TPM
  • waveform: holds files specifying the voltage waveforms applied to the charged particles in the e-ink screen to manipulate them into displaying a desired image
  • misc: stores miscellaneous files needed by the firmware
  • dtbo: stores device tree binary files, a description of the hardware configuration of the device

For backup, the stock partition images are available for download here.

General Overview of Linux Installation Process

Todo: This section should provide instructions for using UART, adb and rkdeveloptool on the Pinenote for users unfamiliar with or new to any of them.

Prerequisites

  • This section should provide the user with a listing of required software, e.g., for cross-compiling; communicating via UART, etc.
  • The following sections should walk the user through the process of going from a factory-fresh device to a functional e-ink tablet running linux.

Setting up Partitions

For dual boot

For linux alone

Modifying the Bootloader

Without modifying the bootloader, u-boot will automatically load android. Under these circumstances, an alternative OS may be loaded by manually inputting commands to the u-boot terminal, which must be accessed by sending an interrupt signal (ctrl+c) to the device via UART during boot. Thus modifying u-boot is not, strictly speaking, necessary but will be desirable for most users wishing to use linux as their primary OS in a dual boot arrangement.

There exists more than one approach to avoid having to do this each time the device is restarted. Two of these are detailed below.

Option 1: Build U-boot from Scratch

reference: https://github.com/JoshuaMulliken/pinenote_uboot

Option 2: Extract and Modify Existing U-boot Image

reference: https://gist.github.com/charasyn/206b2537534b6679b0961be64cf9c35f

Installing Linux

References:

Kernel Compilation

(for now, see links above)

Tweaks and Useful Apps

Links to dotfiles, configuration examples, etc.


Additional information on experimental EBC driver patch(es):

Copied from Pinenote chat:

Everything is controlled using the sysfs parameters in /sys/module/rockchip_ebc/parameters
By default you need to write as root, but this can be easily changed via udev rules.

Enabling auto refresh:
echo 1 > /sys/module/rockchip_ebc/parameters/auto_refresh

global refreshes are triggered based on the area drawing using partial refreshes, in units of total screen area.

echo 2 > /sys/module/rockchip_ebc/parameters/refresh_threshold

therefore will trigger a global refresh whenever 2 screen areas where drawn.