<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.pine64.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=C2c0</id>
	<title>PINE64 - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.pine64.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=C2c0"/>
	<link rel="alternate" type="text/html" href="https://wiki.pine64.org/wiki/Special:Contributions/C2c0"/>
	<updated>2026-05-16T23:52:32Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.37.1</generator>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PineNote_Development/Apps&amp;diff=20159</id>
		<title>PineNote Development/Apps</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PineNote_Development/Apps&amp;diff=20159"/>
		<updated>2023-07-30T06:12:54Z</updated>

		<summary type="html">&lt;p&gt;C2c0: Xournal++ release 1.2&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page lists applications and tweaks for the [https://wiki.pine64.org/wiki/PineNote PineNote].&lt;br /&gt;
&lt;br /&gt;
== Development ==&lt;br /&gt;
&lt;br /&gt;
Here are some resources you may find helpful in learning to develop on embedded Linux devices:&lt;br /&gt;
* Great YouTube series introducing you to the kernel and lower-level components of Linux: https://www.youtube.com/watch?v=WiZ05pnHZqM&lt;br /&gt;
* https://embetronicx.com/&lt;br /&gt;
* https://bootlin.com/training/&lt;br /&gt;
* https://www.nand2tetris.org&lt;br /&gt;
&lt;br /&gt;
Emulator recommendation for developing and testing PineNote apps: https://github.com/michaelshiel/picom-epaper&lt;br /&gt;
&lt;br /&gt;
The PineNote is a specialized device, mainly due to the eink display having unique display and refresh characteristics.&lt;br /&gt;
Finding and configuring apps that work well sometimes requires a lot of tweaking and a lot exploring, especially for&lt;br /&gt;
applications containing fast screen updates and animations, as well as depend on a lot of colors.&lt;br /&gt;
&lt;br /&gt;
[https://www.youtube.com/watch?v=ZCLyJfbzbrU Here is a video] showing the performance of a few applications.&lt;br /&gt;
&lt;br /&gt;
== Desktop Environments ==&lt;br /&gt;
&lt;br /&gt;
=== Sway ===&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/hmpthcs/WinkShell WinkShell] &amp;quot;Collected applications, configurations and scripts for using a wlroots-based compositor with an EPD (aka e-ink display). Currently supports Sway only.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/0cc4m/pinenote-misc/blob/main/sway/config/sway/config 0cc4m's config]&lt;br /&gt;
&lt;br /&gt;
==== Getting touch + pen working on sway ====&lt;br /&gt;
&lt;br /&gt;
If you notice that touching the screen works, but when you use the pen the mouse coordinates are inverted, don't worry! We can fix it! Set &amp;lt;code&amp;gt;rockchip_ebc.panel_reflection=0&amp;lt;/code&amp;gt; on boot (see [https://wiki.pine64.org/wiki/PineNote_Development/Building_Kernel#Configuring_the_driver this page] for more info). Add the following line to your sway config:&lt;br /&gt;
&lt;br /&gt;
 # This line rotates the mouse input by 180 degrees. See https://wayland.freedesktop.org/libinput/doc/1.11.3/absolute_axes.html&lt;br /&gt;
 input &amp;quot;type:table_tool&amp;quot; calibration_matrix -1 0 1 0 -1 1&lt;br /&gt;
&lt;br /&gt;
=== Gnome ===&lt;br /&gt;
&lt;br /&gt;
Gnome on wayland runs nicely on the PineNote. However, a slightly patched version of mutter is required at the moment.&lt;br /&gt;
&lt;br /&gt;
* See this repository for .deb packages and patch/compile files: [https://github.com/m-weigand/pinenote_debian_mutter Patched Debian Mutter for Bookworm]&lt;br /&gt;
* The ready-to-use [https://github.com/m-weigand/pinenote-debian-recipes/releases Debian image] provides a pre-configured GNOME environment], with specific GNOME configurations found [https://github.com/m-weigand/pinenote-debian-recipes/blob/main/overlays/gnome_config/01-pinenote-settings here]&lt;br /&gt;
* A GNOME extension is being [https://github.com/m-weigand/mw_pinenote_misc/tree/main/gnome_extension developed] that provides access to some of the ebc-specific driver options.&lt;br /&gt;
* [https://github.com/MichiMolle/PNEink PNEink] is a GNOME Theme for use with the PineNote&lt;br /&gt;
&lt;br /&gt;
==== GTK3 ====&lt;br /&gt;
High contrast style for eink-devices can be found [https://github.com/MichiMolle/gtk3-eink here].&lt;br /&gt;
&lt;br /&gt;
==== GTK4 ====&lt;br /&gt;
High contrast style for eink-devices can be found [https://github.com/MichiMolle/gtk4-eink here].&lt;br /&gt;
&lt;br /&gt;
== Application support on the PineNote ==&lt;br /&gt;
&lt;br /&gt;
=== System-Control ===&lt;br /&gt;
&lt;br /&gt;
A rust-based dbus service is being [https://github.com/m-weigand/pinenote_dbus_service developed] to enable easy, system-wide control over some of the PineNote-specific settings by users and programs (e.g., triggering global screen refreshes, changing waveforms, enabling/disabling dithering). Requires [https://github.com/m-weigand/linux/releases this kernel].&lt;br /&gt;
&lt;br /&gt;
=== Notetaking ===&lt;br /&gt;
&lt;br /&gt;
==== Xournal++ ====&lt;br /&gt;
Works well. Version 1.2 version offers repainting-related optimisations and supports PDF highlighting as well as links. To remove artefacts from the eraser set the eraser cursor's visibility to Never via Preferences -&amp;gt; Stylus -&amp;gt; Eraser Visibility. Also, disable GTK3 intertial scroll via Preferences -&amp;gt; Touchscreen -&amp;gt; Touch Scrolling -&amp;gt; Disable GTK's built-in intertial scroll, as this interferes with Xournal++'s internal touch event handling.&lt;br /&gt;
&lt;br /&gt;
Xournal++ uses anti-aliasing and interpolation, which do not work well for the A1 waveform. Mitigations include using either dithering or black-and-white mode in the ebc driver. https://gitlab.com/hrdl/pinenote-shared/-/blob/main/patches/xournalpp/0001-Disable-anti-aliasing-and-use-NEAREST-interpolation-.patch is an outdated patch that used to work well without changing the bw mode.&lt;br /&gt;
&lt;br /&gt;
Pre-compiled Debian packages with some of the PineNote-related modifications and support for triggering global refreshes after scrolling using the dbus service (see above) can be found [https://github.com/m-weigand/xournalpp_pn/releases here]&lt;br /&gt;
&lt;br /&gt;
==== Obsidian ====&lt;br /&gt;
Works well, EInk-Theme can be found [https://github.com/MichiMolle/obsidian-eink here].&lt;br /&gt;
&lt;br /&gt;
=== Web Browsing ===&lt;br /&gt;
&lt;br /&gt;
==== Firefox ====&lt;br /&gt;
Pretty good experience! Enabling GPU acceleration is helpful.&lt;br /&gt;
&lt;br /&gt;
===== GPU Acceleration in Firefox =====&lt;br /&gt;
See [https://github.com/0cc4m/pinenote-misc#firefox-hardware-acceleration 0ccam's notes here].&lt;br /&gt;
&lt;br /&gt;
=== Cloud ===&lt;br /&gt;
==== syncthing ====&lt;br /&gt;
High contrast theme can be found [https://github.com/MichiMolle/syncthing-eink here].&lt;br /&gt;
&lt;br /&gt;
=== Content Creation ===&lt;br /&gt;
==== Generating crosswords ====&lt;br /&gt;
There are some scripts [https://git.sr.ht/~scott__/pinenote_crossword_utilities here] for generating crosswords for the Pinenote from IPUZ files. &lt;br /&gt;
&lt;br /&gt;
[[Category:PineNote]]&lt;/div&gt;</summary>
		<author><name>C2c0</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PineNote_Development/Apps&amp;diff=18427</id>
		<title>PineNote Development/Apps</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PineNote_Development/Apps&amp;diff=18427"/>
		<updated>2023-03-05T15:02:15Z</updated>

		<summary type="html">&lt;p&gt;C2c0: /* Xournal++ */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page lists applications and tweaks for the [https://wiki.pine64.org/wiki/PineNote PineNote].&lt;br /&gt;
&lt;br /&gt;
= Development = &lt;br /&gt;
&lt;br /&gt;
Here are some resources you may find helpful in learning to develop on embedded Linux devices:&lt;br /&gt;
* Great YouTube series introducing you to the kernel and lower-level components of Linux: https://www.youtube.com/watch?v=WiZ05pnHZqM&lt;br /&gt;
* https://embetronicx.com/&lt;br /&gt;
* https://bootlin.com/training/&lt;br /&gt;
* https://www.nand2tetris.org&lt;br /&gt;
&lt;br /&gt;
Emulator recommendation for developing and testing PineNote apps: https://github.com/michaelshiel/picom-epaper&lt;br /&gt;
&lt;br /&gt;
The PineNote is a specialized device, mainly due to the eink display having unique display and refresh characteristics.&lt;br /&gt;
Finding and configuring apps that work well sometimes requires a lot of tweaking and a lot exploring, especially for&lt;br /&gt;
applications containing fast screen updates and animations, as well as depend on a lot of colors.&lt;br /&gt;
&lt;br /&gt;
[https://www.youtube.com/watch?v=ZCLyJfbzbrU Here is a video] showing the performance of a few applications.&lt;br /&gt;
&lt;br /&gt;
= Desktop Environments =&lt;br /&gt;
&lt;br /&gt;
=== Sway ===&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/hmpthcs/WinkShell WinkShell] &amp;quot;Collected applications, configurations and scripts for using a wlroots-based compositor with an EPD (aka e-ink display). Currently supports Sway only.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/0cc4m/pinenote-misc/blob/main/sway/config/sway/config 0cc4m's config]&lt;br /&gt;
&lt;br /&gt;
==== Getting touch + pen working on sway ====&lt;br /&gt;
&lt;br /&gt;
If you notice that touching the screen works, but when you use the pen the mouse coordinates are inverted, don't worry! We can fix it! Set &amp;lt;code&amp;gt;rockchip_ebc.panel_reflection=0&amp;lt;/code&amp;gt; on boot (see [https://wiki.pine64.org/wiki/PineNote_Development/Building_Kernel#Configuring_the_driver this page] for more info). Add the following line to your sway config:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# This line rotates the mouse input by 180 degrees. See https://wayland.freedesktop.org/libinput/doc/1.11.3/absolute_axes.html&lt;br /&gt;
input &amp;quot;type:table_tool&amp;quot; calibration_matrix -1 0 1 0 -1 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Gnome ===&lt;br /&gt;
&lt;br /&gt;
Gnome on wayland runs nicely on the PineNote. However, a slightly patched version of mutter is required at the moment.&lt;br /&gt;
&lt;br /&gt;
* See this repository for .deb packages and patch/compile files: [https://github.com/m-weigand/pinenote_debian_mutter Patched Debian Mutter for Bookworm]&lt;br /&gt;
* The ready-to-use [https://github.com/m-weigand/pinenote-debian-recipes/releases Debian image] provides a pre-configured GNOME environment], with specific GNOME configurations found [https://github.com/m-weigand/pinenote-debian-recipes/blob/main/overlays/gnome_config/01-pinenote-settings here]&lt;br /&gt;
* A GNOME extension is being [https://github.com/m-weigand/mw_pinenote_misc/tree/main/gnome_extension developed] that provides access to some of the ebc-specific driver options.&lt;br /&gt;
* [https://github.com/MichiMolle/PNEink PNEink] is a GNOME Theme for use with the PineNote&lt;br /&gt;
&lt;br /&gt;
==== GTK3 ====&lt;br /&gt;
High contrast style for eink-devices can be found [https://github.com/MichiMolle/gtk3-eink here].&lt;br /&gt;
&lt;br /&gt;
==== GTK4 ====&lt;br /&gt;
High contrast style for eink-devices can be found [https://github.com/MichiMolle/gtk4-eink here].&lt;br /&gt;
&lt;br /&gt;
= Application support on the PineNote =&lt;br /&gt;
&lt;br /&gt;
== System-Control ==&lt;br /&gt;
&lt;br /&gt;
* A rust-based dbus service is being [https://github.com/m-weigand/pinenote_dbus_service developed] to enable easy, system-wide control over some of the PineNote-specific settings by users and programs (e.g., triggering global screen refreshes, changing waveforms, enabling/disabling dithering). Requires [https://github.com/m-weigand/linux/releases this kernel].&lt;br /&gt;
&lt;br /&gt;
== Notetaking ==&lt;br /&gt;
&lt;br /&gt;
=== Xournal++ ===&lt;br /&gt;
Works well. The development version and unrelease 1.2 version offers repainting-related optimisations and supports PDF highlighting as well as links. To remove artefacts from the eraser set the eraser cursor's visibility to Never via Preferences -&amp;gt; Stylus -&amp;gt; Eraser Visibility.&lt;br /&gt;
&lt;br /&gt;
Xournal++ uses anti-aliasing and interpolation, which do not work well for the A1 waveform. Mitigations include using either dithering or black-and-white mode in the ebc driver. https://gitlab.com/hrdl/pinenote-shared/-/blob/main/patches/xournalpp/0001-Disable-anti-aliasing-and-use-NEAREST-interpolation-.patch is an outdated patch that used to work well without changing the bw mode.&lt;br /&gt;
&lt;br /&gt;
Pre-compiled Debian packages with some of the PineNote-related modifications and support for triggering global refreshes after scrolling using the dbus service (see above) can be found [https://github.com/m-weigand/xournalpp_pn/releases here]&lt;br /&gt;
&lt;br /&gt;
=== Obsidian ===&lt;br /&gt;
Works well, EInk-Theme can be found [https://github.com/MichiMolle/obsidian-eink here].&lt;br /&gt;
&lt;br /&gt;
== Web Browsing ==&lt;br /&gt;
&lt;br /&gt;
=== Firefox ===&lt;br /&gt;
Pretty good experience! Enabling GPU acceleration is helpful.&lt;br /&gt;
&lt;br /&gt;
==== GPU Acceleration in Firefox ====&lt;br /&gt;
See [https://github.com/0cc4m/pinenote-misc#firefox-hardware-acceleration 0ccam's notes here].&lt;br /&gt;
&lt;br /&gt;
== &amp;quot;Cloud&amp;quot; ==&lt;br /&gt;
=== syncthing ===&lt;br /&gt;
High contrast theme can be found [https://github.com/MichiMolle/syncthing-eink here].&lt;br /&gt;
&lt;br /&gt;
[[Category:PineNote]]&lt;/div&gt;</summary>
		<author><name>C2c0</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PineNote_Development/Apps&amp;diff=18261</id>
		<title>PineNote Development/Apps</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PineNote_Development/Apps&amp;diff=18261"/>
		<updated>2023-02-27T16:27:52Z</updated>

		<summary type="html">&lt;p&gt;C2c0: /* Xournal++ */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page lists applications and tweaks for the [https://wiki.pine64.org/wiki/PineNote PineNote].&lt;br /&gt;
&lt;br /&gt;
= Development = &lt;br /&gt;
&lt;br /&gt;
Here are some resources you may find helpful in learning to develop on embedded Linux devices:&lt;br /&gt;
* Great YouTube series introducing you to the kernel and lower-level components of Linux: https://www.youtube.com/watch?v=WiZ05pnHZqM&lt;br /&gt;
* https://embetronicx.com/&lt;br /&gt;
* https://bootlin.com/training/&lt;br /&gt;
* https://www.nand2tetris.org&lt;br /&gt;
&lt;br /&gt;
Emulator recommendation for developing and testing PineNote apps: https://github.com/michaelshiel/picom-epaper&lt;br /&gt;
&lt;br /&gt;
The PineNote is a specialized device, mainly due to the eink display having unique display and refresh characteristics.&lt;br /&gt;
Finding and configuring apps that work well sometimes requires a lot of tweaking and a lot exploring, especially for&lt;br /&gt;
applications containing fast screen updates and animations, as well as depend on a lot of colors.&lt;br /&gt;
&lt;br /&gt;
[https://www.youtube.com/watch?v=ZCLyJfbzbrU Here is a video] showing the performance of a few applications.&lt;br /&gt;
&lt;br /&gt;
= Desktop Environments =&lt;br /&gt;
&lt;br /&gt;
=== Sway ===&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/hmpthcs/WinkShell WinkShell] &amp;quot;Collected applications, configurations and scripts for using a wlroots-based compositor with an EPD (aka e-ink display). Currently supports Sway only.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/0cc4m/pinenote-misc/blob/main/sway/config/sway/config 0cc4m's config]&lt;br /&gt;
&lt;br /&gt;
==== Getting touch + pen working on sway ====&lt;br /&gt;
&lt;br /&gt;
If you notice that touching the screen works, but when you use the pen the mouse coordinates are inverted, don't worry! We can fix it! Set &amp;lt;code&amp;gt;rockchip_ebc.panel_reflection=0&amp;lt;/code&amp;gt; on boot (see [https://wiki.pine64.org/wiki/PineNote_Development/Building_Kernel#Configuring_the_driver this page] for more info). Add the following line to your sway config:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# This line rotates the mouse input by 180 degrees. See https://wayland.freedesktop.org/libinput/doc/1.11.3/absolute_axes.html&lt;br /&gt;
input &amp;quot;type:table_tool&amp;quot; calibration_matrix -1 0 1 0 -1 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Gnome ===&lt;br /&gt;
&lt;br /&gt;
Gnome on wayland runs nicely on the PineNote. However, a slightly patched version of mutter is required at the moment.&lt;br /&gt;
&lt;br /&gt;
* See this repository for .deb packages and patch/compile files: [https://github.com/m-weigand/pinenote_debian_mutter Patched Debian Mutter for Bookworm]&lt;br /&gt;
* The ready-to-use [https://github.com/m-weigand/pinenote-debian-recipes/releases Debian image] provides a pre-configured GNOME environment], with specific GNOME configurations found [https://github.com/m-weigand/pinenote-debian-recipes/blob/main/overlays/gnome_config/01-pinenote-settings here]&lt;br /&gt;
* A GNOME extension is being [https://github.com/m-weigand/mw_pinenote_misc/tree/main/gnome_extension developed] that provides access to some of the ebc-specific driver options.&lt;br /&gt;
* [https://github.com/MichiMolle/PNEink PNEink] is a GNOME Theme for use with the PineNote&lt;br /&gt;
&lt;br /&gt;
==== GTK3 ====&lt;br /&gt;
High contrast style for eink-devices can be found [https://github.com/MichiMolle/gtk3-eink here].&lt;br /&gt;
&lt;br /&gt;
==== GTK4 ====&lt;br /&gt;
High contrast style for eink-devices can be found [https://github.com/MichiMolle/gtk4-eink here].&lt;br /&gt;
&lt;br /&gt;
= Application support on the PineNote =&lt;br /&gt;
&lt;br /&gt;
== System-Control ==&lt;br /&gt;
&lt;br /&gt;
* A rust-based dbus service is being [https://github.com/m-weigand/pinenote_dbus_service developed] to enable easy, system-wide control over some of the PineNote-specific settings by users and programs (e.g., triggering global screen refreshes, changing waveforms, enabling/disabling dithering). Requires [https://github.com/m-weigand/linux/releases this kernel].&lt;br /&gt;
&lt;br /&gt;
== Notetaking ==&lt;br /&gt;
&lt;br /&gt;
=== Xournal++ ===&lt;br /&gt;
Works well. Writing is pretty quick on the development version, which supports PDF highlighting, links, and  offers repainting-related optimisations. To remove artefacts from the eraser apply https://github.com/xournalpp/xournalpp/pull/4665 while on master and set the eraser cursor's visibility to Never via Preferences -&amp;gt; View -&amp;gt; Cursor.&lt;br /&gt;
&lt;br /&gt;
Xournal++ uses anti-aliasing and interpolation, which do not work well for the A1 waveform. Mitigations include using either dithering or black-and-white mode in the ebc driver. https://gitlab.com/hrdl/pinenote-shared/-/blob/main/patches/xournalpp/0001-Disable-anti-aliasing-and-use-NEAREST-interpolation-.patch is an outdated patch that used to work well without changing the bw mode.&lt;br /&gt;
&lt;br /&gt;
Pre-compiled Debian packages with some of the PineNote-related modifications and support for triggering global refreshes after scrolling using the dbus service (see above) can be found [https://github.com/m-weigand/xournalpp_pn/releases here]&lt;br /&gt;
&lt;br /&gt;
=== Obsidian ===&lt;br /&gt;
Works well, EInk-Theme can be found [https://github.com/MichiMolle/obsidian-eink here].&lt;br /&gt;
&lt;br /&gt;
== Web Browsing ==&lt;br /&gt;
&lt;br /&gt;
=== Firefox ===&lt;br /&gt;
Pretty good experience! Enabling GPU acceleration is helpful.&lt;br /&gt;
&lt;br /&gt;
==== GPU Acceleration in Firefox ====&lt;br /&gt;
See [https://github.com/0cc4m/pinenote-misc#firefox-hardware-acceleration 0ccam's notes here].&lt;br /&gt;
&lt;br /&gt;
== &amp;quot;Cloud&amp;quot; ==&lt;br /&gt;
=== syncthing ===&lt;br /&gt;
High contrast theme can be found [https://github.com/MichiMolle/syncthing-eink here].&lt;br /&gt;
&lt;br /&gt;
[[Category:PineNote]]&lt;/div&gt;</summary>
		<author><name>C2c0</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PineNote_Development/Software_Tweaks&amp;diff=18093</id>
		<title>PineNote Development/Software Tweaks</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PineNote_Development/Software_Tweaks&amp;diff=18093"/>
		<updated>2023-02-22T15:05:28Z</updated>

		<summary type="html">&lt;p&gt;C2c0: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Fixing Bluetooth ==&lt;br /&gt;
Some users have noticed instability with their wireless driver. Upgrading the driver to the version provided by LibreELEC may help! To do this, download the BCM4345C0.hcd, brcmfmac43455-sdio.bin, and brcmfmac43455-sdio.txt from the [https://github.com/LibreELEC/brcmfmac_sdio-firmware/tree/master libreELEC repositories] and place them in the same location as your previous firmware (`/lib/firmware/brmc/`). Then rename brcmfmac43455-sdio.{txt,bin} as `brcmfmac43455-sdio.pine64,pinenote-v1.2.{txt,bin}`. If this doesn't help, ask about it in the matrix chat!&lt;br /&gt;
&lt;br /&gt;
=== Preliminary fix for stuttering bluetooth audio ===&lt;br /&gt;
Following a fix used for the Quartz Model A (which uses the same SoC as the Pinenote), we can modify the device tree prior to building the kernel to try to mitigate poor Bluetooth audio streaming. (reference: see https://lore.kernel.org/linux-arm-kernel/20220926055435.31284-1-leo@nabam.net/T/)&lt;br /&gt;
&lt;br /&gt;
'''Steps:'''&lt;br /&gt;
&lt;br /&gt;
* Open &amp;lt;code&amp;gt;arch/arm64/boot/dts/rockchip/rk3566-pinenote.dtsi&amp;lt;/code&amp;gt;&lt;br /&gt;
* Go to line 939, &amp;quot;bluetooth&amp;quot;, under the &amp;quot;uart1&amp;quot; section&lt;br /&gt;
* Edit the two lines that read &amp;quot;device-wake-gpios&amp;quot; and &amp;quot;host-wake-gpios&amp;quot;; you want them to read &amp;quot;device-wakeup-gpios&amp;quot; and &amp;quot;host-wakeup-gpios&amp;quot; respectively&lt;br /&gt;
* Add the following line to the end of the bluetooth section (under the vddio-supply line in my .dtsi): &amp;quot;max-speed = &amp;lt;3000000&amp;gt;;&amp;quot; &lt;br /&gt;
* Count your zeros, don't forget your punctuation..&lt;br /&gt;
&lt;br /&gt;
'''Caveats:'''&lt;br /&gt;
&lt;br /&gt;
This will improve BT audio quality at least when using the AAC codec. In my experience, the quality is more than acceptable, but there are still issues apparent: occasional isolated stutters even on AAC; prohibitively frequent stutters on SBC-XQ remain. Fully resolving BT audio issues might require further changes similar to the one described above, or may alternatively be a matter of audio software settings (e. g., process priority, audio server buffer settings). Investigation ongoing.&lt;br /&gt;
&lt;br /&gt;
== libinput Palm Detection ==&lt;br /&gt;
See https://gitlab.com/hrdl/pinenote-shared/-/blob/main/etc/libinput/local-overrides.quirks.&lt;br /&gt;
&lt;br /&gt;
== libinput Touch Arbitration ==&lt;br /&gt;
Prerequisites: &amp;lt;code&amp;gt;libinput&amp;gt;1.22.1&amp;lt;/code&amp;gt; and setup touch arbitration via udev: https://gitlab.com/hrdl/pinenote-shared/-/blob/main/etc/udev/rules.d/81-libinput-pinenote.rules&lt;br /&gt;
&lt;br /&gt;
=== Issues and workarounds ===&lt;br /&gt;
* No resolution reported by touchscreen driver. Workaround: patch &amp;lt;code&amp;gt;cyttsp5.c&amp;lt;/code&amp;gt; and device tree: https://gitlab.com/hrdl/linux/-/commit/f1f9eb197d3bd88c9189ab9d8fba2d03d2e13960 or set device quirk &amp;lt;code&amp;gt;AttrSizeHint=210x157&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Touch screen arbitration is independent of the screen's rotation. Workaround: use &amp;lt;code&amp;gt;AttrEventCode=-ABS_TILT_X&amp;lt;/code&amp;gt; (on older version: &amp;lt;code&amp;gt;AttrEventCodeDisable=ABS_TILT_X&amp;lt;/code&amp;gt;) in a libinput quirk matching &amp;lt;code&amp;gt;w9013 2D1F:0095 Stylus&amp;lt;/code&amp;gt;. This makes touch arbitration independent of the pen's location.&lt;br /&gt;
&lt;br /&gt;
[[Category:PineNote]]&lt;/div&gt;</summary>
		<author><name>C2c0</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PineNote_Development/Software_Tweaks&amp;diff=18092</id>
		<title>PineNote Development/Software Tweaks</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PineNote_Development/Software_Tweaks&amp;diff=18092"/>
		<updated>2023-02-22T15:05:17Z</updated>

		<summary type="html">&lt;p&gt;C2c0: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Fixing Bluetooth ==&lt;br /&gt;
Some users have noticed instability with their wireless driver. Upgrading the driver to the version provided by LibreELEC may help! To do this, download the BCM4345C0.hcd, brcmfmac43455-sdio.bin, and brcmfmac43455-sdio.txt from the [https://github.com/LibreELEC/brcmfmac_sdio-firmware/tree/master libreELEC repositories] and place them in the same location as your previous firmware (`/lib/firmware/brmc/`). Then rename brcmfmac43455-sdio.{txt,bin} as `brcmfmac43455-sdio.pine64,pinenote-v1.2.{txt,bin}`. If this doesn't help, ask about it in the matrix chat!&lt;br /&gt;
&lt;br /&gt;
=== Preliminary fix for stuttering bluetooth audio ===&lt;br /&gt;
Following a fix used for the Quartz Model A (which uses the same SoC as the Pinenote), we can modify the device tree prior to building the kernel to try to mitigate poor Bluetooth audio streaming. (reference: see https://lore.kernel.org/linux-arm-kernel/20220926055435.31284-1-leo@nabam.net/T/)&lt;br /&gt;
&lt;br /&gt;
'''Steps:'''&lt;br /&gt;
&lt;br /&gt;
* Open &amp;lt;code&amp;gt;arch/arm64/boot/dts/rockchip/rk3566-pinenote.dtsi&amp;lt;/code&amp;gt;&lt;br /&gt;
* Go to line 939, &amp;quot;bluetooth&amp;quot;, under the &amp;quot;uart1&amp;quot; section&lt;br /&gt;
* Edit the two lines that read &amp;quot;device-wake-gpios&amp;quot; and &amp;quot;host-wake-gpios&amp;quot;; you want them to read &amp;quot;device-wakeup-gpios&amp;quot; and &amp;quot;host-wakeup-gpios&amp;quot; respectively&lt;br /&gt;
* Add the following line to the end of the bluetooth section (under the vddio-supply line in my .dtsi): &amp;quot;max-speed = &amp;lt;3000000&amp;gt;;&amp;quot; &lt;br /&gt;
* Count your zeros, don't forget your punctuation..&lt;br /&gt;
&lt;br /&gt;
'''Caveats:'''&lt;br /&gt;
&lt;br /&gt;
This will improve BT audio quality at least when using the AAC codec. In my experience, the quality is more than acceptable, but there are still issues apparent: occasional isolated stutters even on AAC; prohibitively frequent stutters on SBC-XQ remain. Fully resolving BT audio issues might require further changes similar to the one described above, or may alternatively be a matter of audio software settings (e. g., process priority, audio server buffer settings). Investigation ongoing.&lt;br /&gt;
&lt;br /&gt;
== libinput Palm Detection ==&lt;br /&gt;
See https://gitlab.com/hrdl/pinenote-shared/-/blob/main/etc/libinput/local-overrides.quirks.&lt;br /&gt;
&lt;br /&gt;
== libinput Touch Arbitration ==&lt;br /&gt;
Prerequisites: &amp;lt;code&amp;gt;libinput&amp;gt;1.22.1&amp;lt;/code&amp;gt; and setup touch arbitration via udev: https://gitlab.com/hrdl/pinenote-shared/-/blob/main/etc/udev/rules.d/81-libinput-pinenote.rules&lt;br /&gt;
&lt;br /&gt;
=== Issues and workarounds ===&lt;br /&gt;
* No resolution reported by touchscreen driver. Workaround: patch &amp;lt;code&amp;gt;cyttsp5.c&amp;lt;/code&amp;gt; and device tree: https://gitlab.com/hrdl/linux/-/commit/f1f9eb197d3bd88c9189ab9d8fba2d03d2e13960 or set device quirk &amp;lt;code&amp;gt;AttrSizeHint=210x157&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Touch screen arbitration is independent of the screen's rotation. Workaround: use &amp;lt;code&amp;gt;AttrEventCode=-ABS_TILT_X&amp;lt;/code&amp;gt; (on older version: &amp;lt;code&amp;gt;AttrEventCodeDisable=ABS_TILT_X&amp;lt;/code&amp;gt;)in a libinput quirk matching &amp;lt;code&amp;gt;w9013 2D1F:0095 Stylus&amp;lt;/code&amp;gt;. This makes touch arbitration independent of the pen's location.&lt;br /&gt;
&lt;br /&gt;
[[Category:PineNote]]&lt;/div&gt;</summary>
		<author><name>C2c0</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PineNote_Development/Software_Tweaks&amp;diff=18091</id>
		<title>PineNote Development/Software Tweaks</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PineNote_Development/Software_Tweaks&amp;diff=18091"/>
		<updated>2023-02-22T15:04:08Z</updated>

		<summary type="html">&lt;p&gt;C2c0: /* libinput Touch Arbitration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Fixing Bluetooth ==&lt;br /&gt;
Some users have noticed instability with their wireless driver. Upgrading the driver to the version provided by LibreELEC may help! To do this, download the BCM4345C0.hcd, brcmfmac43455-sdio.bin, and brcmfmac43455-sdio.txt from the [https://github.com/LibreELEC/brcmfmac_sdio-firmware/tree/master libreELEC repositories] and place them in the same location as your previous firmware (`/lib/firmware/brmc/`). Then rename brcmfmac43455-sdio.{txt,bin} as `brcmfmac43455-sdio.pine64,pinenote-v1.2.{txt,bin}`. If this doesn't help, ask about it in the matrix chat!&lt;br /&gt;
&lt;br /&gt;
=== Preliminary fix for stuttering bluetooth audio ===&lt;br /&gt;
Following a fix used for the Quartz Model A (which uses the same SoC as the Pinenote), we can modify the device tree prior to building the kernel to try to mitigate poor Bluetooth audio streaming. (reference: see https://lore.kernel.org/linux-arm-kernel/20220926055435.31284-1-leo@nabam.net/T/)&lt;br /&gt;
&lt;br /&gt;
'''Steps:'''&lt;br /&gt;
&lt;br /&gt;
* Open &amp;lt;code&amp;gt;arch/arm64/boot/dts/rockchip/rk3566-pinenote.dtsi&amp;lt;/code&amp;gt;&lt;br /&gt;
* Go to line 939, &amp;quot;bluetooth&amp;quot;, under the &amp;quot;uart1&amp;quot; section&lt;br /&gt;
* Edit the two lines that read &amp;quot;device-wake-gpios&amp;quot; and &amp;quot;host-wake-gpios&amp;quot;; you want them to read &amp;quot;device-wakeup-gpios&amp;quot; and &amp;quot;host-wakeup-gpios&amp;quot; respectively&lt;br /&gt;
* Add the following line to the end of the bluetooth section (under the vddio-supply line in my .dtsi): &amp;quot;max-speed = &amp;lt;3000000&amp;gt;;&amp;quot; &lt;br /&gt;
* Count your zeros, don't forget your punctuation..&lt;br /&gt;
&lt;br /&gt;
'''Caveats:'''&lt;br /&gt;
&lt;br /&gt;
This will improve BT audio quality at least when using the AAC codec. In my experience, the quality is more than acceptable, but there are still issues apparent: occasional isolated stutters even on AAC; prohibitively frequent stutters on SBC-XQ remain. Fully resolving BT audio issues might require further changes similar to the one described above, or may alternatively be a matter of audio software settings (e. g., process priority, audio server buffer settings). Investigation ongoing.&lt;br /&gt;
&lt;br /&gt;
== libinput Palm Detection ==&lt;br /&gt;
See https://gitlab.com/hrdl/pinenote-shared/-/blob/main/etc/libinput/local-overrides.quirks.&lt;br /&gt;
&lt;br /&gt;
== libinput Touch Arbitration ==&lt;br /&gt;
Prerequisites: &amp;lt;code&amp;gt;libinput&amp;gt;1.22.1&amp;lt;/code&amp;gt; and setup touch arbitration via udev: https://gitlab.com/hrdl/pinenote-shared/-/blob/main/etc/udev/rules.d/81-libinput-pinenote.rules&lt;br /&gt;
&lt;br /&gt;
=== Issues and workarounds ===&lt;br /&gt;
* No resolution reported by touchscreen driver. Workaround: patch &amp;lt;code&amp;gt;cyttsp5.c&amp;lt;/code&amp;gt; and device tree: https://gitlab.com/hrdl/linux/-/commit/f1f9eb197d3bd88c9189ab9d8fba2d03d2e13960 or set device quirk &amp;lt;code&amp;gt;AttrSizeHint=210x157&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Touch screen arbitration is independent of the screen's rotation. Workaround: use &amp;lt;code&amp;gt;AttrEventCode=-ABS_TILT_X&amp;lt;/code&amp;gt; in a libinput quirk matching &amp;lt;code&amp;gt;w9013 2D1F:0095 Stylus&amp;lt;/code&amp;gt;. This makes touch arbitration independent of the pen's location.&lt;br /&gt;
&lt;br /&gt;
[[Category:PineNote]]&lt;/div&gt;</summary>
		<author><name>C2c0</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PineNote_Development/Apps&amp;diff=17005</id>
		<title>PineNote Development/Apps</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PineNote_Development/Apps&amp;diff=17005"/>
		<updated>2023-02-18T14:48:12Z</updated>

		<summary type="html">&lt;p&gt;C2c0: /* Xournal++ */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page lists applications and tweaks for the [https://wiki.pine64.org/wiki/PineNote PineNote].&lt;br /&gt;
&lt;br /&gt;
= Development = &lt;br /&gt;
&lt;br /&gt;
Here are some resources you may find helpful in learning to develop on embedded Linux devices:&lt;br /&gt;
* Great YouTube series introducing you to the kernel and lower-level components of Linux: https://www.youtube.com/watch?v=WiZ05pnHZqM&lt;br /&gt;
* https://embetronicx.com/&lt;br /&gt;
* https://bootlin.com/training/&lt;br /&gt;
* https://www.nand2tetris.org&lt;br /&gt;
&lt;br /&gt;
Emulator recommendation for developing and testing PineNote apps: https://github.com/michaelshiel/picom-epaper&lt;br /&gt;
&lt;br /&gt;
The PineNote is a specialized device, mainly due to the eink display having unique display and refresh characteristics.&lt;br /&gt;
Finding and configuring apps that work well sometimes requires a lot of tweaking and a lot exploring, especially for&lt;br /&gt;
applications containing fast screen updates and animations, as well as depend on a lot of colors.&lt;br /&gt;
&lt;br /&gt;
[https://www.youtube.com/watch?v=ZCLyJfbzbrU Here is a video] showing the performance of a few applications.&lt;br /&gt;
&lt;br /&gt;
= Desktop Environments =&lt;br /&gt;
&lt;br /&gt;
=== Sway ===&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/hmpthcs/WinkShell WinkShell] &amp;quot;Collected applications, configurations and scripts for using a wlroots-based compositor with an EPD (aka e-ink display). Currently supports Sway only.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/0cc4m/pinenote-misc/blob/main/sway/config/sway/config 0cc4m's config]&lt;br /&gt;
&lt;br /&gt;
==== Getting touch + pen working on sway ====&lt;br /&gt;
&lt;br /&gt;
If you notice that touching the screen works, but when you use the pen the mouse coordinates are inverted, don't worry! We can fix it! Set &amp;lt;code&amp;gt;rockchip_ebc.panel_reflection=0&amp;lt;/code&amp;gt; on boot (see [https://wiki.pine64.org/wiki/PineNote_Development/Building_Kernel#Configuring_the_driver this page] for more info). Add the following line to your sway config:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# This line rotates the mouse input by 180 degrees. See https://wayland.freedesktop.org/libinput/doc/1.11.3/absolute_axes.html&lt;br /&gt;
input &amp;quot;type:table_tool&amp;quot; calibration_matrix -1 0 1 0 -1 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Gnome ===&lt;br /&gt;
&lt;br /&gt;
Gnome on wayland runs nicely on the PineNote. However, a slightly patched version of mutter is required at the moment.&lt;br /&gt;
&lt;br /&gt;
* See this repository for .deb packages and patch/compile files: [https://github.com/m-weigand/pinenote_debian_mutter Patched Debian Mutter for Bookworm]&lt;br /&gt;
* The ready-to-use [https://github.com/m-weigand/pinenote-debian-recipes/releases Debian image] provides a pre-configured GNOME environment], with specific GNOME configurations found [https://github.com/m-weigand/pinenote-debian-recipes/blob/main/overlays/gnome_config/01-pinenote-settings here]&lt;br /&gt;
* A GNOME extension is being [https://github.com/m-weigand/mw_pinenote_misc/tree/main/gnome_extension developed] that provides access to some of the ebc-specific driver options.&lt;br /&gt;
* [https://github.com/MichiMolle/PNEink PNEink] is a GNOME Theme for use with the PineNote&lt;br /&gt;
&lt;br /&gt;
==== GTK3 ====&lt;br /&gt;
High contrast style for eink-devices can be found [https://github.com/MichiMolle/gtk3-eink here].&lt;br /&gt;
&lt;br /&gt;
==== GTK4 ====&lt;br /&gt;
High contrast style for eink-devices can be found [https://github.com/MichiMolle/gtk4-eink here].&lt;br /&gt;
&lt;br /&gt;
= Application support on the PineNote =&lt;br /&gt;
&lt;br /&gt;
== System-Control ==&lt;br /&gt;
&lt;br /&gt;
* A rust-based dbus service is being [https://github.com/m-weigand/pinenote_dbus_service developed] to enable easy, system-wide control over some of the PineNote-specific settings by users and programs (e.g., triggering global screen refreshes, changing waveforms, enabling/disabling dithering). Requires [https://github.com/m-weigand/linux/releases this kernel].&lt;br /&gt;
&lt;br /&gt;
== Notetaking ==&lt;br /&gt;
&lt;br /&gt;
=== Xournal++ ===&lt;br /&gt;
Works well, writing is pretty quick. The development version supports PDF highlighting, links, and  offers repainting-related optimisations. To improve the performance even further apply https://github.com/xournalpp/xournalpp/pull/4637 while on master.&lt;br /&gt;
&lt;br /&gt;
Xournal++ uses anti-aliasing and interpolation, which do not work well for the A1 waveform. Mitigations include using either dithering or black-white mode in the ebc driver, or compiling Xournal++ with https://gitlab.com/hrdl/pinenote-shared/-/blob/main/patches/xournalpp/0001-Disable-anti-aliasing-and-use-NEAREST-interpolation-.patch.&lt;br /&gt;
&lt;br /&gt;
Pre-compiled Debian packages with some of the PineNote-related modifications and support for triggering global refreshes after scrolling using the dbus service (see above) can be found [https://github.com/m-weigand/xournalpp_pn/releases here]&lt;br /&gt;
&lt;br /&gt;
=== Obsidian ===&lt;br /&gt;
Works well, EInk-Theme can be found [https://github.com/MichiMolle/obsidian-eink here].&lt;br /&gt;
&lt;br /&gt;
== Web Browsing ==&lt;br /&gt;
&lt;br /&gt;
=== Firefox ===&lt;br /&gt;
Pretty good experience! Enabling GPU acceleration is helpful.&lt;br /&gt;
&lt;br /&gt;
==== GPU Acceleration in Firefox ====&lt;br /&gt;
See [https://github.com/0cc4m/pinenote-misc#firefox-hardware-acceleration 0ccam's notes here].&lt;br /&gt;
&lt;br /&gt;
== &amp;quot;Cloud&amp;quot; ==&lt;br /&gt;
=== syncthing ===&lt;br /&gt;
High contrast theme can be found [https://github.com/MichiMolle/syncthing-eink here].&lt;br /&gt;
&lt;br /&gt;
[[Category:PineNote]]&lt;/div&gt;</summary>
		<author><name>C2c0</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PineNote_Development/Apps&amp;diff=16427</id>
		<title>PineNote Development/Apps</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PineNote_Development/Apps&amp;diff=16427"/>
		<updated>2023-02-12T19:25:52Z</updated>

		<summary type="html">&lt;p&gt;C2c0: /* Xournal++ */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page lists applications and tweaks for the [https://wiki.pine64.org/wiki/PineNote PineNote].&lt;br /&gt;
&lt;br /&gt;
= Development = &lt;br /&gt;
&lt;br /&gt;
Here are some resources you may find helpful in learning to develop on embedded Linux devices:&lt;br /&gt;
* Great YouTube series introducing you to the kernel and lower-level components of Linux: https://www.youtube.com/watch?v=WiZ05pnHZqM&lt;br /&gt;
* https://embetronicx.com/&lt;br /&gt;
* https://bootlin.com/training/&lt;br /&gt;
* https://www.nand2tetris.org&lt;br /&gt;
&lt;br /&gt;
Emulator recommendation for developing and testing PineNote apps: https://github.com/michaelshiel/picom-epaper&lt;br /&gt;
&lt;br /&gt;
The PineNote is a specialized device, mainly due to the eink display having unique display and refresh characteristics.&lt;br /&gt;
Finding and configuring apps that work well sometimes requires a lot of tweaking and a lot exploring, especially for&lt;br /&gt;
applications containing fast screen updates and animations, as well as depend on a lot of colors.&lt;br /&gt;
&lt;br /&gt;
[https://www.youtube.com/watch?v=ZCLyJfbzbrU Here is a video] showing the performance of a few applications.&lt;br /&gt;
&lt;br /&gt;
= Desktop Environments =&lt;br /&gt;
&lt;br /&gt;
=== Sway ===&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/hmpthcs/WinkShell WinkShell] &amp;quot;Collected applications, configurations and scripts for using a wlroots-based compositor with an EPD (aka e-ink display). Currently supports Sway only.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/0cc4m/pinenote-misc/blob/main/sway/config/sway/config 0cc4m's config]&lt;br /&gt;
&lt;br /&gt;
==== Getting touch + pen working on sway ====&lt;br /&gt;
&lt;br /&gt;
If you notice that touching the screen works, but when you use the pen the mouse coordinates are inverted, don't worry! We can fix it! Set &amp;lt;code&amp;gt;rockchip_ebc.panel_reflection=0&amp;lt;/code&amp;gt; on boot (see [https://wiki.pine64.org/wiki/PineNote_Development/Building_Kernel#Configuring_the_driver this page] for more info). Add the following line to your sway config:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# This line rotates the mouse input by 180 degrees. See https://wayland.freedesktop.org/libinput/doc/1.11.3/absolute_axes.html&lt;br /&gt;
input &amp;quot;type:table_tool&amp;quot; calibration_matrix -1 0 1 0 -1 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Gnome ===&lt;br /&gt;
&lt;br /&gt;
Gnome on wayland runs nicely on the PineNote. However, a slightly patched version of mutter is required at the moment.&lt;br /&gt;
&lt;br /&gt;
* See this repository for .deb packages and patch/compile files: [https://github.com/m-weigand/pinenote_debian_mutter Patched Debian Mutter for Bookworm]&lt;br /&gt;
* The ready-to-use [https://github.com/m-weigand/pinenote-debian-recipes/releases Debian image] provides a pre-configured GNOME environment], with specific GNOME configurations found [https://github.com/m-weigand/pinenote-debian-recipes/blob/main/overlays/gnome_config/01-pinenote-settings here]&lt;br /&gt;
* A GNOME extension is being [https://github.com/m-weigand/mw_pinenote_misc/tree/main/gnome_extension developed] that provides access to some of the ebc-specific driver options.&lt;br /&gt;
* [https://github.com/MichiMolle/PNEink PNEink] is a GNOME Theme for use with the PineNote&lt;br /&gt;
&lt;br /&gt;
==== GTK3 ====&lt;br /&gt;
High contrast style for eink-devices can be found [https://github.com/MichiMolle/gtk3-eink here].&lt;br /&gt;
&lt;br /&gt;
==== GTK4 ====&lt;br /&gt;
High contrast style for eink-devices can be found [https://github.com/MichiMolle/gtk4-eink here].&lt;br /&gt;
&lt;br /&gt;
= Application support on the PineNote =&lt;br /&gt;
&lt;br /&gt;
== System-Control ==&lt;br /&gt;
&lt;br /&gt;
* A rust-based dbus service is being [https://github.com/m-weigand/pinenote_dbus_service developed] to enable easy, system-wide control over some of the PineNote-specific settings by users and programs (e.g., triggering global screen refreshes, changing waveforms, enabling/disabling dithering). Requires [https://github.com/m-weigand/linux/releases this kernel].&lt;br /&gt;
&lt;br /&gt;
== Notetaking ==&lt;br /&gt;
&lt;br /&gt;
=== Xournal++ ===&lt;br /&gt;
Works well, writing is pretty quick. The development version supports PDF highlighting, links, and  offers repainting-related optimisations (https://github.com/xournalpp/xournalpp/commit/c0a91f02afbfb67a60f7088b4c579a796693e05d and https://github.com/xournalpp/xournalpp/commit/ce1c66cb6d78f3332714ca21d279cf20548d7c06 and https://github.com/xournalpp/xournalpp/commit/c914d24496213cac02dc21a0b2b1b3a84b14c2f6). To improve the performance even further apply https://github.com/xournalpp/xournalpp/pull/4158 and https://github.com/xournalpp/xournalpp/pull/4637 while on master.&lt;br /&gt;
&lt;br /&gt;
Xournal++ uses anti-aliasing and interpolation, which do not work well for the A1 waveform. Mitigations include using either dithering or black-white mode in the ebc driver, or compiling Xournal++ with https://gitlab.com/hrdl/pinenote-shared/-/blob/main/patches/xournalpp/0001-Disable-anti-aliasing-and-use-NEAREST-interpolation-.patch.&lt;br /&gt;
&lt;br /&gt;
Pre-compiled Debian packages with some of the PineNote-related modifications and support for triggering global refreshes after scrolling using the dbus service (see above) can be found [https://github.com/m-weigand/xournalpp_pn/releases here]&lt;br /&gt;
&lt;br /&gt;
=== Obsidian ===&lt;br /&gt;
Works well, EInk-Theme can be found [https://github.com/MichiMolle/obsidian-eink here].&lt;br /&gt;
&lt;br /&gt;
== Web Browsing ==&lt;br /&gt;
&lt;br /&gt;
=== Firefox ===&lt;br /&gt;
Pretty good experience! Enabling GPU acceleration is helpful.&lt;br /&gt;
&lt;br /&gt;
==== GPU Acceleration in Firefox ====&lt;br /&gt;
See [https://github.com/0cc4m/pinenote-misc#firefox-hardware-acceleration 0ccam's notes here].&lt;br /&gt;
&lt;br /&gt;
== &amp;quot;Cloud&amp;quot; ==&lt;br /&gt;
=== syncthing ===&lt;br /&gt;
High contrast theme can be found [https://github.com/MichiMolle/syncthing-eink here].&lt;br /&gt;
&lt;br /&gt;
[[Category:PineNote]]&lt;/div&gt;</summary>
		<author><name>C2c0</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PineNote_Development/Software_Tweaks&amp;diff=16405</id>
		<title>PineNote Development/Software Tweaks</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PineNote_Development/Software_Tweaks&amp;diff=16405"/>
		<updated>2023-02-08T09:36:54Z</updated>

		<summary type="html">&lt;p&gt;C2c0: /* libinput Touch Arbitration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Fixing Bluetooth ==&lt;br /&gt;
Some users have noticed instability with their wireless driver. Upgrading the driver to the version provided by LibreELEC may help! To do this, download the BCM4345C0.hcd, brcmfmac43455-sdio.bin, and brcmfmac43455-sdio.txt from the [https://github.com/LibreELEC/brcmfmac_sdio-firmware/tree/master libreELEC repositories] and place them in the same location as your previous firmware (`/lib/firmware/brmc/`). Then rename brcmfmac43455-sdio.{txt,bin} as `brcmfmac43455-sdio.pine64,pinenote-v1.2.{txt,bin}`. If this doesn't help, ask about it in the matrix chat!&lt;br /&gt;
&lt;br /&gt;
=== Preliminary fix for stuttering bluetooth audio ===&lt;br /&gt;
Following a fix used for the Quartz Model A (which uses the same SoC as the Pinenote), we can modify the device tree prior to building the kernel to try to mitigate poor Bluetooth audio streaming. (reference: see https://lore.kernel.org/linux-arm-kernel/20220926055435.31284-1-leo@nabam.net/T/)&lt;br /&gt;
&lt;br /&gt;
'''Steps:'''&lt;br /&gt;
&lt;br /&gt;
* Open &amp;lt;code&amp;gt;arch/arm64/boot/dts/rockchip/rk3566-pinenote.dtsi&amp;lt;/code&amp;gt;&lt;br /&gt;
* Go to line 939, &amp;quot;bluetooth&amp;quot;, under the &amp;quot;uart1&amp;quot; section&lt;br /&gt;
* Edit the two lines that read &amp;quot;device-wake-gpios&amp;quot; and &amp;quot;host-wake-gpios&amp;quot;; you want them to read &amp;quot;device-wakeup-gpios&amp;quot; and &amp;quot;host-wakeup-gpios&amp;quot; respectively&lt;br /&gt;
* Add the following line to the end of the bluetooth section (under the vddio-supply line in my .dtsi): &amp;quot;max-speed = &amp;lt;3000000&amp;gt;;&amp;quot; &lt;br /&gt;
* Count your zeros, don't forget your punctuation..&lt;br /&gt;
&lt;br /&gt;
'''Caveats:'''&lt;br /&gt;
&lt;br /&gt;
This will improve BT audio quality at least when using the AAC codec. In my experience, the quality is more than acceptable, but there are still issues apparent: occasional isolated stutters even on AAC; prohibitively frequent stutters on SBC-XQ remain. Fully resolving BT audio issues might require further changes similar to the one described above, or may alternatively be a matter of audio software settings (e. g., process priority, audio server buffer settings). Investigation ongoing.&lt;br /&gt;
&lt;br /&gt;
== libinput Palm Detection ==&lt;br /&gt;
See https://gitlab.com/hrdl/pinenote-shared/-/blob/main/etc/libinput/local-overrides.quirks.&lt;br /&gt;
&lt;br /&gt;
== libinput Touch Arbitration ==&lt;br /&gt;
Prerequisites: &amp;lt;code&amp;gt;libinput&amp;gt;1.22.1&amp;lt;/code&amp;gt; and setup touch arbitration via udev: https://gitlab.com/hrdl/pinenote-shared/-/blob/main/etc/udev/rules.d/81-libinput-pinenote.rules&lt;br /&gt;
&lt;br /&gt;
=== Issues and workarounds ===&lt;br /&gt;
* No resolution reported by touchscreen driver. Workaround: patch &amp;lt;code&amp;gt;cyttsp5.c&amp;lt;/code&amp;gt; and device tree: https://gitlab.com/hrdl/linux/-/commit/f1f9eb197d3bd88c9189ab9d8fba2d03d2e13960 or set device quirk &amp;lt;code&amp;gt;AttrSizeHint=210x157&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Remaining issues: &lt;br /&gt;
* Touch screen arbitration is independent of the screen's rotation. Workaround: use &amp;lt;code&amp;gt;AttrEventCode=-ABS_TILT_X&amp;lt;/code&amp;gt; in a libinput quirk matching &amp;lt;code&amp;gt;w9013 2D1F:0095 Stylus&amp;lt;/code&amp;gt;. This makes touch arbitration independent of the pen's location.&lt;br /&gt;
&lt;br /&gt;
[[Category:PineNote]]&lt;/div&gt;</summary>
		<author><name>C2c0</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PineNote_Development/Software_Tweaks&amp;diff=16066</id>
		<title>PineNote Development/Software Tweaks</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PineNote_Development/Software_Tweaks&amp;diff=16066"/>
		<updated>2023-02-02T16:44:57Z</updated>

		<summary type="html">&lt;p&gt;C2c0: update /* Issues and workarounds */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Fixing Bluetooth ==&lt;br /&gt;
Some users have noticed instability with their wireless driver. Upgrading the driver to the version provided by LibreELEC may help! To do this, download the BCM4345C0.hcd, brcmfmac43455-sdio.bin, and brcmfmac43455-sdio.txt from the [https://github.com/LibreELEC/brcmfmac_sdio-firmware/tree/master libreELEC repositories] and place them in the same location as your previous firmware (`/lib/firmware/brmc/`). Then rename brcmfmac43455-sdio.{txt,bin} as `brcmfmac43455-sdio.pine64,pinenote-v1.2.{txt,bin}`. If this doesn't help, ask about it in the matrix chat!&lt;br /&gt;
&lt;br /&gt;
=== Preliminary fix for stuttering bluetooth audio ===&lt;br /&gt;
Following a fix used for the Quartz Model A (which uses the same SoC as the Pinenote), we can modify the device tree prior to building the kernel to try to mitigate poor Bluetooth audio streaming. (reference: see https://lore.kernel.org/linux-arm-kernel/20220926055435.31284-1-leo@nabam.net/T/)&lt;br /&gt;
&lt;br /&gt;
'''Steps:'''&lt;br /&gt;
&lt;br /&gt;
* Open &amp;lt;code&amp;gt;arch/arm64/boot/dts/rockchip/rk3566-pinenote.dtsi&amp;lt;/code&amp;gt;&lt;br /&gt;
* Go to line 939, &amp;quot;bluetooth&amp;quot;, under the &amp;quot;uart1&amp;quot; section&lt;br /&gt;
* Edit the two lines that read &amp;quot;device-wake-gpios&amp;quot; and &amp;quot;host-wake-gpios&amp;quot;; you want them to read &amp;quot;device-wakeup-gpios&amp;quot; and &amp;quot;host-wakeup-gpios&amp;quot; respectively&lt;br /&gt;
* Add the following line to the end of the bluetooth section (under the vddio-supply line in my .dtsi): &amp;quot;max-speed = &amp;lt;3000000&amp;gt;;&amp;quot; &lt;br /&gt;
* Count your zeros, don't forget your punctuation..&lt;br /&gt;
&lt;br /&gt;
'''Caveats:'''&lt;br /&gt;
&lt;br /&gt;
This will improve BT audio quality at least when using the AAC codec. In my experience, the quality is more than acceptable, but there are still issues apparent: occasional isolated stutters even on AAC; prohibitively frequent stutters on SBC-XQ remain. Fully resolving BT audio issues might require further changes similar to the one described above, or may alternatively be a matter of audio software settings (e. g., process priority, audio server buffer settings). Investigation ongoing.&lt;br /&gt;
&lt;br /&gt;
== libinput Palm Detection ==&lt;br /&gt;
See https://gitlab.com/hrdl/pinenote-shared/-/blob/main/etc/libinput/local-overrides.quirks.&lt;br /&gt;
&lt;br /&gt;
== libinput Touch Arbitration ==&lt;br /&gt;
Prerequisites: setup touch arbitration via udev: https://gitlab.com/hrdl/pinenote-shared/-/blob/main/etc/udev/rules.d/81-libinput-pinenote.rules&lt;br /&gt;
&lt;br /&gt;
=== Issues and workarounds ===&lt;br /&gt;
* No resolution reported by touchscreen driver. Workaround: patch &amp;lt;code&amp;gt;cyttsp5.c&amp;lt;/code&amp;gt; and device tree: https://gitlab.com/hrdl/linux/-/commit/f1f9eb197d3bd88c9189ab9d8fba2d03d2e13960 or set &amp;lt;code&amp;gt;AttrSizeHint=210x157&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Remaining issues: &lt;br /&gt;
** There are multiple issues related to touch screen arbitration: https://gitlab.freedesktop.org/libinput/libinput/-/issues/853&lt;br /&gt;
** Workaround: use &amp;lt;code&amp;gt;AttrEventCode=-ABS_TILT_X&amp;lt;/code&amp;gt; in a libinput quirk matching &amp;lt;code&amp;gt;w9013 2D1F:0095 Stylus&amp;lt;/code&amp;gt;. This makes touch arbitration independent of the pen's location.&lt;br /&gt;
&lt;br /&gt;
[[Category:PineNote]]&lt;/div&gt;</summary>
		<author><name>C2c0</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PineNote_Development/Software_Tweaks&amp;diff=15832</id>
		<title>PineNote Development/Software Tweaks</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PineNote_Development/Software_Tweaks&amp;diff=15832"/>
		<updated>2023-01-30T19:01:42Z</updated>

		<summary type="html">&lt;p&gt;C2c0: /* Issues and workarounds */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Fixing Bluetooth ==&lt;br /&gt;
Some users have noticed instability with their wireless driver. Upgrading the driver to the version provided by LibreELEC may help! To do this, download the BCM4345C0.hcd, brcmfmac43455-sdio.bin, and brcmfmac43455-sdio.txt from the [https://github.com/LibreELEC/brcmfmac_sdio-firmware/tree/master libreELEC repositories] and place them in the same location as your previous firmware (`/lib/firmware/brmc/`). Then rename brcmfmac43455-sdio.{txt,bin} as `brcmfmac43455-sdio.pine64,pinenote-v1.2.{txt,bin}`. If this doesn't help, ask about it in the matrix chat!&lt;br /&gt;
&lt;br /&gt;
=== Preliminary fix for stuttering bluetooth audio ===&lt;br /&gt;
Following a fix used for the Quartz Model A (which uses the same SoC as the Pinenote), we can modify the device tree prior to building the kernel to try to mitigate poor Bluetooth audio streaming. (reference: see https://lore.kernel.org/linux-arm-kernel/20220926055435.31284-1-leo@nabam.net/T/)&lt;br /&gt;
&lt;br /&gt;
'''Steps:'''&lt;br /&gt;
&lt;br /&gt;
* Open &amp;lt;code&amp;gt;arch/arm64/boot/dts/rockchip/rk3566-pinenote.dtsi&amp;lt;/code&amp;gt;&lt;br /&gt;
* Go to line 939, &amp;quot;bluetooth&amp;quot;, under the &amp;quot;uart1&amp;quot; section&lt;br /&gt;
* Edit the two lines that read &amp;quot;device-wake-gpios&amp;quot; and &amp;quot;host-wake-gpios&amp;quot;; you want them to read &amp;quot;device-wakeup-gpios&amp;quot; and &amp;quot;host-wakeup-gpios&amp;quot; respectively&lt;br /&gt;
* Add the following line to the end of the bluetooth section (under the vddio-supply line in my .dtsi): &amp;quot;max-speed = &amp;lt;3000000&amp;gt;;&amp;quot; &lt;br /&gt;
* Count your zeros, don't forget your punctuation..&lt;br /&gt;
&lt;br /&gt;
'''Caveats:'''&lt;br /&gt;
&lt;br /&gt;
This will improve BT audio quality at least when using the AAC codec. In my experience, the quality is more than acceptable, but there are still issues apparent: occasional isolated stutters even on AAC; prohibitively frequent stutters on SBC-XQ remain. Fully resolving BT audio issues might require further changes similar to the one described above, or may alternatively be a matter of audio software settings (e. g., process priority, audio server buffer settings). Investigation ongoing.&lt;br /&gt;
&lt;br /&gt;
== libinput Palm Detection ==&lt;br /&gt;
See https://gitlab.com/hrdl/pinenote-shared/-/blob/main/etc/libinput/local-overrides.quirks.&lt;br /&gt;
&lt;br /&gt;
== libinput Touch Arbitration ==&lt;br /&gt;
Prerequisites: setup touch arbitration via udev: https://gitlab.com/hrdl/pinenote-shared/-/blob/main/etc/udev/rules.d/81-libinput-pinenote.rules&lt;br /&gt;
&lt;br /&gt;
=== Issues and workarounds ===&lt;br /&gt;
* No resolution reported by touchscreen driver. Workaround: patch &amp;lt;code&amp;gt;cyttsp5.c&amp;lt;/code&amp;gt; and device tree: https://gitlab.com/hrdl/linux/-/commit/f1f9eb197d3bd88c9189ab9d8fba2d03d2e13960 or set &amp;lt;code&amp;gt;AttrSizeHint=210x157&amp;lt;/code&amp;gt;.&lt;br /&gt;
** Remaining issues: the resolution is integer-valued. Due to rounding errors this leads to a reported touchscreen size of 233x155mm instead of the configured 210x157mm. This probably causes the touch arbitration rectangle to shrink slightly.&lt;br /&gt;
** TODO: check whether rotation of the touchscreen and tablet also rotate libinput's coordinate system so the rectangle used for touch arbitration is rotated correctly. Preliminary investigations suggest multiple issues related to touch screen arbitration: https://gitlab.freedesktop.org/libinput/libinput/-/issues/853&lt;br /&gt;
* Alternatively, patch libinput to use &amp;lt;code&amp;gt;ARBITRATION_IGNORE_ALL&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;ARBITRATION_IGNORE_RECT&amp;lt;/code&amp;gt;: https://gitlab.com/hrdl/pinenote-shared/-/blob/main/patches/libinput/0001-Make-touch-screen-arbitration-position-independent.patch&lt;br /&gt;
&lt;br /&gt;
[[Category:PineNote]]&lt;/div&gt;</summary>
		<author><name>C2c0</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PineNote_Development/Software_Tweaks&amp;diff=15820</id>
		<title>PineNote Development/Software Tweaks</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PineNote_Development/Software_Tweaks&amp;diff=15820"/>
		<updated>2023-01-29T21:04:06Z</updated>

		<summary type="html">&lt;p&gt;C2c0: Add information on libinput&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Fixing Bluetooth ==&lt;br /&gt;
Some users have noticed instability with their wireless driver. Upgrading the driver to the version provided by LibreELEC may help! To do this, download the BCM4345C0.hcd, brcmfmac43455-sdio.bin, and brcmfmac43455-sdio.txt from the [https://github.com/LibreELEC/brcmfmac_sdio-firmware/tree/master libreELEC repositories] and place them in the same location as your previous firmware (`/lib/firmware/brmc/`). Then rename brcmfmac43455-sdio.{txt,bin} as `brcmfmac43455-sdio.pine64,pinenote-v1.2.{txt,bin}`. If this doesn't help, ask about it in the matrix chat!&lt;br /&gt;
&lt;br /&gt;
=== Preliminary fix for stuttering bluetooth audio ===&lt;br /&gt;
Following a fix used for the Quartz Model A (which uses the same SoC as the Pinenote), we can modify the device tree prior to building the kernel to try to mitigate poor Bluetooth audio streaming. (reference: see https://lore.kernel.org/linux-arm-kernel/20220926055435.31284-1-leo@nabam.net/T/)&lt;br /&gt;
&lt;br /&gt;
'''Steps:'''&lt;br /&gt;
&lt;br /&gt;
* Open &amp;lt;code&amp;gt;arch/arm64/boot/dts/rockchip/rk3566-pinenote.dtsi&amp;lt;/code&amp;gt;&lt;br /&gt;
* Go to line 939, &amp;quot;bluetooth&amp;quot;, under the &amp;quot;uart1&amp;quot; section&lt;br /&gt;
* Edit the two lines that read &amp;quot;device-wake-gpios&amp;quot; and &amp;quot;host-wake-gpios&amp;quot;; you want them to read &amp;quot;device-wakeup-gpios&amp;quot; and &amp;quot;host-wakeup-gpios&amp;quot; respectively&lt;br /&gt;
* Add the following line to the end of the bluetooth section (under the vddio-supply line in my .dtsi): &amp;quot;max-speed = &amp;lt;3000000&amp;gt;;&amp;quot; &lt;br /&gt;
* Count your zeros, don't forget your punctuation..&lt;br /&gt;
&lt;br /&gt;
'''Caveats:'''&lt;br /&gt;
&lt;br /&gt;
This will improve BT audio quality at least when using the AAC codec. In my experience, the quality is more than acceptable, but there are still issues apparent: occasional isolated stutters even on AAC; prohibitively frequent stutters on SBC-XQ remain. Fully resolving BT audio issues might require further changes similar to the one described above, or may alternatively be a matter of audio software settings (e. g., process priority, audio server buffer settings). Investigation ongoing.&lt;br /&gt;
&lt;br /&gt;
== libinput Palm Detection ==&lt;br /&gt;
See https://gitlab.com/hrdl/pinenote-shared/-/blob/main/etc/libinput/local-overrides.quirks.&lt;br /&gt;
&lt;br /&gt;
== libinput Touch Arbitration ==&lt;br /&gt;
Prerequisites: setup touch arbitration via udev: https://gitlab.com/hrdl/pinenote-shared/-/blob/main/etc/udev/rules.d/81-libinput-pinenote.rules&lt;br /&gt;
&lt;br /&gt;
=== Issues and workarounds ===&lt;br /&gt;
* No resolution reported by touchscreen driver. Workaround: patch &amp;lt;code&amp;gt;cyttsp5.c&amp;lt;/code&amp;gt; and device tree: https://gitlab.com/hrdl/linux/-/commit/f1f9eb197d3bd88c9189ab9d8fba2d03d2e13960&lt;br /&gt;
** Remaining issues: the resolution is integer-valued. Due to rounding errors this leads to a reported touchscreen size of 233x155mm instead of the configured 210x157mm.&lt;br /&gt;
** TODO: check whether rotation of the touchscreen and tablet also rotate libinput's coordinate system so the rectangle used for touch arbitration is rotated correctly.&lt;br /&gt;
* Alternatively, patch libinput to use &amp;lt;code&amp;gt;ARBITRATION_IGNORE_ALL&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;ARBITRATION_IGNORE_RECT&amp;lt;/code&amp;gt;: https://gitlab.com/hrdl/pinenote-shared/-/blob/main/patches/libinput/0001-Make-touch-screen-arbitration-position-independent.patch&lt;br /&gt;
&lt;br /&gt;
[[Category:PineNote]]&lt;/div&gt;</summary>
		<author><name>C2c0</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PineNote_Development/Apps&amp;diff=15807</id>
		<title>PineNote Development/Apps</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PineNote_Development/Apps&amp;diff=15807"/>
		<updated>2023-01-26T18:49:38Z</updated>

		<summary type="html">&lt;p&gt;C2c0: /* Extend Xournal++ section */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Development = &lt;br /&gt;
&lt;br /&gt;
Here are some resources you may find helpful in learning to develop on embedded Linux devices:&lt;br /&gt;
* Great YouTube series introducing you to the kernel and lower-level components of Linux: https://www.youtube.com/watch?v=WiZ05pnHZqM&lt;br /&gt;
* https://embetronicx.com/&lt;br /&gt;
* https://bootlin.com/training/&lt;br /&gt;
* https://www.nand2tetris.org&lt;br /&gt;
&lt;br /&gt;
Emulator recommendation for developing and testing PineNote apps: https://github.com/michaelshiel/picom-epaper&lt;br /&gt;
&lt;br /&gt;
The PineNote is a specialized device, mainly due to the eink display having unique display and refresh characteristics.&lt;br /&gt;
Finding and configuring apps that work well sometimes requires a lot of tweaking and a lot exploring, especially for&lt;br /&gt;
applications containing fast screen updates and animations, as well as depend on a lot of colors.&lt;br /&gt;
&lt;br /&gt;
[https://www.youtube.com/watch?v=ZCLyJfbzbrU Here is a video] showing the performance of a few applications.&lt;br /&gt;
&lt;br /&gt;
= Desktop Environments =&lt;br /&gt;
&lt;br /&gt;
=== Sway ===&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/hmpthcs/WinkShell WinkShell] &amp;quot;Collected applications, configurations and scripts for using a wlroots-based compositor with an EPD (aka e-ink display). Currently supports Sway only.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/0cc4m/pinenote-misc/blob/main/sway/config/sway/config 0cc4m's config]&lt;br /&gt;
&lt;br /&gt;
==== Getting touch + pen working on sway ====&lt;br /&gt;
&lt;br /&gt;
If you notice that touching the screen works, but when you use the pen the mouse coordinates are inverted, don't worry! We can fix it! Set &amp;lt;code&amp;gt;rockchip_ebc.panel_reflection=0&amp;lt;/code&amp;gt; on boot (see [https://wiki.pine64.org/wiki/PineNote_Development/Building_Kernel#Configuring_the_driver this page] for more info). Add the following line to your sway config:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# This line rotates the mouse input by 180 degrees. See https://wayland.freedesktop.org/libinput/doc/1.11.3/absolute_axes.html&lt;br /&gt;
input &amp;quot;type:table_tool&amp;quot; calibration_matrix -1 0 1 0 -1 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Gnome ===&lt;br /&gt;
[https://github.com/m-weigand/mw_pinenote_misc/tree/main/gnome Maximilian's Config]&lt;br /&gt;
&lt;br /&gt;
{{info|You may need to compile a [https://github.com/m-weigand/mw_pinenote_misc/blob/main/compile_mutter.sh modified mutter] as well.}}&lt;br /&gt;
&lt;br /&gt;
==== GTK3 ====&lt;br /&gt;
High contrast style for eink-devices can be found [https://github.com/MichiMolle/gtk3-eink here].&lt;br /&gt;
&lt;br /&gt;
==== GTK4 ====&lt;br /&gt;
High contrast style for eink-devices can be found [https://github.com/MichiMolle/gtk4-eink here].&lt;br /&gt;
&lt;br /&gt;
= Application support on the PineNote =&lt;br /&gt;
== Notetaking ==&lt;br /&gt;
&lt;br /&gt;
=== Xournal++ ===&lt;br /&gt;
Works well, writing is pretty quick. The development version supports PDF highlighting, links, and  offers repainting-related optimisations (https://github.com/xournalpp/xournalpp/commit/c0a91f02afbfb67a60f7088b4c579a796693e05d and https://github.com/xournalpp/xournalpp/commit/ce1c66cb6d78f3332714ca21d279cf20548d7c06). To improve the performance even further apply https://github.com/xournalpp/xournalpp/pull/4158 and https://github.com/xournalpp/xournalpp/pull/4611 while on master.&lt;br /&gt;
&lt;br /&gt;
Xournal++ uses anti-aliasing and interpolation, which do not work well for the A1 waveform. Mitigations include using either dithering or black-white mode in the ebc driver, or compiling Xournal++ with https://gitlab.com/hrdl/pinenote-shared/-/blob/main/patches/xournalpp/0001-Disable-anti-aliasing-and-use-NEAREST-interpolation-.patch.&lt;br /&gt;
&lt;br /&gt;
=== Obsidian ===&lt;br /&gt;
Works well, EInk-Theme can be found [https://github.com/MichiMolle/obsidian-eink here].&lt;br /&gt;
&lt;br /&gt;
== Web Browsing ==&lt;br /&gt;
&lt;br /&gt;
=== Firefox ===&lt;br /&gt;
Pretty good experience! Enabling GPU acceleration is helpful.&lt;br /&gt;
&lt;br /&gt;
==== GPU Acceleration in Firefox ====&lt;br /&gt;
See [https://github.com/0cc4m/pinenote-misc#firefox-hardware-acceleration 0ccam's notes here].&lt;br /&gt;
&lt;br /&gt;
== &amp;quot;Cloud&amp;quot; ==&lt;br /&gt;
=== syncthing ===&lt;br /&gt;
High contrast theme can be found [https://github.com/MichiMolle/syncthing-eink here].&lt;br /&gt;
&lt;br /&gt;
[[Category:PineNote]]&lt;/div&gt;</summary>
		<author><name>C2c0</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PineNote_Development&amp;diff=15294</id>
		<title>PineNote Development</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PineNote_Development&amp;diff=15294"/>
		<updated>2023-01-10T11:48:02Z</updated>

		<summary type="html">&lt;p&gt;C2c0: /* Kernel modules / mainlining status */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article seeks to provide general development information for the [[PineNote]]. If you are new and down to try a new installation process, the easiest way to get linux is likely to [https://wiki.pine64.org/wiki/PineNote_Development/Installing_Debian install Debian] -- NOTE THAT THIS INSTALLATION PROCESS IS VERY NEW. While many people have been using the kernel that will be installed safely at this point, the instructions for installing Debian via rootfs are very new. Take backups!&lt;br /&gt;
&lt;br /&gt;
The more stable recommended approach is described below:&lt;br /&gt;
&lt;br /&gt;
Start with [https://github.com/DorianRudolph/pinenotes Dorian's guide] which will guide you through getting Arch installed. For instructions on building the latest kernel, see [[PineNote Development/Building Kernel]]. For helpful configurations, see [[PineNote Development/Apps]]. For ways to pitch in, see [[PineNote Development/TODOs]]. To boot Linux by default instead of Android, see [[PineNote Development/Booting Linux]]. [https://www.youtube.com/watch?v=ZCLyJfbzbrU Here is a video] of a user running Manjaro and some apps on their PineNote on 9/10/2022.&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
&lt;br /&gt;
== Kernel modules / mainlining status ==&lt;br /&gt;
&lt;br /&gt;
WORK IN PROGRESS !&lt;br /&gt;
&lt;br /&gt;
The following table aims to provide a list of kernel modules required for running the PineNote.&lt;br /&gt;
It also aims at listing repositories of work in progress.&lt;br /&gt;
While some overlap with the Quartz64 module list ([[Quartz64_Development#Upstreaming_Status]]) &lt;br /&gt;
is expected, only modules relevant to the PineNote hardware should be listed here.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable plainrowheaders&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Function&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; colspan=&amp;quot;2&amp;quot; | Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Component&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Notes&lt;br /&gt;
|-&lt;br /&gt;
| Touchscreen&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:PaleGreen; text-align:center;&amp;quot;|[https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5b0c03e24a061f9c9e8b28fa157b80990c559a37 Linux Mainline]&lt;br /&gt;
| | &amp;lt;code&amp;gt;cyttsp5&amp;lt;/code&amp;gt;&lt;br /&gt;
| kernel 6.2 merge window&lt;br /&gt;
|-&lt;br /&gt;
| Digitizer&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:PaleGreen; text-align:center;&amp;quot;|Linux Mainline&lt;br /&gt;
| | &amp;lt;code&amp;gt;i2c_hid_of&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Pen BLE Buttons&lt;br /&gt;
| &amp;lt;code&amp;gt;ws8100-pen&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| EBC Display controller&lt;br /&gt;
| &amp;lt;code&amp;gt;rockchip_ebc&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| EBC PMic&lt;br /&gt;
|&amp;lt;code&amp;gt;tps65185&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| LED backlight driver&lt;br /&gt;
| lm3630a&lt;br /&gt;
|-&lt;br /&gt;
| Accelerometer&lt;br /&gt;
| &amp;lt;code&amp;gt;st-accel-i2c&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Rastergraphics unit RGA2e&lt;br /&gt;
| &amp;lt;code&amp;gt;rga&amp;lt;/code&amp;gt; (v4l2 mem2mem driver)&lt;br /&gt;
|-&lt;br /&gt;
| Mali GPU&lt;br /&gt;
| &amp;lt;code&amp;gt;panfrost&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Wifi/BT&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:PaleGreen; text-align:center;&amp;quot;|Linux Mainline&lt;br /&gt;
| | &amp;lt;code&amp;gt;brcmfmac&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= More Information = &lt;br /&gt;
== High-level developer new to embedded linux? ==&lt;br /&gt;
Here are some resources I have found helpful in learning to develop on embedded linux devices:&lt;br /&gt;
* Great youtube series introducing you to the kernel and lower-level components of Linux: https://www.youtube.com/watch?v=WiZ05pnHZqM&lt;br /&gt;
* https://embetronicx.com/&lt;br /&gt;
* https://bootlin.com/training/&lt;br /&gt;
* https://www.nand2tetris.org&lt;br /&gt;
&lt;br /&gt;
== Notes Written by Some Developers ==&lt;br /&gt;
&lt;br /&gt;
* https://github.com/m-weigand/mw_pinenote_misc (Not super legible &amp;quot;notes&amp;quot;, but very helpful repo with patches, videos, etc)&lt;br /&gt;
** specifically see this section for helpful install/configure scripts: https://github.com/m-weigand/mw_pinenote_misc/tree/main/rockchip_ebc/patches#compiling. &lt;br /&gt;
* https://github.com/0cc4m/pinenote-misc&lt;br /&gt;
** patch for enabling gpu: https://github.com/0cc4m/pinenote-misc/blob/main/mesa-archlinux-arm/mesa/rockchip_ebc.patch&lt;br /&gt;
** prebuilt pkg's: https://github.com/0cc4m/pinenote-misc/releases&lt;br /&gt;
* https://pwarren.id.au/pinenote/build_notes.txt&lt;br /&gt;
* https://github.com/DorianRudolph/pinenotes&lt;br /&gt;
* https://github.com/tpwrules/nixos-pinenote&lt;br /&gt;
&lt;br /&gt;
== Alternative to patching of mesa ==&lt;br /&gt;
Mesa needs to be patched to add the driver entry point. The alternative to this, is the renaming of the ebc driver to an existing mesa driver entry point. A good existing name can be &amp;quot;repaper&amp;quot;. To change the driver name, edit in the kernel tree the following files:&amp;lt;br&amp;gt;&lt;br /&gt;
- replace &amp;quot;rockchip-ebc&amp;quot; with &amp;quot;repaper&amp;quot; in the two places in the file: drivers/gpu/drm/rockchip/rockchip_ebc.c &amp;lt;br&amp;gt;&lt;br /&gt;
- preventive, replace &amp;quot;repaper&amp;quot; with &amp;quot;repaper-disabled&amp;quot; in the two places in the file: drivers/gpu/drm/tiny/repaper.c &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Building the most recent kernel ==&lt;br /&gt;
See [https://wiki.pine64.org/wiki/PineNote_Development/Building_Kernel here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Video of Factory Android OS ==&lt;br /&gt;
&lt;br /&gt;
[https://www.youtube.com/watch?v=DWuTGgQHw98 PineNote Developer Edition w/Tech Demo Android OS (Video Only)]&lt;br /&gt;
&lt;br /&gt;
Informal walkthrough of the factory Android installation on the PineNote Developer Edition, recorded by a community member (Apr 2022). This is useful to look back at the original OS after erasing it from your device, or to get some additional detail before your device arrives.&lt;br /&gt;
&lt;br /&gt;
The video also includes a chapter at the end showing [https://www.youtube.com/watch?v=DWuTGgQHw98&amp;amp;t=802s how to enable Android Debug Bridge (`adb`) over USB]. Once enabled, keep the device powered and connect a USB cable directly to the PineNote (i.e. no UART breakout) to a computer running `adb`.&lt;br /&gt;
&lt;br /&gt;
== Emulator for Developing/Testing Pinenote Apps ==&lt;br /&gt;
https://github.com/michaelshiel/picom-epaper&lt;br /&gt;
&lt;br /&gt;
= Flashing Software =&lt;br /&gt;
Currently, the only ways to flash software are from the factory Android installation (UART shell, adb, or fastboot) or by using rkdeveloptool.&lt;br /&gt;
&lt;br /&gt;
== Backup of the content of the internal MMC before you mess anything up ==&lt;br /&gt;
Especially the '''waveform''' partition contains data '''unique''' to your PineNote and is a prime candidate for backup.&lt;br /&gt;
&lt;br /&gt;
But other partitions like uboot (need for any operation of the device) or the un-partitioned space at the beginning containing the GPT partition table (and presumably the VCOM setting for the e-ink display and maybe device mac addresses) contains data you may wish to backup.&lt;br /&gt;
&lt;br /&gt;
Depending of your personal level of data hoarder you may want to backup more than this or even just everything (the large userdata partition is supposed to be able to be repopulated as empty space by Android)&lt;br /&gt;
&lt;br /&gt;
In any case it is easier to restore/extract data from a backup than not having one if you need one.&lt;br /&gt;
&lt;br /&gt;
=== Manually using rkdeveloptool ===&lt;br /&gt;
Dorian has some nice [https://github.com/DorianRudolph/pinenotes notes regarding the PineNote]&lt;br /&gt;
&lt;br /&gt;
Don't forget to install a patched uboot for reading beyond 32MB and to respect the 2GB limit/bug of the current rkdeveloptool as per his notes&lt;br /&gt;
&lt;br /&gt;
=== Automated backup using a script and rkdeveloptool ===&lt;br /&gt;
[https://github.com/talpadk/pinenote-backup pinenote-backup] is a python script for detecting the partitions and automating the backup of partitions or the whole disk&lt;br /&gt;
&lt;br /&gt;
I also requires a patched u-boot but automatically handles the 2GB limit by splitting up larger reads into smaller ones&lt;br /&gt;
&lt;br /&gt;
=== Using the factory Android installation ===&lt;br /&gt;
For any one knowing how and with which caveats: Write ME&lt;br /&gt;
&lt;br /&gt;
=== Using a user installed Linux ===&lt;br /&gt;
A Linux installed to the cache partition should be able to easily backup everything over WiFi or to a USB stick/disk using dd&lt;br /&gt;
&lt;br /&gt;
However the user would need to backup the cache partition themself (if they want that).&lt;br /&gt;
&lt;br /&gt;
And more importantly they would only be getting the backup ''after'' they started playing with the content of the MMC.&lt;br /&gt;
&lt;br /&gt;
== Side-by-side setup ==&lt;br /&gt;
&lt;br /&gt;
It is possible to set up a partition for mainline development without disturbing the factory Android installation. This allows updating a mainline kernel, DTB, and initramfs over Wi-Fi until WiFi or USB OTG is working in mainline Linux.&lt;br /&gt;
&lt;br /&gt;
=== Without Repartitioning ===&lt;br /&gt;
&lt;br /&gt;
The recommended partition for this is &amp;lt;tt&amp;gt;mmcblk0p11&amp;lt;/tt&amp;gt; aka &amp;lt;tt&amp;gt;/cache&amp;lt;/tt&amp;gt;. It is large and already formatted as &amp;lt;tt&amp;gt;ext4&amp;lt;/tt&amp;gt;, so it is readable from U-Boot. Here are some general steps:&lt;br /&gt;
&lt;br /&gt;
# From the UART or adb shell, set up your chroot in &amp;lt;tt&amp;gt;/cache&amp;lt;/tt&amp;gt;. I used the Alpine Linux rootfs tarball.&lt;br /&gt;
# Copy in your kernel and DTB, using for example &amp;lt;tt&amp;gt;scp&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;wget&amp;lt;/tt&amp;gt; inside the chroot.&lt;br /&gt;
# Finally, create and boot an &amp;lt;code&amp;gt;extlinux.conf&amp;lt;/code&amp;gt; as described below.&lt;br /&gt;
&lt;br /&gt;
=== With Repartitioning ===&lt;br /&gt;
&lt;br /&gt;
It is possible to shrink the &amp;lt;tt&amp;gt;userdata&amp;lt;/tt&amp;gt; partition, and create a new partition at the end for use with mainline Linux. This provides much more space than &amp;lt;tt&amp;gt;cache&amp;lt;/tt&amp;gt;. However, because &amp;lt;tt&amp;gt;userdata&amp;lt;/tt&amp;gt; is formatted with &amp;lt;tt&amp;gt;f2fs&amp;lt;/tt&amp;gt;, and that filesystem cannot be shrunk, resizing the partition requires wiping &amp;lt;tt&amp;gt;userdata&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
# Back up any necessary files from userdata&lt;br /&gt;
# Boot to a mainline kernel from &amp;lt;tt&amp;gt;mmcblk0p11&amp;lt;/tt&amp;gt;, either using that partition as rootfs (see above), or using an initramfs with repartitioning tools&lt;br /&gt;
# Modify the partition table with your favorite tool, e.g. &amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt;, or &amp;lt;tt&amp;gt;parted&amp;lt;/tt&amp;gt;&lt;br /&gt;
# Reboot into &amp;lt;tt&amp;gt;fastboot&amp;lt;/tt&amp;gt; and wipe &amp;lt;tt&amp;gt;userdata&amp;lt;/tt&amp;gt;.&lt;br /&gt;
# Reboot into Android, where you can now chroot in and install your favorite distribution to the new partition.&lt;br /&gt;
&lt;br /&gt;
== Using rkdeveloptool ==&lt;br /&gt;
&lt;br /&gt;
rkdeveloptool is a command line utility built on libusb.&lt;br /&gt;
&lt;br /&gt;
=== Downloading and Building rkdeveloptool ===&lt;br /&gt;
&lt;br /&gt;
PINE64 develops [https://gitlab.com/pine64-org/quartz-bsp/rkdeveloptool its own updated fork of rkdeveloptool on GitLab].&lt;br /&gt;
&lt;br /&gt;
You will need to have libusb 1.0, its development headers and scdoc installed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone https://gitlab.com/pine64-org/quartz-bsp/rkdeveloptool.git&lt;br /&gt;
cd rkdeveloptool&lt;br /&gt;
mkdir build&lt;br /&gt;
cd build&lt;br /&gt;
cmake ..&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This sets up all the build files. You can then compile with &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; inside the build directory.&lt;br /&gt;
&lt;br /&gt;
After you're done, you'll likely also need to install the udev rules, or else your user won't have permission to access the USB devices:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo cp 99-rk-rockusb.rules /etc/udev/rules.d/&lt;br /&gt;
sudo udevadm control --reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copying the udev rules is also performed automatically when you &amp;lt;code&amp;gt;make install&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Building Downstream U-Boot ===&lt;br /&gt;
&lt;br /&gt;
While in maskrom mode, we need to have a u-boot to download onto the device for any of the other commands to work. To build you'll also need to install device-tree-compiler.&lt;br /&gt;
&lt;br /&gt;
You also need to install Python and pyelftools.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Note that rkbin is a &amp;amp;gt;5GB download!&amp;lt;/b&amp;gt; This will take some time to clone and process the deltas.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone -b quartz64 https://gitlab.com/pgwipeout/u-boot-rockchip.git&lt;br /&gt;
git clone -b rkbin https://github.com/JeffyCN/rockchip_mirrors.git rkbin&lt;br /&gt;
cd u-boot-rockchip&lt;br /&gt;
# If using Arch Linux, export CROSS_COMPILE=aarch64-linux-gnu-&lt;br /&gt;
export CROSS_COMPILE=aarch64-none-linux-gnu-&lt;br /&gt;
make rk3566-quartz64_defconfig&lt;br /&gt;
./make.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
In the version I cloned (current as of 2022-01-02), I had to make a change to one line to get a clean compilation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
diff --git a/lib/avb/libavb/avb_slot_verify.c b/lib/avb/libavb/avb_slot_verify.c&lt;br /&gt;
index 123701fc3b..64a1ce6450 100644&lt;br /&gt;
--- a/lib/avb/libavb/avb_slot_verify.c&lt;br /&gt;
+++ b/lib/avb/libavb/avb_slot_verify.c&lt;br /&gt;
@@ -296,7 +296,7 @@ static AvbSlotVerifyResult load_and_verify_hash_partition(&lt;br /&gt;
   bool image_preloaded = false;&lt;br /&gt;
   uint8_t* digest;&lt;br /&gt;
   size_t digest_len;&lt;br /&gt;
-  const char* found;&lt;br /&gt;
+  const char* found = NULL;&lt;br /&gt;
   uint64_t image_size;&lt;br /&gt;
   size_t expected_digest_len = 0;&lt;br /&gt;
   uint8_t expected_digest_buf[AVB_SHA512_DIGEST_SIZE];&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For systems where the global python executable points to python2, compilation fails with an error related to pyelftools not being installed (even if it is). To fix this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
diff --git a/make.sh b/make.sh&lt;br /&gt;
index 2bba05b4e4..cfe5b0afd5 100755&lt;br /&gt;
--- a/make.sh&lt;br /&gt;
+++ b/make.sh&lt;br /&gt;
@@ -758,7 +758,7 @@ function pack_fit_image()&lt;br /&gt;
        fi&lt;br /&gt;
 &lt;br /&gt;
        if [ &amp;quot;${ARM64_TRUSTZONE}&amp;quot; == &amp;quot;y&amp;quot; ]; then&lt;br /&gt;
-               if ! python -c &amp;quot;import elftools&amp;quot; ; then&lt;br /&gt;
+               if ! python3 -c &amp;quot;import elftools&amp;quot; ; then&lt;br /&gt;
                        echo &amp;quot;ERROR: No python 'pyelftools', please: pip install pyelftools&amp;quot;&lt;br /&gt;
                        exit 1&lt;br /&gt;
                fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Entering Maskrom/Rockusb Mode ===&lt;br /&gt;
&lt;br /&gt;
There are three ways to get into Maskrom/Rockusb mode:&lt;br /&gt;
&lt;br /&gt;
====  The easy way ====&lt;br /&gt;
&lt;br /&gt;
# Flip the device around so that the display faces down&lt;br /&gt;
# Lay the pen on the right side, with its tip pointing towards the speaker grill, and its magnet pointing towards the upper right corner of the label on the back (or place the magnetic cap from the pen on the spot marked on the back).&lt;br /&gt;
# Turn the device on and wait for it to show up in &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt;. It should now be in Loader mode, according to &amp;lt;code&amp;gt;rkdeveloptool list-devices&amp;lt;/code&amp;gt; (note that &amp;quot;Loader&amp;quot; here indicates U-Boot's Rockusb; separately, booting with an erased eMMC displays &amp;quot;Maskrom&amp;quot; [not &amp;quot;Loader&amp;quot;] from the RK3566).&lt;br /&gt;
# Unplug the device and plug it back in. It should now be in Rockusb mode.&lt;br /&gt;
&lt;br /&gt;
This can be a bit fiddly to get right, and may need a few tries.&lt;br /&gt;
&lt;br /&gt;
==== The u-boot way ====&lt;br /&gt;
# Interrupt the u-boot startup using ctrl-c (while attached using an UART dongle)&lt;br /&gt;
# While in u-boot use the command &amp;quot;rockusb 0 mmc 0&amp;quot; to start rockusb mode.&lt;br /&gt;
&lt;br /&gt;
One benefit from this is, that if you have an UART dongle that allows to simultaneous having an UART and USB connection, there is no need to plug and unplug cables and flipping the PineNote around and placing magnets.  &lt;br /&gt;
&lt;br /&gt;
This is especially helpful when changing back and forth between u-boot and rockusb, for instance when trying to develop u-boot.&lt;br /&gt;
&lt;br /&gt;
==== Shorting test points ====&lt;br /&gt;
&lt;br /&gt;
If the bootloader is broken/corrupted, you cannot get to Maskrom without opening up the device (it can be opened using spudger and a bit of patience).&lt;br /&gt;
&lt;br /&gt;
Once inside, short TP1301 (GND) and TP1302 (eMMC_D0/FLASH_D0) with a small tweezers, this is how it looks on board view (credit to Caleb):&lt;br /&gt;
&lt;br /&gt;
[[File:PineNote_Maskrom_TP.png|500px]]&lt;br /&gt;
&lt;br /&gt;
Then plug the device to the computer and if you see the device with VID=2207/PID=350a then it should be in Maskrom mode, you can verify by typing &amp;lt;code&amp;gt;rkdeveloptool list-devices&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;Jan 07 15:04:13 melttower kernel: usb 1-14: New USB device found, idVendor=2207, idProduct=350a, bcdDevice= 1.00&lt;br /&gt;
Jan 07 15:04:13 melttower kernel: usb 1-14: New USB device strings: Mfr=0, Product=0, SerialNumber=0&lt;br /&gt;
&lt;br /&gt;
$ rkdeveloptool list-devices&lt;br /&gt;
DevNo=1 Vid=0x2207,Pid=0x350a,LocationID=10e    Maskrom&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If nothing shows up, you can try to hold down the power button for 5 seconds and then try again.&lt;br /&gt;
&lt;br /&gt;
=== Running rkdeveloptool ===&lt;br /&gt;
&lt;br /&gt;
First, you'll want to make sure the device you've connected is in maskrom mode:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./rkdeveloptool list&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It should output something like &amp;lt;code&amp;gt;DevNo=1 Vid=0x2207,Pid=0x350a,LocationID=202    Maskrom&amp;lt;/code&amp;gt;. If it doesn't, see [[PineNote Development#Entering Maskrom Mode]].&lt;br /&gt;
&lt;br /&gt;
You can now download u-boot onto it:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./rkdeveloptool boot ../u-boot-rockchip/rk356x_spl_loader_v1.08.111.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This should output &amp;lt;code&amp;gt;Downloading bootloader succeeded.&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
We can now verify that this worked using e.g. the &amp;quot;read flash info&amp;quot; command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./rkdeveloptool read-flash-info&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''TODO:''' finish this section&lt;br /&gt;
&lt;br /&gt;
=== Creating a mainline boot image ===&lt;br /&gt;
&lt;br /&gt;
You can create a filesystem image that replaces the Android boot or recovery partition by doing roughly the following:&lt;br /&gt;
&lt;br /&gt;
# Erase boot and dtbo with rkdeveloptool or fastboot (back them up first!!!)&lt;br /&gt;
# Create an ext2 partition image and mount it (fallocate, mkfs.ext2)&lt;br /&gt;
# Build your mainline kernel&lt;br /&gt;
# Copy the kernel, dtb and an initramfs to the root of the mounted image (use any old postmarketOS initramfs)&lt;br /&gt;
# Create a file in the root of the mounted image called &amp;lt;code&amp;gt;extlinux.conf&amp;lt;/code&amp;gt; as described below&lt;br /&gt;
# Unmount the image and then use rkdeveloptool to flash it to the &amp;quot;recovery&amp;quot; partition on the pinenote (it's about the right size until we get around to replacing the partition layout).&lt;br /&gt;
&lt;br /&gt;
== Using fastboot ==&lt;br /&gt;
&lt;br /&gt;
Follow the steps for &amp;quot;Creating a mainline boot.img&amp;quot;, but instead of flashing it with rkdeveloptool, use fastboot. You can enter fastboot in either of two ways:&lt;br /&gt;
&lt;br /&gt;
# Use &amp;quot;reboot bootloader&amp;quot; from adb or a UART console.&lt;br /&gt;
# Get a U-Boot prompt and run &amp;lt;code&amp;gt;fastboot usb 0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
= Mainline development =&lt;br /&gt;
&lt;br /&gt;
== Status ==&lt;br /&gt;
&lt;br /&gt;
Some work happening here: https://gitlab.com/calebccff/linux, the idea is to import the parts of the eink/ebc drivers which are open source and use the downstream u-boot framebuffer driver as a reference to create a basic framebuffer driver.&lt;br /&gt;
&lt;br /&gt;
Currently mainline struggles to boot due to weird issues while probing fixed regulators (?). It also fails to detect eMMC.&lt;br /&gt;
&lt;br /&gt;
Further work is being done here: https://github.com/smaeul/linux/commits/rk356x-ebc-dev. This has a complete device tree, with working eMMC. Pen input also works out of the box. Wi-Fi and BT work with firmware copied from the factory Android image.&lt;br /&gt;
&lt;br /&gt;
== How to boot mainline ==&lt;br /&gt;
&lt;br /&gt;
UART is currently REQUIRED for this to work! We depend on u-boot falling back to console. Once we have a prebuilt u-boot which will use extlinux by default, UART won't be needed anymore.&lt;br /&gt;
&lt;br /&gt;
You can compile a u-boot that uses extlinux by default by following the instructions [https://github.com/JoshuaMulliken/pinenote_uboot/blob/aa9ecbd3d3e716f163f5a900824630f24e9f04ba/README.md#changing-default-boot-order here].&lt;br /&gt;
&lt;br /&gt;
=== Getting to a U-Boot prompt ===&lt;br /&gt;
&lt;br /&gt;
You can get to a U-Boot prompt by:&lt;br /&gt;
&lt;br /&gt;
# Holding Ctrl-C while the display panel initializes.&lt;br /&gt;
# Wiping the &amp;quot;boot&amp;quot; partition.&lt;br /&gt;
&lt;br /&gt;
=== Using sysboot ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;extlinux.conf&amp;lt;/code&amp;gt; should have the following contents:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
timeout 10&lt;br /&gt;
default MAINLINE&lt;br /&gt;
menu title boot prev kernel&lt;br /&gt;
&lt;br /&gt;
label MAINLINE&lt;br /&gt;
  kernel /vmlinuz&lt;br /&gt;
  fdt /rk3566-pinenote.dtb&lt;br /&gt;
  initrd /initramfs&lt;br /&gt;
  append earlycon console=tty0 console=ttyS2,1500000n8 fw_devlink=off PMOS_NO_OUTPUT_REDIRECT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At the u-boot console, run the following command to boot your mainline kernel:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sysboot ${devtype} ${devnum}:9 any ${scriptaddr} extlinux.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Booting with individual commands ===&lt;br /&gt;
&lt;br /&gt;
Booting with individual commands can be useful when you need to temporarily add some kernel command line arguments. Use these or similar commands at the U-Boot shell:&lt;br /&gt;
&lt;br /&gt;
 load mmc 0:b ${kernel_addr_r} boot/Image&lt;br /&gt;
 load mmc 0:b ${fdt_addr_r} boot/rk3566-pinenote.dtb&lt;br /&gt;
 setenv bootargs ignore_loglevel root=/dev/mmcblk0p11 rootwait init=/bin/bash&lt;br /&gt;
 booti ${kernel_addr_r} - ${fdt_addr_r}&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
=== Firmware for WiFi &amp;amp; Bluetooth and Waveform data ===&lt;br /&gt;
&lt;br /&gt;
==== Using Maximilian's Debian image  ====&lt;br /&gt;
If the Android partition (super) and waveform partition (waveform) is left intact the image extracts the WiFi, BT driver and waveform from the partitions on first run.&lt;br /&gt;
&lt;br /&gt;
For instance if you repartitions the userdata partition and installs the image there.&lt;br /&gt;
&lt;br /&gt;
==== Getting it from the Android install manually ====&lt;br /&gt;
Copy WiFi/BT firmware from Android:&lt;br /&gt;
 mkdir -p /cache/lib/firmware/brcm&lt;br /&gt;
 cp /vendor/etc/firmware/fw_bcm43455c0_ag_cy.bin /cache/lib/firmware/brcm/brcmfmac43455-sdio.bin&lt;br /&gt;
 cp /vendor/etc/firmware/nvram_ap6255_cy.txt /cache/lib/firmware/brcm/brcmfmac43455-sdio.txt&lt;br /&gt;
 cp /cache/lib/firmware/BCM4345C0.hcd /cache/lib/firmware/brcm/BCM4345C0.hcd&lt;br /&gt;
&lt;br /&gt;
Copy waveform partition (via previously dumped file):&lt;br /&gt;
 adb root&lt;br /&gt;
 adb push waveform.img /cache/lib/firmware/waveform.bin&lt;br /&gt;
&lt;br /&gt;
Or via dd within Linux:&lt;br /&gt;
 dd if=/dev/mmcblk0p3 of=/lib/firmware/waveform.bin bs=1k count=2048&lt;br /&gt;
&lt;br /&gt;
==== Getting the Wifi and Bluetooth driver blobs from &amp;quot;other&amp;quot; sources ====&lt;br /&gt;
===== WiFi =====&lt;br /&gt;
The WiFi firmware .bin blob can be obtained by installing the Debian package firmware-brcm80211 (in the non-free section)&lt;br /&gt;
&lt;br /&gt;
The WiFi brcmfmac43455-sdio.txt file can according to Eugen be sourced from https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/brcm/brcmfmac43455-sdio.AW-CM256SM.txt needs a renaming when copying it to /lib/firmware/brcm/brcmfmac43455-sdio.txt)&lt;br /&gt;
&lt;br /&gt;
''The content of the upstream .txt is different than the Android configuration, but is supposed to work.''&lt;br /&gt;
&lt;br /&gt;
As you don't have WiFi yet you need to get the firmware-brcm80211*.deb and brcmfmac43455-sdio.txt file on the PineNote by other means, for instance using an USB stick&lt;br /&gt;
&lt;br /&gt;
===== Bluetooth =====&lt;br /&gt;
&lt;br /&gt;
Once you have WiFi working you can get BCM4345C0.hcd by installing the bluez-firmware &lt;br /&gt;
  sudo apt install bluez-firmware&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Configuring the E-ink refresh mode ===&lt;br /&gt;
https://github.com/m-weigand/mw_pinenote_misc/tree/main/rockchip_ebc/patches contains information on how/where to write in /sys to alter the refresh mode&lt;br /&gt;
&lt;br /&gt;
https://github.com/m-weigand/mw_pinenote_misc/tree/main/gnome_extension contains the gnome extension used in Maximilian image &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Touchscreen and Pen In X.org ===&lt;br /&gt;
&lt;br /&gt;
By default the pen config is flipped 180° (which makes it unusable) and the touchscreen doesn't work. Placing the following config in &amp;lt;code&amp;gt;/etc/X11/xorg.conf.d/50-touchscreen.conf&amp;lt;/code&amp;gt; will fix both problems:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Section &amp;quot;InputClass&amp;quot;&lt;br /&gt;
    Identifier &amp;quot;evdev touchscreen&amp;quot;&lt;br /&gt;
    MatchProduct &amp;quot;tt21000&amp;quot;&lt;br /&gt;
    MatchIsTouchscreen &amp;quot;on&amp;quot;&lt;br /&gt;
    Driver        &amp;quot;evdev&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
Section &amp;quot;InputClass&amp;quot;&lt;br /&gt;
    Identifier    &amp;quot;RotateTouch&amp;quot;&lt;br /&gt;
    MatchProduct    &amp;quot;w9013&amp;quot;&lt;br /&gt;
    Option    &amp;quot;TransformationMatrix&amp;quot; &amp;quot;-1 0 1 0 -1 1 0 0 1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>C2c0</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PineNote_Development&amp;diff=15293</id>
		<title>PineNote Development</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PineNote_Development&amp;diff=15293"/>
		<updated>2023-01-10T10:11:34Z</updated>

		<summary type="html">&lt;p&gt;C2c0: /* Kernel modules / mainlining status */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article seeks to provide general development information for the [[PineNote]]. If you are new and down to try a new installation process, the easiest way to get linux is likely to [https://wiki.pine64.org/wiki/PineNote_Development/Installing_Debian install Debian] -- NOTE THAT THIS INSTALLATION PROCESS IS VERY NEW. While many people have been using the kernel that will be installed safely at this point, the instructions for installing Debian via rootfs are very new. Take backups!&lt;br /&gt;
&lt;br /&gt;
The more stable recommended approach is described below:&lt;br /&gt;
&lt;br /&gt;
Start with [https://github.com/DorianRudolph/pinenotes Dorian's guide] which will guide you through getting Arch installed. For instructions on building the latest kernel, see [[PineNote Development/Building Kernel]]. For helpful configurations, see [[PineNote Development/Apps]]. For ways to pitch in, see [[PineNote Development/TODOs]]. To boot Linux by default instead of Android, see [[PineNote Development/Booting Linux]]. [https://www.youtube.com/watch?v=ZCLyJfbzbrU Here is a video] of a user running Manjaro and some apps on their PineNote on 9/10/2022.&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
&lt;br /&gt;
== Kernel modules / mainlining status ==&lt;br /&gt;
&lt;br /&gt;
WORK IN PROGRESS !&lt;br /&gt;
&lt;br /&gt;
The following table aims to provide a list of kernel modules required for running the PineNote.&lt;br /&gt;
It also aims at listing repositories of work in progress.&lt;br /&gt;
While some overlap with the Quartz64 module list ([[Quartz64_Development#Upstreaming_Status]]) &lt;br /&gt;
is expected, only modules relevant to the PineNote hardware should be listed here.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable plainrowheaders&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Function&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; colspan=&amp;quot;2&amp;quot; | Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Component&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Notes&lt;br /&gt;
|-&lt;br /&gt;
| Touchscreen&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:PaleGreen; text-align:center;&amp;quot;|Linux Mainline&lt;br /&gt;
| | &amp;lt;code&amp;gt;cyttsp5&amp;lt;/code&amp;gt;&lt;br /&gt;
| kernel 6.2 merge window ?&lt;br /&gt;
|-&lt;br /&gt;
| Digitizer&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:PaleGreen; text-align:center;&amp;quot;|Linux Mainline&lt;br /&gt;
| | &amp;lt;code&amp;gt;i2c_hid_of&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Pen BLE Buttons&lt;br /&gt;
| &amp;lt;code&amp;gt;ws8100-pen&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| EBC Display controller&lt;br /&gt;
| &amp;lt;code&amp;gt;rockchip_ebc&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| EBC PMic&lt;br /&gt;
|&amp;lt;code&amp;gt;tps65185&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| LED backlight driver&lt;br /&gt;
| lm3630a&lt;br /&gt;
|-&lt;br /&gt;
| Accelerometer&lt;br /&gt;
| &amp;lt;code&amp;gt;st-accel-i2c&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Rastergraphics unit RGA2e&lt;br /&gt;
| &amp;lt;code&amp;gt;rga&amp;lt;/code&amp;gt; (v4l2 mem2mem driver)&lt;br /&gt;
|-&lt;br /&gt;
| Mali GPU&lt;br /&gt;
| &amp;lt;code&amp;gt;panfrost&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Wifi/BT&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:PaleGreen; text-align:center;&amp;quot;|Linux Mainline&lt;br /&gt;
| | &amp;lt;code&amp;gt;brcmfmac&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= More Information = &lt;br /&gt;
== High-level developer new to embedded linux? ==&lt;br /&gt;
Here are some resources I have found helpful in learning to develop on embedded linux devices:&lt;br /&gt;
* Great youtube series introducing you to the kernel and lower-level components of Linux: https://www.youtube.com/watch?v=WiZ05pnHZqM&lt;br /&gt;
* https://embetronicx.com/&lt;br /&gt;
* https://bootlin.com/training/&lt;br /&gt;
* https://www.nand2tetris.org&lt;br /&gt;
&lt;br /&gt;
== Notes Written by Some Developers ==&lt;br /&gt;
&lt;br /&gt;
* https://github.com/m-weigand/mw_pinenote_misc (Not super legible &amp;quot;notes&amp;quot;, but very helpful repo with patches, videos, etc)&lt;br /&gt;
** specifically see this section for helpful install/configure scripts: https://github.com/m-weigand/mw_pinenote_misc/tree/main/rockchip_ebc/patches#compiling. &lt;br /&gt;
* https://github.com/0cc4m/pinenote-misc&lt;br /&gt;
** patch for enabling gpu: https://github.com/0cc4m/pinenote-misc/blob/main/mesa-archlinux-arm/mesa/rockchip_ebc.patch&lt;br /&gt;
** prebuilt pkg's: https://github.com/0cc4m/pinenote-misc/releases&lt;br /&gt;
* https://pwarren.id.au/pinenote/build_notes.txt&lt;br /&gt;
* https://github.com/DorianRudolph/pinenotes&lt;br /&gt;
* https://github.com/tpwrules/nixos-pinenote&lt;br /&gt;
&lt;br /&gt;
== Alternative to patching of mesa ==&lt;br /&gt;
Mesa needs to be patched to add the driver entry point. The alternative to this, is the renaming of the ebc driver to an existing mesa driver entry point. A good existing name can be &amp;quot;repaper&amp;quot;. To change the driver name, edit in the kernel tree the following files:&amp;lt;br&amp;gt;&lt;br /&gt;
- replace &amp;quot;rockchip-ebc&amp;quot; with &amp;quot;repaper&amp;quot; in the two places in the file: drivers/gpu/drm/rockchip/rockchip_ebc.c &amp;lt;br&amp;gt;&lt;br /&gt;
- preventive, replace &amp;quot;repaper&amp;quot; with &amp;quot;repaper-disabled&amp;quot; in the two places in the file: drivers/gpu/drm/tiny/repaper.c &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Building the most recent kernel ==&lt;br /&gt;
See [https://wiki.pine64.org/wiki/PineNote_Development/Building_Kernel here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Video of Factory Android OS ==&lt;br /&gt;
&lt;br /&gt;
[https://www.youtube.com/watch?v=DWuTGgQHw98 PineNote Developer Edition w/Tech Demo Android OS (Video Only)]&lt;br /&gt;
&lt;br /&gt;
Informal walkthrough of the factory Android installation on the PineNote Developer Edition, recorded by a community member (Apr 2022). This is useful to look back at the original OS after erasing it from your device, or to get some additional detail before your device arrives.&lt;br /&gt;
&lt;br /&gt;
The video also includes a chapter at the end showing [https://www.youtube.com/watch?v=DWuTGgQHw98&amp;amp;t=802s how to enable Android Debug Bridge (`adb`) over USB]. Once enabled, keep the device powered and connect a USB cable directly to the PineNote (i.e. no UART breakout) to a computer running `adb`.&lt;br /&gt;
&lt;br /&gt;
== Emulator for Developing/Testing Pinenote Apps ==&lt;br /&gt;
https://github.com/michaelshiel/picom-epaper&lt;br /&gt;
&lt;br /&gt;
= Flashing Software =&lt;br /&gt;
Currently, the only ways to flash software are from the factory Android installation (UART shell, adb, or fastboot) or by using rkdeveloptool.&lt;br /&gt;
&lt;br /&gt;
== Backup of the content of the internal MMC before you mess anything up ==&lt;br /&gt;
Especially the '''waveform''' partition contains data '''unique''' to your PineNote and is a prime candidate for backup.&lt;br /&gt;
&lt;br /&gt;
But other partitions like uboot (need for any operation of the device) or the un-partitioned space at the beginning containing the GPT partition table (and presumably the VCOM setting for the e-ink display and maybe device mac addresses) contains data you may wish to backup.&lt;br /&gt;
&lt;br /&gt;
Depending of your personal level of data hoarder you may want to backup more than this or even just everything (the large userdata partition is supposed to be able to be repopulated as empty space by Android)&lt;br /&gt;
&lt;br /&gt;
In any case it is easier to restore/extract data from a backup than not having one if you need one.&lt;br /&gt;
&lt;br /&gt;
=== Manually using rkdeveloptool ===&lt;br /&gt;
Dorian has some nice [https://github.com/DorianRudolph/pinenotes notes regarding the PineNote]&lt;br /&gt;
&lt;br /&gt;
Don't forget to install a patched uboot for reading beyond 32MB and to respect the 2GB limit/bug of the current rkdeveloptool as per his notes&lt;br /&gt;
&lt;br /&gt;
=== Automated backup using a script and rkdeveloptool ===&lt;br /&gt;
[https://github.com/talpadk/pinenote-backup pinenote-backup] is a python script for detecting the partitions and automating the backup of partitions or the whole disk&lt;br /&gt;
&lt;br /&gt;
I also requires a patched u-boot but automatically handles the 2GB limit by splitting up larger reads into smaller ones&lt;br /&gt;
&lt;br /&gt;
=== Using the factory Android installation ===&lt;br /&gt;
For any one knowing how and with which caveats: Write ME&lt;br /&gt;
&lt;br /&gt;
=== Using a user installed Linux ===&lt;br /&gt;
A Linux installed to the cache partition should be able to easily backup everything over WiFi or to a USB stick/disk using dd&lt;br /&gt;
&lt;br /&gt;
However the user would need to backup the cache partition themself (if they want that).&lt;br /&gt;
&lt;br /&gt;
And more importantly they would only be getting the backup ''after'' they started playing with the content of the MMC.&lt;br /&gt;
&lt;br /&gt;
== Side-by-side setup ==&lt;br /&gt;
&lt;br /&gt;
It is possible to set up a partition for mainline development without disturbing the factory Android installation. This allows updating a mainline kernel, DTB, and initramfs over Wi-Fi until WiFi or USB OTG is working in mainline Linux.&lt;br /&gt;
&lt;br /&gt;
=== Without Repartitioning ===&lt;br /&gt;
&lt;br /&gt;
The recommended partition for this is &amp;lt;tt&amp;gt;mmcblk0p11&amp;lt;/tt&amp;gt; aka &amp;lt;tt&amp;gt;/cache&amp;lt;/tt&amp;gt;. It is large and already formatted as &amp;lt;tt&amp;gt;ext4&amp;lt;/tt&amp;gt;, so it is readable from U-Boot. Here are some general steps:&lt;br /&gt;
&lt;br /&gt;
# From the UART or adb shell, set up your chroot in &amp;lt;tt&amp;gt;/cache&amp;lt;/tt&amp;gt;. I used the Alpine Linux rootfs tarball.&lt;br /&gt;
# Copy in your kernel and DTB, using for example &amp;lt;tt&amp;gt;scp&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;wget&amp;lt;/tt&amp;gt; inside the chroot.&lt;br /&gt;
# Finally, create and boot an &amp;lt;code&amp;gt;extlinux.conf&amp;lt;/code&amp;gt; as described below.&lt;br /&gt;
&lt;br /&gt;
=== With Repartitioning ===&lt;br /&gt;
&lt;br /&gt;
It is possible to shrink the &amp;lt;tt&amp;gt;userdata&amp;lt;/tt&amp;gt; partition, and create a new partition at the end for use with mainline Linux. This provides much more space than &amp;lt;tt&amp;gt;cache&amp;lt;/tt&amp;gt;. However, because &amp;lt;tt&amp;gt;userdata&amp;lt;/tt&amp;gt; is formatted with &amp;lt;tt&amp;gt;f2fs&amp;lt;/tt&amp;gt;, and that filesystem cannot be shrunk, resizing the partition requires wiping &amp;lt;tt&amp;gt;userdata&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
# Back up any necessary files from userdata&lt;br /&gt;
# Boot to a mainline kernel from &amp;lt;tt&amp;gt;mmcblk0p11&amp;lt;/tt&amp;gt;, either using that partition as rootfs (see above), or using an initramfs with repartitioning tools&lt;br /&gt;
# Modify the partition table with your favorite tool, e.g. &amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt;, or &amp;lt;tt&amp;gt;parted&amp;lt;/tt&amp;gt;&lt;br /&gt;
# Reboot into &amp;lt;tt&amp;gt;fastboot&amp;lt;/tt&amp;gt; and wipe &amp;lt;tt&amp;gt;userdata&amp;lt;/tt&amp;gt;.&lt;br /&gt;
# Reboot into Android, where you can now chroot in and install your favorite distribution to the new partition.&lt;br /&gt;
&lt;br /&gt;
== Using rkdeveloptool ==&lt;br /&gt;
&lt;br /&gt;
rkdeveloptool is a command line utility built on libusb.&lt;br /&gt;
&lt;br /&gt;
=== Downloading and Building rkdeveloptool ===&lt;br /&gt;
&lt;br /&gt;
PINE64 develops [https://gitlab.com/pine64-org/quartz-bsp/rkdeveloptool its own updated fork of rkdeveloptool on GitLab].&lt;br /&gt;
&lt;br /&gt;
You will need to have libusb 1.0, its development headers and scdoc installed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone https://gitlab.com/pine64-org/quartz-bsp/rkdeveloptool.git&lt;br /&gt;
cd rkdeveloptool&lt;br /&gt;
mkdir build&lt;br /&gt;
cd build&lt;br /&gt;
cmake ..&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This sets up all the build files. You can then compile with &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; inside the build directory.&lt;br /&gt;
&lt;br /&gt;
After you're done, you'll likely also need to install the udev rules, or else your user won't have permission to access the USB devices:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo cp 99-rk-rockusb.rules /etc/udev/rules.d/&lt;br /&gt;
sudo udevadm control --reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copying the udev rules is also performed automatically when you &amp;lt;code&amp;gt;make install&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Building Downstream U-Boot ===&lt;br /&gt;
&lt;br /&gt;
While in maskrom mode, we need to have a u-boot to download onto the device for any of the other commands to work. To build you'll also need to install device-tree-compiler.&lt;br /&gt;
&lt;br /&gt;
You also need to install Python and pyelftools.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Note that rkbin is a &amp;amp;gt;5GB download!&amp;lt;/b&amp;gt; This will take some time to clone and process the deltas.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone -b quartz64 https://gitlab.com/pgwipeout/u-boot-rockchip.git&lt;br /&gt;
git clone -b rkbin https://github.com/JeffyCN/rockchip_mirrors.git rkbin&lt;br /&gt;
cd u-boot-rockchip&lt;br /&gt;
# If using Arch Linux, export CROSS_COMPILE=aarch64-linux-gnu-&lt;br /&gt;
export CROSS_COMPILE=aarch64-none-linux-gnu-&lt;br /&gt;
make rk3566-quartz64_defconfig&lt;br /&gt;
./make.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
In the version I cloned (current as of 2022-01-02), I had to make a change to one line to get a clean compilation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
diff --git a/lib/avb/libavb/avb_slot_verify.c b/lib/avb/libavb/avb_slot_verify.c&lt;br /&gt;
index 123701fc3b..64a1ce6450 100644&lt;br /&gt;
--- a/lib/avb/libavb/avb_slot_verify.c&lt;br /&gt;
+++ b/lib/avb/libavb/avb_slot_verify.c&lt;br /&gt;
@@ -296,7 +296,7 @@ static AvbSlotVerifyResult load_and_verify_hash_partition(&lt;br /&gt;
   bool image_preloaded = false;&lt;br /&gt;
   uint8_t* digest;&lt;br /&gt;
   size_t digest_len;&lt;br /&gt;
-  const char* found;&lt;br /&gt;
+  const char* found = NULL;&lt;br /&gt;
   uint64_t image_size;&lt;br /&gt;
   size_t expected_digest_len = 0;&lt;br /&gt;
   uint8_t expected_digest_buf[AVB_SHA512_DIGEST_SIZE];&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For systems where the global python executable points to python2, compilation fails with an error related to pyelftools not being installed (even if it is). To fix this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
diff --git a/make.sh b/make.sh&lt;br /&gt;
index 2bba05b4e4..cfe5b0afd5 100755&lt;br /&gt;
--- a/make.sh&lt;br /&gt;
+++ b/make.sh&lt;br /&gt;
@@ -758,7 +758,7 @@ function pack_fit_image()&lt;br /&gt;
        fi&lt;br /&gt;
 &lt;br /&gt;
        if [ &amp;quot;${ARM64_TRUSTZONE}&amp;quot; == &amp;quot;y&amp;quot; ]; then&lt;br /&gt;
-               if ! python -c &amp;quot;import elftools&amp;quot; ; then&lt;br /&gt;
+               if ! python3 -c &amp;quot;import elftools&amp;quot; ; then&lt;br /&gt;
                        echo &amp;quot;ERROR: No python 'pyelftools', please: pip install pyelftools&amp;quot;&lt;br /&gt;
                        exit 1&lt;br /&gt;
                fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Entering Maskrom/Rockusb Mode ===&lt;br /&gt;
&lt;br /&gt;
There are three ways to get into Maskrom/Rockusb mode:&lt;br /&gt;
&lt;br /&gt;
====  The easy way ====&lt;br /&gt;
&lt;br /&gt;
# Flip the device around so that the display faces down&lt;br /&gt;
# Lay the pen on the right side, with its tip pointing towards the speaker grill, and its magnet pointing towards the upper right corner of the label on the back (or place the magnetic cap from the pen on the spot marked on the back).&lt;br /&gt;
# Turn the device on and wait for it to show up in &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt;. It should now be in Loader mode, according to &amp;lt;code&amp;gt;rkdeveloptool list-devices&amp;lt;/code&amp;gt; (note that &amp;quot;Loader&amp;quot; here indicates U-Boot's Rockusb; separately, booting with an erased eMMC displays &amp;quot;Maskrom&amp;quot; [not &amp;quot;Loader&amp;quot;] from the RK3566).&lt;br /&gt;
# Unplug the device and plug it back in. It should now be in Rockusb mode.&lt;br /&gt;
&lt;br /&gt;
This can be a bit fiddly to get right, and may need a few tries.&lt;br /&gt;
&lt;br /&gt;
==== The u-boot way ====&lt;br /&gt;
# Interrupt the u-boot startup using ctrl-c (while attached using an UART dongle)&lt;br /&gt;
# While in u-boot use the command &amp;quot;rockusb 0 mmc 0&amp;quot; to start rockusb mode.&lt;br /&gt;
&lt;br /&gt;
One benefit from this is, that if you have an UART dongle that allows to simultaneous having an UART and USB connection, there is no need to plug and unplug cables and flipping the PineNote around and placing magnets.  &lt;br /&gt;
&lt;br /&gt;
This is especially helpful when changing back and forth between u-boot and rockusb, for instance when trying to develop u-boot.&lt;br /&gt;
&lt;br /&gt;
==== Shorting test points ====&lt;br /&gt;
&lt;br /&gt;
If the bootloader is broken/corrupted, you cannot get to Maskrom without opening up the device (it can be opened using spudger and a bit of patience).&lt;br /&gt;
&lt;br /&gt;
Once inside, short TP1301 (GND) and TP1302 (eMMC_D0/FLASH_D0) with a small tweezers, this is how it looks on board view (credit to Caleb):&lt;br /&gt;
&lt;br /&gt;
[[File:PineNote_Maskrom_TP.png|500px]]&lt;br /&gt;
&lt;br /&gt;
Then plug the device to the computer and if you see the device with VID=2207/PID=350a then it should be in Maskrom mode, you can verify by typing &amp;lt;code&amp;gt;rkdeveloptool list-devices&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;Jan 07 15:04:13 melttower kernel: usb 1-14: New USB device found, idVendor=2207, idProduct=350a, bcdDevice= 1.00&lt;br /&gt;
Jan 07 15:04:13 melttower kernel: usb 1-14: New USB device strings: Mfr=0, Product=0, SerialNumber=0&lt;br /&gt;
&lt;br /&gt;
$ rkdeveloptool list-devices&lt;br /&gt;
DevNo=1 Vid=0x2207,Pid=0x350a,LocationID=10e    Maskrom&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If nothing shows up, you can try to hold down the power button for 5 seconds and then try again.&lt;br /&gt;
&lt;br /&gt;
=== Running rkdeveloptool ===&lt;br /&gt;
&lt;br /&gt;
First, you'll want to make sure the device you've connected is in maskrom mode:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./rkdeveloptool list&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It should output something like &amp;lt;code&amp;gt;DevNo=1 Vid=0x2207,Pid=0x350a,LocationID=202    Maskrom&amp;lt;/code&amp;gt;. If it doesn't, see [[PineNote Development#Entering Maskrom Mode]].&lt;br /&gt;
&lt;br /&gt;
You can now download u-boot onto it:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./rkdeveloptool boot ../u-boot-rockchip/rk356x_spl_loader_v1.08.111.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This should output &amp;lt;code&amp;gt;Downloading bootloader succeeded.&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
We can now verify that this worked using e.g. the &amp;quot;read flash info&amp;quot; command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./rkdeveloptool read-flash-info&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''TODO:''' finish this section&lt;br /&gt;
&lt;br /&gt;
=== Creating a mainline boot image ===&lt;br /&gt;
&lt;br /&gt;
You can create a filesystem image that replaces the Android boot or recovery partition by doing roughly the following:&lt;br /&gt;
&lt;br /&gt;
# Erase boot and dtbo with rkdeveloptool or fastboot (back them up first!!!)&lt;br /&gt;
# Create an ext2 partition image and mount it (fallocate, mkfs.ext2)&lt;br /&gt;
# Build your mainline kernel&lt;br /&gt;
# Copy the kernel, dtb and an initramfs to the root of the mounted image (use any old postmarketOS initramfs)&lt;br /&gt;
# Create a file in the root of the mounted image called &amp;lt;code&amp;gt;extlinux.conf&amp;lt;/code&amp;gt; as described below&lt;br /&gt;
# Unmount the image and then use rkdeveloptool to flash it to the &amp;quot;recovery&amp;quot; partition on the pinenote (it's about the right size until we get around to replacing the partition layout).&lt;br /&gt;
&lt;br /&gt;
== Using fastboot ==&lt;br /&gt;
&lt;br /&gt;
Follow the steps for &amp;quot;Creating a mainline boot.img&amp;quot;, but instead of flashing it with rkdeveloptool, use fastboot. You can enter fastboot in either of two ways:&lt;br /&gt;
&lt;br /&gt;
# Use &amp;quot;reboot bootloader&amp;quot; from adb or a UART console.&lt;br /&gt;
# Get a U-Boot prompt and run &amp;lt;code&amp;gt;fastboot usb 0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
= Mainline development =&lt;br /&gt;
&lt;br /&gt;
== Status ==&lt;br /&gt;
&lt;br /&gt;
Some work happening here: https://gitlab.com/calebccff/linux, the idea is to import the parts of the eink/ebc drivers which are open source and use the downstream u-boot framebuffer driver as a reference to create a basic framebuffer driver.&lt;br /&gt;
&lt;br /&gt;
Currently mainline struggles to boot due to weird issues while probing fixed regulators (?). It also fails to detect eMMC.&lt;br /&gt;
&lt;br /&gt;
Further work is being done here: https://github.com/smaeul/linux/commits/rk356x-ebc-dev. This has a complete device tree, with working eMMC. Pen input also works out of the box. Wi-Fi and BT work with firmware copied from the factory Android image.&lt;br /&gt;
&lt;br /&gt;
== How to boot mainline ==&lt;br /&gt;
&lt;br /&gt;
UART is currently REQUIRED for this to work! We depend on u-boot falling back to console. Once we have a prebuilt u-boot which will use extlinux by default, UART won't be needed anymore.&lt;br /&gt;
&lt;br /&gt;
You can compile a u-boot that uses extlinux by default by following the instructions [https://github.com/JoshuaMulliken/pinenote_uboot/blob/aa9ecbd3d3e716f163f5a900824630f24e9f04ba/README.md#changing-default-boot-order here].&lt;br /&gt;
&lt;br /&gt;
=== Getting to a U-Boot prompt ===&lt;br /&gt;
&lt;br /&gt;
You can get to a U-Boot prompt by:&lt;br /&gt;
&lt;br /&gt;
# Holding Ctrl-C while the display panel initializes.&lt;br /&gt;
# Wiping the &amp;quot;boot&amp;quot; partition.&lt;br /&gt;
&lt;br /&gt;
=== Using sysboot ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;extlinux.conf&amp;lt;/code&amp;gt; should have the following contents:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
timeout 10&lt;br /&gt;
default MAINLINE&lt;br /&gt;
menu title boot prev kernel&lt;br /&gt;
&lt;br /&gt;
label MAINLINE&lt;br /&gt;
  kernel /vmlinuz&lt;br /&gt;
  fdt /rk3566-pinenote.dtb&lt;br /&gt;
  initrd /initramfs&lt;br /&gt;
  append earlycon console=tty0 console=ttyS2,1500000n8 fw_devlink=off PMOS_NO_OUTPUT_REDIRECT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At the u-boot console, run the following command to boot your mainline kernel:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sysboot ${devtype} ${devnum}:9 any ${scriptaddr} extlinux.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Booting with individual commands ===&lt;br /&gt;
&lt;br /&gt;
Booting with individual commands can be useful when you need to temporarily add some kernel command line arguments. Use these or similar commands at the U-Boot shell:&lt;br /&gt;
&lt;br /&gt;
 load mmc 0:b ${kernel_addr_r} boot/Image&lt;br /&gt;
 load mmc 0:b ${fdt_addr_r} boot/rk3566-pinenote.dtb&lt;br /&gt;
 setenv bootargs ignore_loglevel root=/dev/mmcblk0p11 rootwait init=/bin/bash&lt;br /&gt;
 booti ${kernel_addr_r} - ${fdt_addr_r}&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
=== Firmware for WiFi &amp;amp; Bluetooth and Waveform data ===&lt;br /&gt;
&lt;br /&gt;
==== Using Maximilian's Debian image  ====&lt;br /&gt;
If the Android partition (super) and waveform partition (waveform) is left intact the image extracts the WiFi, BT driver and waveform from the partitions on first run.&lt;br /&gt;
&lt;br /&gt;
For instance if you repartitions the userdata partition and installs the image there.&lt;br /&gt;
&lt;br /&gt;
==== Getting it from the Android install manually ====&lt;br /&gt;
Copy WiFi/BT firmware from Android:&lt;br /&gt;
 mkdir -p /cache/lib/firmware/brcm&lt;br /&gt;
 cp /vendor/etc/firmware/fw_bcm43455c0_ag_cy.bin /cache/lib/firmware/brcm/brcmfmac43455-sdio.bin&lt;br /&gt;
 cp /vendor/etc/firmware/nvram_ap6255_cy.txt /cache/lib/firmware/brcm/brcmfmac43455-sdio.txt&lt;br /&gt;
 cp /cache/lib/firmware/BCM4345C0.hcd /cache/lib/firmware/brcm/BCM4345C0.hcd&lt;br /&gt;
&lt;br /&gt;
Copy waveform partition (via previously dumped file):&lt;br /&gt;
 adb root&lt;br /&gt;
 adb push waveform.img /cache/lib/firmware/waveform.bin&lt;br /&gt;
&lt;br /&gt;
Or via dd within Linux:&lt;br /&gt;
 dd if=/dev/mmcblk0p3 of=/lib/firmware/waveform.bin bs=1k count=2048&lt;br /&gt;
&lt;br /&gt;
==== Getting the Wifi and Bluetooth driver blobs from &amp;quot;other&amp;quot; sources ====&lt;br /&gt;
===== WiFi =====&lt;br /&gt;
The WiFi firmware .bin blob can be obtained by installing the Debian package firmware-brcm80211 (in the non-free section)&lt;br /&gt;
&lt;br /&gt;
The WiFi brcmfmac43455-sdio.txt file can according to Eugen be sourced from https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/brcm/brcmfmac43455-sdio.AW-CM256SM.txt needs a renaming when copying it to /lib/firmware/brcm/brcmfmac43455-sdio.txt)&lt;br /&gt;
&lt;br /&gt;
''The content of the upstream .txt is different than the Android configuration, but is supposed to work.''&lt;br /&gt;
&lt;br /&gt;
As you don't have WiFi yet you need to get the firmware-brcm80211*.deb and brcmfmac43455-sdio.txt file on the PineNote by other means, for instance using an USB stick&lt;br /&gt;
&lt;br /&gt;
===== Bluetooth =====&lt;br /&gt;
&lt;br /&gt;
Once you have WiFi working you can get BCM4345C0.hcd by installing the bluez-firmware &lt;br /&gt;
  sudo apt install bluez-firmware&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Configuring the E-ink refresh mode ===&lt;br /&gt;
https://github.com/m-weigand/mw_pinenote_misc/tree/main/rockchip_ebc/patches contains information on how/where to write in /sys to alter the refresh mode&lt;br /&gt;
&lt;br /&gt;
https://github.com/m-weigand/mw_pinenote_misc/tree/main/gnome_extension contains the gnome extension used in Maximilian image &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Touchscreen and Pen In X.org ===&lt;br /&gt;
&lt;br /&gt;
By default the pen config is flipped 180° (which makes it unusable) and the touchscreen doesn't work. Placing the following config in &amp;lt;code&amp;gt;/etc/X11/xorg.conf.d/50-touchscreen.conf&amp;lt;/code&amp;gt; will fix both problems:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Section &amp;quot;InputClass&amp;quot;&lt;br /&gt;
    Identifier &amp;quot;evdev touchscreen&amp;quot;&lt;br /&gt;
    MatchProduct &amp;quot;tt21000&amp;quot;&lt;br /&gt;
    MatchIsTouchscreen &amp;quot;on&amp;quot;&lt;br /&gt;
    Driver        &amp;quot;evdev&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
Section &amp;quot;InputClass&amp;quot;&lt;br /&gt;
    Identifier    &amp;quot;RotateTouch&amp;quot;&lt;br /&gt;
    MatchProduct    &amp;quot;w9013&amp;quot;&lt;br /&gt;
    Option    &amp;quot;TransformationMatrix&amp;quot; &amp;quot;-1 0 1 0 -1 1 0 0 1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>C2c0</name></author>
	</entry>
</feed>