PINE64
Flashing updated uboot in Manjaro - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: Pinebook Pro (https://forum.pine64.org/forumdisplay.php?fid=111)
+--- Forum: Linux on Pinebook Pro (https://forum.pine64.org/forumdisplay.php?fid=114)
+--- Thread: Flashing updated uboot in Manjaro (/showthread.php?tid=9062)



Flashing updated uboot in Manjaro - TDC_PBP - 02-07-2020

Does anyone have clear, specific instructions on how to install the updated uboot in manjaro? I tried to follow these instructions in the /boot file in manjaro:
flash_uboot() {
  echo "A new U-Boot version needs to be flashed onto your install drive. Please use lsblk to determine your drive, before proceeding."
    echo "You can do this by running:"
    echo "# dd if=/boot/idbloader.img of=/dev/mmcblkX seek=64 conv=notrunc"
    echo "# dd if=/boot/u-boot.itb of=/dev/mmcblkX seek=16384 conv=notrunc"
}

## arg 1:  the new package version
post_install() {
  flash_uboot
}

## arg 1:  the new package version
## arg 2:  the old package version
post_upgrade() {
  flash_uboot
}
but....the second dd command failed (never gave any visible output) and I temporarily bricked my PBP Angry . I don't particularly want to repeat that experience EVER again, so I don't want to try it again until someone else gives it a good look over. Confusingly, I found these instructions printed in the terminal while doing pacman -Syyu:

(213/215) upgrading uboot-pinebookpro                [############################] 100%
warning: /boot/boot.scr installed as /boot/boot.scr.pacnew
warning: /boot/boot.txt installed as /boot/boot.txt.pacnew
A new U-Boot version needs to be flashed onto /dev/mmcblkX.
You can do this later by running:
# dd if=/boot/idbloader.img of=/dev/mmcblkX seek=64 conv=notrunc
# dd if=/boot/uboot.img of=/dev/mmcblkX seek=16384 conv=notrunc
# dd if=/boot/trust.img of=/dev/mmcblkX seek=24576 conv=notrunc
(214/215) upgrading xorg-server-common       

Thoughts/ideas??
P.S. I am running Manjaro from my emmc and did check to make sure I flashed the correct drive (the emmc)


RE: Flashing updated uboot in Manjaro - slyecho - 02-12-2020

I managed to mess up one install on the SD card by following the instructions in pacman. When I got a new image working again I copied it all to eMMC and it is working fine now and I haven't touched the uboot again.

There is some discussion in the Manjaro ARM forums about this: https://forum.manjaro.org/t/uboot-img-does-not-exist-in-boot/120019

My suggestion is to leave it alone if it is working (that is boot from eMMC and SD card etc).


RE: Flashing updated uboot in Manjaro - jiyong - 05-13-2021

I stumbled upon this website: https://www.jwillikers.com/update-u-boot-on-the-pinebook-pro

I followed the instructions.
With lsblk you can check which drive is your eMMC.
With Manjaro it's probably mmcblk2.

sudo dd if=/boot/idbloader.img of=/dev/mmcblk2 seek=64 conv=notrunc,fsync
sudo dd if=/boot/u-boot.itb of=/dev/mmcblk2 seek=16384 conv=notrunc,fsync

Not sure why the second command failed on your PBP.


RE: Flashing updated uboot in Manjaro - djhnsn - 05-16-2021

(05-13-2021, 09:00 AM)jiyong Wrote: I stumbled upon this website: https://www.jwillikers.com/update-u-boot-on-the-pinebook-pro

I followed the instructions.
With lsblk you can check which drive is your eMMC.
With Manjaro it's probably mmcblk2.

sudo dd if=/boot/idbloader.img of=/dev/mmcblk2 seek=64 conv=notrunc,fsync
sudo dd if=/boot/u-boot.itb of=/dev/mmcblk2 seek=16384 conv=notrunc,fsync

Not sure why the second command failed on your PBP.

Correct, op is flashing to mmcblkX. Which is likely supposed to me mmcblk2. They should probably mention that in the instructions which say to use lsblk.


RE: Flashing updated uboot in Manjaro - sciolus - 05-28-2021

(05-13-2021, 09:00 AM)jiyong Wrote: I stumbled upon this website: https://www.jwillikers.com/update-u-boot-on-the-pinebook-pro

I followed the instructions.
With lsblk you can check which drive is your eMMC.
With Manjaro it's probably mmcblk2.

sudo dd if=/boot/idbloader.img of=/dev/mmcblk2 seek=64 conv=notrunc,fsync
sudo dd if=/boot/u-boot.itb of=/dev/mmcblk2 seek=16384 conv=notrunc,fsync

Not sure why the second command failed on your PBP.
My heart rate is coming back down to normal. I don't have anything critical on my PBP, but I don't have time to deal with bricking it.



I typed in the commands from the output of sudo pacman -Syu very carefully using mmcblk2.


Code:
A new U-Boot version needs to be flashed our install drive. Please use lsblk to determine your drive, before proceeding.
You can do this by running:
# dd if=/boot/idbloader.img of=/dev/mmcblkX seek=64 conv=notrunc
# dd if=/boot/uboot.img of=/dev/mmcblkX seek=16384 conv=notrunc
# dd if=/boot/trust.img of=/dev/mmcblkX seek=24576 conv=notrunc




I did not include conv=notrunc,fsync, just notrunc, as shown.



Rebooted fine.



I took it on faith to use blk2. I'm not sure how to know that with lsblk's output.


Code:
NAME        MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT

mmcblk2      179:0    0  58.2G  0 disk

├─mmcblk2p1  179:1    0 213.6M  0 part /boot

└─mmcblk2p2  179:2    0    58G  0 part /

mmcblk2boot0 179:32  0    4M  1 disk

mmcblk2boot1 179:64  0    4M  1 disk

mmcblk1      179:96  0  3.7G  0 disk

└─mmcblk1p1  179:97  0  3.7G  0 part

zram0        252:0    0  5.7G  0 disk [SWAP]



RE: Flashing updated uboot in Manjaro - wdt - 05-28-2021

Nearly always,, the controller on emmc partitions part of the NAND
to boot0, boot1, rpmb
This NEVER happens on uSD or SD chips
I do have 1 very recent emmc without boot0 etc, this is rare
BTW, rk3399 or rk3328 (cpus) do NOT use boot0 or boot1