user/u-boot-rm: fix updater

This commit is contained in:
Antoine Martin 2023-04-24 02:22:50 -04:00
parent 71898593b5
commit e4a9b5e149
Signed by: forge
GPG key ID: D62A472A4AA7D541
2 changed files with 10 additions and 8 deletions

View file

@ -5,7 +5,7 @@ pkgname=u-boot-rm
pkgver=2020.09
_rm1tag=97b35fdddf0077abd2e0f0409b94ef20adbe8565
_rm2tag=47c91918aa7724c16b6eaf87cf5dfbf4548eafc1
pkgrel=1
pkgrel=2
pkgdesc="u-boot bootloader common files"
url="https://www.denx.de/wiki/U-Boot/"
@ -136,7 +136,7 @@ done
sha512sums="
7cc8d513cac1d63ee5119529caa056164ee3bc3633da5d880fbfb344b770c7c53c41475d42dd129b505390dcd5449e14524afc06f7cdba9354af7e70a7035ef9 u-boot-rm1-97b35fdddf0077abd2e0f0409b94ef20adbe8565.tar.gz
d0d18b123c4281285a8b3c1afd9ef623b48a33506399c8e0dbc393f22d967ee3e5df7030aab26c4fe8cad614f3f22f1ea5d6b5bb4ef5cc46fffe56b7ac7c3c28 u-boot-rm2-47c91918aa7724c16b6eaf87cf5dfbf4548eafc1.tar.gz
49a7325bf0df5661c33b043d314eea382c348d2862b807991e151d9ef34ecd01d5c4b3c602c171e66c63c881631ccd610f81bc696b00025d4ae0926b82896731 update-u-boot
6bf8c6dec3764aead977e82114984ac28e84a4b83ae77a74edf6242673da5ddf7b73c11386d5c077d9e6738248ccda44c57b628af13d1597dd619f764e063731 update-u-boot
f8c9bb6e84d6f0620c976ac7ad5dd7ec7ff9dfdd4b1d03d2bf6653e7beccf80bdf2debfc92fb1f696dba92fb40287d3c45897e0078951451d0835cb61a5f16d1 README.txt
673cb917cc565ae245d4a7d659227bc240473112bc9c73ae184a64ce74be7994273d6dc4db17194d348941f83a42b3b67d3140f6f23c37c13d6dc93f7d76cc39 rm1-uboot-config-patch.diff
0e98404ca6d20eb01bd9c129b05e2eb10c60a692a56adc221ea283b4bfe7b0bcc2851121d4c3fe51e07a9784c339f7ccb221e0cc3f3603144fec46be66d0cbcc rm2-uboot-config-patch.diff

View file

@ -16,6 +16,7 @@ get_defaults() {
if [ -z "$device" ]; then
case "$board" in
wand|cubie|cubie2) device=/dev/mmcblk0p0 ;;
zero-gravitas) device=/dev/mmcblk1
esac
fi
@ -60,8 +61,8 @@ while [ $# -gt 0 ]; do
case "$1" in
wand|wandboard) board="wand" ;;
cubie|cubieboard) board="cubie" ;;
rm1) board="zero-gravitas" ;;
rm2) board="zero-sugar" ;;
zerogravitas) board="zero-gravitas" ;;
zerosugar) board="zero-sugar" ;;
*) usage; exit 1;;
esac
shift
@ -112,10 +113,11 @@ cubie|cubie2)
;;
zero-gravitas)
[ -e "$imagedir/zero-gravitas" ] || die "rM1 images not installed, apk add u-boot-rm1"
$drurun dd if=/dev/zero of=/dev/mmcblk1 bs=512 seek=1536 count=16
$dryrun echo 0 > /sys/block/mmcblk1boot0/force_ro
$dryrun dd if=$imagedir/zero-gravitas/u-boot.bin of=/dev/mmcblk1boot0 bs=512 seek=2
$dryrun echo 1 > /sys/block/mmcblk1boot0/force_ro
$dryrun dd if=/dev/zero of=$device bs=512 seek=1536 count=16
[ -z "$dryrun" ] && echo 0 > /sys/block/${device/\/dev\/}boot0/force_ro
$dryrun dd if=/dev/zero of=${device}boot0 bs=512 count=2
$dryrun dd if=$imagedir/zero-gravitas/u-boot.bin of=${device}boot0 bs=512 seek=2
[ -z "$dryrun" ] && echo 1 > /sys/block/${device/\/dev\/}boot0/force_ro
;;
zero-sugar)
die "rM2 not yet tested"