How can I install Debian?
#1
Hi

I recently decided that I want to install Debian on my Pinebook Pro but the script that I've used in the past doesn't seem to work anymore and there aren't any other instructions out there that I can find, anyone know how I can get this to work?

Thanks
  Reply
#2
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.
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Debian on Pinebook Pro u974615 8 444 03-22-2024, 03:57 PM
Last Post: u974615
  Attempting to install Void Linux, boots into a black screen 9a3eedi 0 208 02-18-2024, 08:54 AM
Last Post: 9a3eedi
  install debian on pbp jsch 7 3,828 11-22-2023, 04:22 PM
Last Post: TRS-80
  How to mainline kernel on daniel thompson's debian installer? hellojack 14 7,028 09-07-2023, 09:38 PM
Last Post: Der Geist der Maschine
  Install deepin OS on pinebook pro wangyukunshan 4 1,424 08-07-2023, 01:12 PM
Last Post: myself600
  Unable to install Debian Bullseye because of missing wifi firmware Pino64 7 3,825 07-15-2023, 02:58 PM
Last Post: u974615
  Blank screen after Armbian 20.04 install to emmc? psychoacoustic 3 3,342 04-01-2023, 03:22 PM
Last Post: TRS-80
  unsuccessful re-install of OS for PineBookPro Valiance 3 1,202 02-14-2023, 12:49 PM
Last Post: Valiance
Question Debian (Vanilla) no output on display after Kernel update (6.0.8-1) as365n4 1 1,200 12-09-2022, 12:43 PM
Last Post: as365n4
  Unsuccessful using danielt's unofficial Debian installer on the PBP joeDoe 2 2,239 12-09-2022, 05:04 AM
Last Post: ndp

Forum Jump:


Users browsing this thread: 1 Guest(s)