Skip to content

Commit

Permalink
u-boot: rockchip: add function to update idbloader
Browse files Browse the repository at this point in the history
  • Loading branch information
RadxaYuntian committed Nov 27, 2023
1 parent ab19f0b commit bf7ed7c
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions common/u-boot_setup-rockchip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,12 @@ maskrom_spinand() {
fi
}

maskrom_update_bootloader() {
maskrom_update_idbloader() {
rkdeveloptool wl 64 "$SCRIPT_DIR/idbloader.img"
}

maskrom_update_bootloader() {
maskrom_update_idbloader
if [[ -f "$SCRIPT_DIR/u-boot.itb" ]]
then
rkdeveloptool wl 16384 "$SCRIPT_DIR/u-boot.itb"
Expand Down Expand Up @@ -119,10 +123,16 @@ maskrom_reset() {
rkdeveloptool rd
}

update_bootloader() {
update_idbloader() {
local DEVICE=$1

dd conv=notrunc,fsync if="$SCRIPT_DIR/idbloader.img" of=$DEVICE bs=512 seek=64
}

update_bootloader() {
local DEVICE=$1

update_idbloader "$DEVICE"
if [[ -f "$SCRIPT_DIR/u-boot.itb" ]]
then
dd conv=notrunc,fsync if="$SCRIPT_DIR/u-boot.itb" of=$DEVICE bs=512 seek=16384
Expand Down

0 comments on commit bf7ed7c

Please sign in to comment.