> From: Christian Rueger <cr+li...@rueger-net.de>
> Date: Mon, 11 Jan 2021 19:16:42 +0100
> 
> Hi,
> 
> i have installed OpenBSD 6.7 on my Rock Pi 4 for some time and make
> an upgrade to current. That works fine and i also update the
> installed ports. I copy the new DTB file to vendor directory on the
> sd0i partion, but how can i update the the old installed U-Boot?

You don't have to update U-Boot whenever you're updating your OS.
Think of U-Boot as the BIOS of an x86 machine.  You typically don't
update the BIOS when you update the OS on such a system don't you?

Updating U-Boot is not without risk.  We can't test all the boards for
which we build U-Boot and unfortunately the U-Boot developers don't
always test things properly either.

That said, sometimes new features get added to U-Boot for a particular
board.  In those cases I would recommond that you try the new U-Boot
on a fresh uSD card first to see whether it still works properly on
your hardware.  This is especially easy if you installed U-Boot on
separate media in the first place (i.e. U-Boot on a uSD card and
OpenBSD on eMMC or a USB disk).

> Should i upgrade the U-Boot image over tftp?
> https://www.denx.de/wiki/view/DULG/UBootInstallUsingUBoot
> 
> Or can i write the new image somewhere to the eMMC module?
> 
> rockpi# fdisk sd0
> Disk: sd0       geometry: 15042/255/63 [241664000 Sectors]
> Offset: 0       Signature: 0xAA55
>            Starting         Ending         LBA Info:
> #: id      C   H   S -      C   H   S [       start:        size ]
> -------------------------------------------------------------------------------
> *0: 0C      2  10   9 -      4  20  16 [       32768:       32768 ] FAT32L    
>   
> 1: 00      0   0   0 -      0   0   0 [           0:           0 ] unused     
>  
> 2: 00      0   0   0 -      0   0   0 [           0:           0 ] unused     
>  
> 3: A6      4  20  17 -    130 138   8 [       65536:     2031616 ] OpenBSD 
> 
> Thanks,
> Christian

The procedure varies from SoC to SoC.  The Rock Pi 4 is based on the
RockChip RK3399 SoC.  For that SoC, the procedure for updating U-Boot
from OpenBSD is:

    dd if=idbloader.img of=/dev/sdNc seek=64
    dd if=u-boot.itb of=/dev/sdNc seek=16384

where N is the number that corresponds to your uSD or eMMC device.

Note that the RK3399 boards tend to prefer booting from eMMC over
booting from uSD.  So if you have U-Boot on your eMMC module and write
the new U-Boot to uSD, it will not pick up the new U-Boot.

Cheers,

Mark

Reply via email to