How to update uboot without bpi-update

Hi,

is it possible to “burn” (BPI-R2-720P-2k.img?) to sd-card using dd only?

regards Frank

FYI, please let me know if you have any question.

Nice,thank you.

Since preloader is also in the bootloader-image, i assime that i can write the image (extracted) like this to sd-card:

dd if=BPI-R2-720p-2k.img of=/dev/sdx bs=1k skip=2 seek=2 count=1022

Like it’s done in bootloader.sh to img + seek

Am i right?

I’m not sure if your command is correct, please use bpi-bootsel to program it.

i want to do it without bpi-tools, so i can do it on every pc without installing any tools

img starts with magic data “4D 4D 4D 01 38”, that data is on SD-Card at position 800h=2048, so i try it without skip (skip=input skip=0,seek=output-skip)

sudo dd if=BPI-R2-720P-2k.img of=/dev/sdb bs=1k seek=2 count=1022 #unzipped img! use gunzip BPI.....img.gz

success :slight_smile:

BPI-IoT> emmc --help
emmc - eMMC sub system

Usage:
emmc read part addr blk# cnt
emmc write part addr blk# cnt
emmc ecsd       - Dump ext csd
emmc pconf val  - Set Part Config val

anybody who wants to do this, please make a backup of the first 1-10MB (1MB if you stay in that boundraries, but more if you write over it), so you can restore it, after writing the wrong data

sudo dd if=/dev/sdb of=bpi-r2-first10M.img bs=1M count=10 #10MB

to restore simply exchange if and of.

added infos and my first steps in u-boot also in my Wiki: http://www.fw-web.de/dokuwiki/doku.php?id=en:bpi-r2:

@garywang: emmc seems the same layout as SD, so emmc can be programmed the same way? how is the default boot-dev changed?

Yes, the layout of EMMC user space is the same with SD card.

so i can use same-command on emmc, right? how about default boot?

is it possible to load uboot from emmc, try first SD-Card-boot and if no success boot emmc?

Got emmc-boot working the manual way: http://www.fw-web.de/dokuwiki/doku.php?id=en:bpi-r2:storage

@garywang how do you manage the boot-device-change (mmcblk1 instead of mmcblk0 in uboot) when copy to emmc?