Boot Order in Pinebook Pro
#1
Hi all,

I'm working on installing another operating system from MicroSD and have been working off of "Getting started"
https://wiki.pine64.org/wiki/Getting_sta...roSD_Cards

I've successfully reached my MicroSD card having the operating system I want on it

I don't yet know how to boot from MicroSD. 

How do you boot from MicroSD on Pinebook Pro?
  Reply
#2
Not enough info, I'll guess that manjaro is on emmc, manjaro has a somewhat defective uboot
3 methods, disable emmc (for 2-3s at boot), serial to interrupt boot, write another uboot to emmc
(IMPORTANT -- if you write another uboot, be aware the pinebook is NOT pinebookpro, the uboot has quite different locations, get the right one)
probably disabling emmc is easiest, start with lsblk (SD inserted) to see what you want,
then power-off, flip switch, start, flip switch after 2-3s, lsblk again to see if you got timing right
The new image will have a new uboot in the 1st 16M, which will replace the one on the emmc
I am assuming that a SD boot will look different than an emmc boot,
but lsblk will show where / is locacted, if you are paying attention
another warning
the hinges are fragile when back is off, don't move screen or you may break it (hinge screw inserts)
  Reply
#3
With NetBSD 10.0_RC1, it just did.  I mean, I didn't have to do anything but copy the image to the sd device, and restart.

With the tow-boot install image on SD, I had to disable eMMC before that install image would boot.  I suppose there's some difference about what's found on those images, where the NetBSD image has something the tow-boot lacked, but it's a little weird since they were both ultimately able to boot just the same, just one of them met the SD-then-eMMC boot order conditions and the other didn't.  (I am not using tow-boot, this is just about the tow-boot installation image as a bootable OS.)

That normal boot property that I found with the NetBSD image is of course highly desirable, since it's beyond inconvenient to have to open up the case and fiddle with the eMMC.
  Reply
#4
If you have the uboot image (uboot.img OR u-boot.itb) then, to find out,
strings <uboot> |grep _targets replacing <uboot> with whatever is appropriate
mmc0 is emmc, mmc1 is SD
OR using dd, rip 4M out of some block device starting 8M in (and writing to some tmp file)
what you want is
strings uboot.img |grep _targets
boot_targets=mmc1 usb0 mmc0 pxe dhcp
(this from mrfixit bsp uboot,, no nvme)
Of course there has to be the boot files in "correct" place, one of,,,, boot.scr, extlinux.conf, aarch64.efi
and their configuration has to be correct too
--------after a little more thought----
Maybe for the OP, easiest would be to rename the boot files and see what happens,, ie
cd /boot/extlinux ; mv extlinux.conf extlinux.conf.good ;reboot (reboot is a little flakey, might need a shutdown)
Obviously with SD card in
  Reply
#5
Well ... what do you think, is it going to work?

To maybe help make some sense of this ...
  • the hardware looks for boot software in the SD last, after first SPI and then eMMC flash memories.
  • what it will find in the eMMc is, along with the Manjaro Linux install, a boot loader that goes back and looks again at the possible boot devices, this time starting with SD.

You can read a lot more detail about who loads what blocks, etc.:  RK3399 boot sequence

If you have to disable eMMC as I did because the Manjaro/boot wouldn't boot the SD two-boot install image, there's a little switch on the board.
  Reply
#6
thankyou all for helping! Seems disabling the eMMC is the practical solution moving forward for me. Everything else is in place.

Is there a way to install GRUB or some other? I'm kinda frustrated that there's a hardware only solution lol
  Reply
#7
You can install the U-Boot that comes with NetBSD on your eMMC pretty easily, and that will solve your problems without disabling the eMMC. It will boot Manjaru just fine, and let you boot whatever you want from micro-SD, assuming you have any valid U-Boot on the SD card.
:wq



[ SRA accepts you ]
  Reply
#8
(11-22-2023, 07:04 PM)food Wrote: Is there a way to install GRUB or some other? I'm kinda frustrated that there's a hardware only solution lol

Sure.  There's a sort of BIOS NVRAM that's empty on a Pinebook out of the box:  SPI.   If you install a boot loader there, it will take priority over whatever it finds on eMMC.

The only boot loader software that I'm aware of is "u-boot", of which there are various versions including a fairly popular variant called "tow-boot".   u-boot is apparently already on the eMMC, with Manjaro - that's how the NetBSD SD comes up for me, didn't have to do anything but put it in the slot - but that version doesn't offer a menu, it just goes by priority.  Tow-boot has a menu, and apparently u-boot can be configured that way too.

In short, to get a menu, you flash some type of u-boot onto the SPI nvram.

If that goes wrong, however, it becomes a pretty basic problem.  There's some pictures around here about how to pry the metal shield off the CPU on the board, so you can short SPI pin 6 to "GND" to disable it while you boot to something else so you can zero it out.

If you haven't tried just putting the SD card in and seeing if the out-the-box eMMC software will boot it, that would be my suggestion for a first step.  If it doesn't, I guess I'd go to switching off the eMMC, because 80% chance you will find the problem is not the boot load sequence, it's that your SD isn't a viable bootable install, and when you get that fixed you won't really need an SPI loader.
  Reply
#9
I would avoid the SPI flash. Having a good U-Boot on the eMMC works. It won't let you boot multiple operating systems on the same media, but it will let you boot from any device. You easily flash a good U-Boot over the Manjaru one without affecting Manjaru itself.

The one that I use which comes with NetBSD (and can probably be sourced other ways) doesn't have a "menu" but it does have a command interpreter that you can invoke by pressing a key when prompted.

See this: https://youtube.com/shorts/jVab9bcjM_I
:wq



[ SRA accepts you ]
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Upgrading Armbian from v24.2.1 gnome, breaks pinebook pro Sb2024 0 199 11-10-2024, 02:50 PM
Last Post: Sb2024
  Pinebook pro won't boot after bootloader installation jwensouls 4 1,172 08-21-2024, 04:17 AM
Last Post: KC9UDX
  [Pinebook Pro/Mobian/XFCE4] can fix touch or screen in greeter not both SynthGal 0 464 05-31-2024, 09:42 AM
Last Post: SynthGal
  Debian on Pinebook Pro u974615 7 3,152 03-31-2024, 10:11 AM
Last Post: u974615
  Pinebook Pro upgrading from the factory image yamsoup 12 4,650 02-22-2024, 04:02 PM
Last Post: tllim
  Help installing Manjaro on eMMC of Pinebook Pro pine4546464 4 3,416 12-13-2023, 07:22 PM
Last Post: trillobite
  Need Help Recovering Manjaro /boot Contents on Pinebook Pro calinb 6 3,713 12-11-2023, 03:47 AM
Last Post: calinb
  Gentoo on Pinebook Pro RELEASE jannik2099 54 106,335 12-08-2023, 11:25 PM
Last Post: tllim
  PineBook Pro seems to go to deep sleep, but doesn't wake up pogo 11 7,820 08-31-2023, 04:20 PM
Last Post: TRS-80
  [Manjaro] u-boot won't boot from eMMC with (unbootable) SD card present zackw 1 2,562 08-21-2023, 09:08 PM
Last Post: vanessadonald

Forum Jump:


Users browsing this thread: 2 Guest(s)