Recently I installed stock Debian on my Pinebook Pro. It was easier than I thought and easier than all my previous attempts.
1. Install Tow-Boot on SPI (it is done once and is unrelated to installing Debian).
I believe any other booloader is also good. If you have bootloader located at SPI, you can skip this step. The point is to install it not on eMMC, not on SD or USB, but on SPI.
You can find the releases at
https://github.com/Tow-Boot/Tow-Boot/releases. Locate the one suitable for Pinebook Pro, that is
pine64-pinebookPro-2021.10-005.tar.xz. Here, you get 2 disk images (*.img files) and 2 binaries (*.bin files in a subfolder). You are interested in
spi.installer.img or
Tow-Boot.spi.bin. If your Pinebook Pro is able to boot from SD / USB, then just flash *img file to it (e.g. with Etcher), boot from it and follow onscreen instructions. In most cases this means pressing buttons for erasing SPI content and then for installing Tow-Boot to SPI.
In case Pinebook Pro is unable to boot from external device (e.g. due to existing u-boot), you can uncover the case and switch off the eMMC switch (eMMC is not involved in the process). After that it should be possible to boot from SD / USB where you flashed *.img file.
If nothing works, you are courageous and Pinebook Pro can boot into some sort of Linux (or *BSD etc), boot it, download Tow-Boot locally, unarchive it, locate
Tow-Boot.spi.bin file and manually flash it to SPI with the command (you need admin privileges):
Code:
dd if=Tow-boot.spi.bin of=/dev/mtd0
2. Obtain and install official Debian with Debian Installer.
It can be found at
https://d-i.debian.org/daily-images/arm6...rd-images/. Just, read README.concatenateable_images and follow instructions. You need to download 2 files:
firmware-pinebook-pro-rk3399.img.gz and
partition.img.gz. Then create installer image with the command:
Code:
zcat firmware-pinebook-pro-rk3399.img.gz partition.img.gz > debian-installer.img
You can flash obtained
debian-installer.img to SD / USB media with e.g. Etcher. During the installation WiFi is not available, so you need a wired Ethernet connection, which consumes USB2 port of Pinebook Pro. But microSD and USB3 are available. You can use either.
Boot Pinebook Pro with SD / USB inserted and Ethernet cable. After Tow-Boot logo appears and at the screen bottom you see information that you can choose the boot device by pressing ESC, so press it and choose USB or microSD depending on the media you flashed with Debian installer. Then press Enter.
The installation is done in text mode, which otherwise is identical to graphic mode. From beginning installer will warn you about missing firmware (so BT and WiFi are not available), just skip installing them for now.
At the partitioning step you can use whatever scheme you prefer. Because the bootloader now is located at SPI, you don't need to leave room for it on eMMC or at other device. Finish installation and boot into Debian having Ethernet cable.
3. Install missing firmware.
I believe I have seen Pinebook Pro firmware somewhere in Debian repositories, but I cannot remember it. So I use Armbian Git to download them and Kali script to install them. The script is available at
https://gitlab.com/kalilinux/build-scrip...ook-pro.sh. Because in stock Debian all the rest works out of the box (as much as I tested), you only need the lines 67-77:
Code:
# Pull in the wifi and bluetooth firmware from Armbian's git repository
cd "${work_dir}"/
git clone --depth 1 https://github.com/armbian/firmware.git
cd firmware/
mkdir -p "${work_dir}"/lib/firmware/brcm/
cp brcm/BCM4345C5.hcd "${work_dir}"/lib/firmware/brcm/BCM4345C5.hcd
cp brcm/brcmfmac43456-sdio.txt "${work_dir}"/lib/firmware/brcm/brcmfmac43456-sdio.pine64,pinebook-pro.txt
cp brcm/brcmfmac43456-sdio.bin "${work_dir}"/lib/firmware/brcm/brcmfmac43456-sdio.bin
cp brcm/brcmfmac43456-sdio.clm_blob "${work_dir}"/lib/firmware/brcm/brcmfmac43456-sdio.clm_blob
cd "${repo_dir}/"
rm -rf "${work_dir}"/firmware
The script assumes defined variables
work_dir and
repo_dir. If they are not defined (and this is the case if you only take these lines from the script), they default to empty, which is OK for our purpose. Make the script executable and execute it with root privileges. Check the folder
/lib/firmware/brcm/ exists and contains 3 files:
BCM4345C5.hcd, "
brcmfmac43456-sdio.pine64,pinebook-pro.txt" (this is one file) and
brcmfmac43456-sdio.clm_blob. In case they are missing, check the cloned repository, they can be somewhere there. You can manually copy them to desired location as root.
That's all, reboot Pinebook Pro and you have WiFi and BT firmware installed.