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
  Using different Distros on Pinebook Pro jerryyoung 2 59 Yesterday, 11:20 AM
Last Post: KC9UDX
  Pinebook Pro upgrading from the factory image yamsoup 12 551 02-22-2024, 04:02 PM
Last Post: tllim
  Debian on Pinebook Pro u974615 0 64 02-15-2024, 10:16 PM
Last Post: u974615
  Help installing Manjaro on eMMC of Pinebook Pro pine4546464 4 1,778 12-13-2023, 07:22 PM
Last Post: trillobite
  Need Help Recovering Manjaro /boot Contents on Pinebook Pro calinb 7 1,806 12-11-2023, 03:47 AM
Last Post: calinb
  Gentoo on Pinebook Pro RELEASE jannik2099 54 84,635 12-08-2023, 11:25 PM
Last Post: tllim
  PineBook Pro seems to go to deep sleep, but doesn't wake up pogo 11 4,590 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 1,746 08-21-2023, 09:08 PM
Last Post: vanessadonald
  Would a Pinebook Pro be good for a Linux newbie? cassado10 6 1,231 08-08-2023, 04:58 AM
Last Post: moobythegoldensock
  Install deepin OS on pinebook pro wangyukunshan 4 1,332 08-07-2023, 01:12 PM
Last Post: myself600

Forum Jump:


Users browsing this thread: 1 Guest(s)