PINE64
How to rewrite uboot to emmc - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: Pinebook Pro (https://forum.pine64.org/forumdisplay.php?fid=111)
+--- Forum: Pinebook Pro Tutorials (https://forum.pine64.org/forumdisplay.php?fid=117)
+--- Thread: How to rewrite uboot to emmc (/showthread.php?tid=11980)



How to rewrite uboot to emmc - pineitup - 10-29-2020

I recently reflashed Manjaro 20.10 to the emmc using the manjaro flasher app, but apparently it deleted the uboot because each boot now starts with bout 15 seconds of red light (the indicator on the top left of the keyboard), rather than directly switching to green light for the boot process.

Installing the manjaro uboot package didn't change anything. How can I reflash the uboot to the emmc?

Thanks


RE: How to rewrite uboot to emmc - wdt - 10-29-2020

Maybe you already know?......
In manjaro, installing uboot doesn't actually install it, the 2 (or 3) files get dumped in /boot
you have to do the dd commands yourself, sometimes, also, extlinux.conf gets changed
So, the FIRST thing you should do is make a backup of it (extlinux)
So maybe your uboot files are still the same?


RE: How to rewrite uboot to emmc - pineitup - 10-29-2020

(10-29-2020, 08:33 AM)wdt Wrote: Maybe you already know?......
In manjaro, installing uboot doesn't actually install it, the 2 (or 3) files get dumped in /boot
you have to do the dd commands yourself, sometimes, also, extlinux.conf gets changed
So, the FIRST thing you should do is make a backup of it (extlinux)
So maybe your uboot files are still the same?
Already know?

Is the manjaro-arm-flasher erasing the uboot installed on the emmc? How can I check that?
If it does, then I don't have a backup of the uboot. I just followed what's suggested in the manjaro release here.

If it does remove, how do I proceed with replacing them? Or can anybody kindly refer me to any relevant resource to do that? I'm not super familiar with dd/extlinux in this context

Thank you


RE: How to rewrite uboot to emmc - wdt - 10-29-2020

>Is the manjaro-arm-flasher erasing the uboot installed on the emmc? How can I check that?
Probably, it is a complete image I would guess, mbr and uboot are there in 1st 16M
If/when you install bsp uboot, nothing is erased, the 1st 16M is UNCHANGED
The new uboot and idbloader (and trust - likely) are in /boot
so the usual dd commands (example simplified)
cd /boot ; su
dd if=idblo... of=/dev/whatever seek=64 (dd default bs=512B)
dd if=uboot... of=/dev/..... bs=1M seek=8 (I do a little different, easier I think)
If trust,, bsp usually has, mainline not, mainline uboot.itb has trust within
dd if=trust... of=/dev/.... bs=1M seek=12


RE: How to rewrite uboot to emmc - wpeckham - 12-27-2020

(10-29-2020, 10:48 PM)wdt Wrote: >Is the manjaro-arm-flasher erasing the uboot installed on the emmc? How can I check that?
Probably, it is a complete image I would guess, mbr and uboot are there in 1st 16M
If/when you install bsp uboot, nothing is erased, the 1st 16M is UNCHANGED
The new uboot and idbloader (and trust - likely) are in /boot
so the usual dd commands (example simplified)
cd /boot ; su
dd if=idblo... of=/dev/whatever seek=64    (dd default bs=512B)
dd if=uboot... of=/dev/.....  bs=1M seek=8  (I do a little different, easier I think)
If trust,, bsp usually has, mainline not, mainline uboot.itb has trust within
dd if=trust...  of=/dev/....    bs=1M seek=12
Not sure about anyone else, but when I tried that it rendered my Pro unbootable.  I had to reflash the EMMC to get boot again.  After the freflash, it stilltakes a bit before the light goes green and I get boot, but at least it DOES boot.


RE: How to rewrite uboot to emmc - nightranger73 - 12-27-2020

that's how the new uboot works. It stays red until kernel is loaded.
If you want you can revert to old bsp uboot by typing
sudo pacman -S uboot-pinebookpro-bsp
and then typing the dd commands (as su or with sudo) suggested by pacman itself