NVMe support in uboot-pinebookpro 2021.04-1

Does anybody know if the mainline u-boot for Pinebook Pro (uboot-pinebookpro 2021.04-1) supports direct booting from NVMe?

I have a uboot installed that does this but it doesn’t handle reboots well. If you reboot rather than power-off the PBP the display is corrupt when the device restarts.

Many thanks, Bruce

1 Like

I don’t know about NVMe, but Nadia Holmquist’s uboot has a patch that fixes the reboot bug (GitHub - nadiaholmquist/pbp-packages: Packages for using Arch Linux ARM on the Pinebook Pro laptop.)

2 Likes

Nadias Git have the patches needed to fix lcd after warm reset and also uboot nvme support.

I am not sure if those patches are present upstream.

1 Like

Thank you @maxjrh and @spikerguy. I was hoping to use the Manjaro u-boot on my PBP, just to keep my set-up as simple as possible, so I bit the bullet and tried it. Yes, it does support booting directly from NVMe :grin: but no, it doesn’t resolve the problem with the LCD after a warm reset :disappointed:.

Anyhow, thank you for pointing me at Nadia’s packages. I installed her u-boot package and and copied the two files over to my eMMC and all is good. It was a nice bonus to see the console output that previously was only available with a serial cable attached :grin:.

1 Like

I just got a pbp with the nvme kit. If I flash nadias uboot, what is currently the correct procedure with the emmc/nvme switch? Do I leave the switch in the emmc position in order to load the uboot, or will the uboot load from emmc with the switch in the nvme position? Do I need the same uboot files on both the emmc and nvme?

Also, is anyone else having trouble booting from EMMC?
Frequently my uboot fails to find the EMMC, which has the uboot installed onto it. Weird.

Are you referring to switch #24 in the link below, the one for enabling/disabling the eMMC?
https://wiki.pine64.org/wiki/Pinebook_Pro#Mainboard_Switches_and_Buttons
If so, my switch is in the default position and the eMMC is enabled. The low-level boot loader finds U-Boot on the eMMC which it runs, U-Boot then finds Manjaro on the NVME drive, loads and executes it. I haven’t checked for a while but I think the boot order is SD-Card, NVME, eMMC.

1 Like

That’s the switch. Thanks for the information.

Would you mind explaining in greater detail how you copied and ran these files?

I tried the following steps but am just following instructions I find online - I don’t have a deep understanding of Manjaro/Linux.

  1. I edited my pacman.conf and added [pinebookpro] Server = https://nhp.sh/pinebookpro/

  2. I successfully imported the root to import the signing key:
    sudo pacman-key --recv-keys 50626D06C63A8C774FCB35D2497FE64338F993E9 and
    sudo pacman-key --lsign-key 50626D06C63A8C774FCB35D2497FE64338F993E9

  3. I ran sudo pacman -S pinebookpro but was given an error that said essentially, “target not found”.

I just realized this may be a very obvious oversight. Should I just be running sudo pacman -S uboot-pbp?

Yes, the -S (–sync) option takes a package name rather than a repository name. To get a list of available packages you can use the -Q (–query) option.

I recently received a new PBP and I’ve flashed and a variety of Linux OS images to both SD and eMMC. Manjaro KDE Fusion works the best for me so I’d now like to migrate my Manjaro system boot and root from eMMC to a 1TB WD NVMe.

Even though removing my eMMC entirely might allow me to recover a little battery life that I expect to sacrifice by running the NVMe SSD, it seems that installing U-Boot on SPI poses a higher risk of bricking my PBP than installing U-Boot on eMMC, so installing U-Boot on eMMC is the approach I’m planning to use.

I still don’t have a good understanding of what I need to do to migrate my Manjaro system from eMMC to NVMe. Could someone please confirm the following steps? I also wonder if some of the things I need might already be upstream in my recent Manjaro.

  1. Add Nadia’s repo and keys.
  2. pacman -S uboot.pbp
  3. pacman -S linux.pbp ? (I currently have 5.12.4-1-MANJARO-ARM but I see linux-5.12.8-1 is now available and I’ll upgrade as soon as I finish this post so will I need Nadia’s 5.12.7 at all/instead?
  4. Reboot to SD.
  5. dd /dev/mmcblk2 to the NVMe.
  6. Resize and fsck the root partition on the NVMe.
  7. Reboot cold and warm to test boot to NVMe.
  8. Confirm stable operation of the NVMe and, if necessary, learn how to adjust NVMe power management settings.

If stable and usable,

  1. Delete root partition files on eMMC to gain general storage space.

else

  1. Remove NVMe or delete NVMe boot partition and reboot (presumably eMMC will then boot again).

Thanks so much for any tips and guidance!

-Cal

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.