diff options
Diffstat (limited to 'alt-rootfs-installer/socs.d/AllWinner-aarch64.sh')
| -rw-r--r-- | alt-rootfs-installer/socs.d/AllWinner-aarch64.sh | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/alt-rootfs-installer/socs.d/AllWinner-aarch64.sh b/alt-rootfs-installer/socs.d/AllWinner-aarch64.sh new file mode 100644 index 0000000..ffc7908 --- /dev/null +++ b/alt-rootfs-installer/socs.d/AllWinner-aarch64.sh @@ -0,0 +1,36 @@ +#!/bin/bash +# vim:sw=8:noet + +MEDIATABLE=msdos +START_SECTOR=16 # MiB +ROOTPART_NUM=1 +[ -n "$SYSCON" ] || SYSCON=ttyS0,115200n8 + +soc_write_bootloader() { + [ -n "$TMPROOT" ] || mount_partition + # Write U-Boot + set_path_to_uboot + print_message "Searching U-Boot files for ${TARGET-}..." + [ -d "$UBOOT" ] || + fatal_error "U-Boot files for ${TARGET-} were not found" + print_done + if [ -f "$UBOOT/u-boot.itb" ]; then + print_message "Writing sunxi-spl.bin for ${TARGET-}..." + dd if="$UBOOT/sunxi-spl.bin" of="${MEDIA-}" bs=8k seek=1 || + fatal_error "failed to write SPL" + sync + print_done + + print_message "Writing U-Boot image for ${TARGET-}..." + dd if="$UBOOT/u-boot.itb" of="${MEDIA-}" bs=8k seek=5 || + fatal_error "failed to write U-Boot" + sync + print_done + else + print_message "Writing u-boot-sunxi-with-spl.bin..." + dd if="$UBOOT/u-boot-sunxi-with-spl.bin" of="${MEDIA-}" bs=1024 seek=8 || + fatal_error "failed to write U-Boot" + sync + print_done + fi +} |