U-boot Updates
#1
I would like to run the latest U-boot. However, I have some questions.


  1. Does the PBP require a modified U-boot, or is it safe to run the latest code from the official repo?
  2. All the tutorials that I have found either fail to mention where to get the files or they assume you're running Manjaro. Is there anywhere that I can get the files, without building them myself?
  3. I'm hoping to run U-boot on an SD card and the OS on the eMMC. That way, if I mess up my U-boot, it will be easier to recover than taking apart the laptop. Is this as simple as completely erasing the eMMC and installing U-boot on an SD card? Is there anything that I need to be aware of?
  Reply
#2
>I would like to run the latest U-boot........why?
All uboot does is set up mem to safe state, set up serial com, scan media, load cfg file, load kernel
Some, maybe 3 uboots drive display
If you install to SPI (which I do not recommend) be aware it is different than SD/emmc uboot
there are probably more than 10 uboots out there, all doing more or less the same thing
The main differences are BSP,, mainline,, drives display
BSP are 3 files, mainline 2 files,,u-boot.itb = uboot.img + trust.img
Getting, well google and other searches, make SURE that it is specifically for pbp or maybe any rk3399
My emmc has only mbr in 1st 16M, uboot with distro on SD OR uboot alone on SD
save mbr, save 1st 16M, blank 1st 16M, restore mbr (all on emmc),,,,, all with dd & count
With uboot alone, make a FS on the rest of SD or uboot will lock, maybe the error recovery is better in later versions
  Reply
#3
You pretty much need to have U-boot on the eMMC. The hardware looks there before scanning the micro-SD. If you don't have a valid U-boot on the eMMC, you can't boot from SD. Now, valid includes being all zeroes. But in my opinion, it's just as easy to corrupt all zeroes as it is to corrupt good code. Especially if you or something forgets to leave that space alone.

SPI-ROM is scanned before the eMMC. So if you want to foolproof your PBP so that you don't have to open it, you really want U-boot, or more likely, Tow-boot on the SPI ROM. Do this at your own risk. I don't recommend doing it either. If you make a mistake there, it's much harder to recover than if U-boot gets corrupted on your eMMC.
:wq



[ SRA accepts you ]
  Reply
#4
>You pretty much need to have U-boot on the eMMC
This is not true, sure, my emmc 1st 16M had /dev/zero written and then restored mbr written to it
But really, what the boot rom is looking for is idbloader, the signature, it is a raw read
@ 0 on SPI,,,, @(64*512) on emmc, then SD
If you check every idbloader you have, the first 5 bytes are always the same, this is the signature
3b 8c dc fc be ,,,,,(idbloader activates memory on mb)
Then, when it has enough memory, uboot is loaded from the same media
  Reply
#5
But my point is that you need to have a valid boot or valid not-boot on the eMMC. In other words, you might as well have U-boot there. The danger is that if U-boot on the eMMC gets corrupted, you can't boot from SD. So alternatively, you can make the eMMC not-boot, and put U-boot on micro-sd. In that case, if the not-boot state of the eMMC gets corrupted, the same way a valid boot state could get corrupted, you still cannot boot from SD. So why not have it in the eMMC where it'll boot sooner and faster?
:wq



[ SRA accepts you ]
  Reply
#6
> But my point is that you need to have a valid boot or valid not-boot on the eMMC.
No, the bootrom is looking for idbloader, the media and fstable is irrelevant,
and any partitions or filesystems on them,,,,,only the existence or absence of a media,,
because the bootrom is ONLY looking at specific locations for the idbloader signature
Uboot only enters the picture AFTER idbloader has activated the mb memory
(because the bootrom has very little memory)
The point is,,, all uboots are not equal, sometimes a uboot on emmc
is not compatible with a distro on SD (like the recent manjaro's)
If there is a uboot on emmc it will be ALWAYS used, since it is found first,
so if you write an image to emmc, you have a NEW uboot, and now that one will be always used
This might not work out, at the least you have not tested it (the uboot on SD)
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Partial boot after installing Manjaro on emmc regivanx 3 43 2 hours ago
Last Post: regivanx
  Unable to Boot anything (emmc or SDcard) line72 5 249 01-17-2023, 12:07 PM
Last Post: nfms
  eMMC problem with Tow-Boot/u-boot on SPI repa 1 236 12-30-2022, 11:08 AM
Last Post: repa
  how to make a bootable USB linux sine pinebook will not boot up River 14 993 12-11-2022, 11:12 PM
Last Post: wdt
  1st boot chrisrook 5 1,133 11-15-2022, 02:51 PM
Last Post: igorp
  Cannot Boot From SD Card xp19375 4 766 11-12-2022, 11:26 AM
Last Post: KC9UDX
  Unable to boot from emmc after flashing it rfm83 3 610 11-08-2022, 10:59 PM
Last Post: rfm83
  Pinebook picky about which EMMC will boot flatulent_piney 8 995 11-05-2022, 06:03 PM
Last Post: ajtravis
  Need to re-write U-boot from Pinephone pro currently in mass rom mode wolverine1 1 406 10-30-2022, 10:09 AM
Last Post: wdt
Photo can not boot pinebook pro from recent production run justwantin 9 829 10-22-2022, 06:06 PM
Last Post: justwantin

Forum Jump:


Users browsing this thread: 1 Guest(s)