Skip to content

Commit

Permalink
ayufan: dev: fix SPI flash for rk3399
Browse files Browse the repository at this point in the history
  • Loading branch information
ayufan committed Nov 19, 2023
1 parent 2436198 commit e1ff9e1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions dev-ayufan/root/usr/local/lib/u-boot-rockchip/loader-common
Original file line number Diff line number Diff line change
Expand Up @@ -44,21 +44,21 @@ case "$PACKAGE_NAME" in
*-rockpro64-*)
SD_LOADER=/usr/lib/u-boot-rockpro64/rksd_loader.img
SPI_LOADER=/usr/lib/u-boot-rockpro64/rkspi_loader.img
SPI_OFFSET=$((64*512))
SPI_OFFSET=0
BOARD=pine64,rockpro64
;;

*-pinebookpro-*)
SD_LOADER=/usr/lib/u-boot-pinebookpro/rksd_loader.img
SPI_LOADER=/usr/lib/u-boot-pinebookpro/rkspi_loader.img
SPI_OFFSET=$((64*512))
SPI_OFFSET=0
BOARD=pine64,pinebookpro
;;

*-rockpi4b-*)
SD_LOADER=/usr/lib/u-boot-rockpi4b/rksd_loader.img
SPI_LOADER=/usr/lib/u-boot-rockpi4b/rkspi_loader.img
SPI_OFFSET=$((64*512))
SPI_OFFSET=0
BOARD=radxa,rockpi4b
;;

Expand Down
2 changes: 1 addition & 1 deletion dev-ayufan/root/usr/local/sbin/upgrade_bootloader.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ prompt() {
methods[$cnt]="dd if=\"$SD_LOADER\" of=\"$MNT_DEV\" iflag=fullblock oflag=direct"
cnt=$((cnt+1))
echo "$cnt) Remove bootloader on $MNT_DEV"
methods[$cnt]="dd if=/dev/zero of=\"$MNT_DEV\" iflag=fullblock oflag=direct"
methods[$cnt]="dd if=/dev/zero of=\"$MNT_DEV\" bs=32768 iflag=fullblock oflag=direct || true"
cnt=$((cnt+1))
echo
done < <(blkid /dev/disk/by-id/{ata,usb,mmc}-* -o device -t PARTLABEL="loader1")
Expand Down
4 changes: 2 additions & 2 deletions dev.mk
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ version: .scmversion

deploy: u-boot-package
scp u-boot-$(BOARD_TARGET)-$(RELEASE_NAME).deb root@$(TARGET_HOST):
ssh root@$(TARGET_HOST) dpkg -i ./u-boot-$(BOARD_TARGET)-$(RELEASE_NAME).deb
#ssh root@$(TARGET_HOST) rock64_upgrade_bootloader.sh
ssh root@$(TARGET_HOST) apt install --reinstall ./u-boot-$(BOARD_TARGET)-$(RELEASE_NAME).deb
ssh root@$(TARGET_HOST) rock64_upgrade_bootloader.sh

endif

0 comments on commit e1ff9e1

Please sign in to comment.