diff options
author | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2019-06-18 13:30:38 +0200 |
---|---|---|
committer | Joonas Kylmälä <joonas.kylmala@iki.fi> | 2020-04-12 11:47:57 -0400 |
commit | 91e13ab06696430a18124e88bf51013200b7de90 (patch) | |
tree | cf4a87b61d52485fc4fbccc134896841a7205674 /install.sh | |
parent | bd76f6351803695fe85d6026e69e964ea3b13c35 (diff) | |
download | kernel_replicant_linux-91e13ab06696430a18124e88bf51013200b7de90.tar.gz kernel_replicant_linux-91e13ab06696430a18124e88bf51013200b7de90.tar.bz2 kernel_replicant_linux-91e13ab06696430a18124e88bf51013200b7de90.zip |
Add build, install and test scriptshistory/replicant-10/5.3-rc6
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Diffstat (limited to 'install.sh')
-rwxr-xr-x | install.sh | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/install.sh b/install.sh new file mode 100755 index 000000000000..52fce33f7248 --- /dev/null +++ b/install.sh @@ -0,0 +1,48 @@ +#!/bin/sh +set -e + +flash_fastboot() +{ + fastboot flash BOOT arch/arm/boot/boot.img + sleep 1 + fastboot flash RECOVERY arch/arm/boot/boot.img + sleep 1 + fastboot reboot + echo "OK" +} + +flash_heimdall() +{ + heimdall flash \ + --BOOT arch/arm/boot/boot.img \ + --RECOVERY arch/arm/boot/boot.img + echo "OK" +} + +install_parabola_no_modules() +{ + host="$1" + + rsync arch/arm/boot/zImage "${host}:/boot/vmlinuz-linux-custom" + rsync arch/arm/boot/dts/*.dtb "${host}:/boot/dtbs/linux-custom/" + rsync -a tests "${host}:" + + ssh "${host}" "test -f /boot/initramfs-linux-custom.img || mkinitcpio -p linux-custom" +} + +usage() +{ + echo "Usage: $0 <fastboot|heimdall>" + echo "Usage: $0 parabola <host>" + exit 1 +} + +if [ $# -eq 1 -a "$1" = "fastboot" ] ; then + flash_fastboot +elif [ $# -eq 1 -a "$1" = "heimdall" ] ; then + flash_heimdall +elif [ $# -eq 2 -a "$1" = "parabola" ] ; then + install_parabola_no_modules "$2" +else + usage +fi |