Scripts for sniper: LG Optimus Black (P970)
authorPaul Kocialkowski <contact@paulk.fr>
Sat, 18 Apr 2015 20:05:58 +0000 (22:05 +0200)
committerPaul Kocialkowski <contact@paulk.fr>
Sun, 19 Apr 2015 09:36:19 +0000 (11:36 +0200)
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
sniper/u-boot-install.sh [new file with mode: 0755]
sniper/u-boot-load.sh [new file with mode: 0755]
sniper/u-boot.sh [new file with mode: 0755]
sniper/x-loader-build.sh [new file with mode: 0755]
sniper/x-loader-clean.sh [new file with mode: 0755]
sniper/x-loader-config.sh [new file with mode: 0755]
sniper/x-loader-image.sh [new file with mode: 0755]
sniper/x-loader-load.sh [new file with mode: 0755]
sniper/x-loader.sh [new file with mode: 0755]

diff --git a/sniper/u-boot-install.sh b/sniper/u-boot-install.sh
new file mode 100755 (executable)
index 0000000..c450b40
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+. ./u-boot.sh
+
+DRIVE=""
+MOUNT=""
+IMAGE="u-boot.img"
+
+udisksctl mount -b "${DRIVE}1"
+
+sudo cp "$DST/$IMAGE" "$MOUNT/$IMAGE"
+sync
+
+udisksctl unmount -b "${DRIVE}1"
+udisksctl power-off -b $DRIVE
diff --git a/sniper/u-boot-load.sh b/sniper/u-boot-load.sh
new file mode 100755 (executable)
index 0000000..9a9f960
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+. ./u-boot.sh
+
+PUSB="pusb"
+IMAGE="spl/u-boot-spl.bin"
+USB_PRODUCT_ID="d00e"
+
+$PUSB -d $USB_PRODUCT_ID -f "$DST/$IMAGE"
diff --git a/sniper/u-boot.sh b/sniper/u-boot.sh
new file mode 100755 (executable)
index 0000000..f1726a1
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+CROSS_COMPILE=arm-linux-gnueabihf-
+PARALLEL=9
+SRC="$( pwd )/u-boot"
+DST="$( pwd )/u-boot-out"
+ARCH=arm
+CONFIG=sniper_defconfig
+TARGET=
diff --git a/sniper/x-loader-build.sh b/sniper/x-loader-build.sh
new file mode 100755 (executable)
index 0000000..ef38620
--- /dev/null
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+./x-loader-clean.sh
+./x-loader-config.sh
+./x-loader-image.sh
diff --git a/sniper/x-loader-clean.sh b/sniper/x-loader-clean.sh
new file mode 100755 (executable)
index 0000000..ed156fa
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+. ./x-loader.sh
+
+rm -rf $DST
+mkdir $DST
diff --git a/sniper/x-loader-config.sh b/sniper/x-loader-config.sh
new file mode 100755 (executable)
index 0000000..9491236
--- /dev/null
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+. ./x-loader.sh
+
+make -C $SRC O=$DST ARCH=$ARCH CROSS_COMPILE=$CROSS_COMPILE $CONFIG
diff --git a/sniper/x-loader-image.sh b/sniper/x-loader-image.sh
new file mode 100755 (executable)
index 0000000..ae156af
--- /dev/null
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+. ./x-loader.sh
+
+make -C $SRC O=$DST ARCH=$ARCH CROSS_COMPILE=$CROSS_COMPILE -j$PARALLEL $TARGET
diff --git a/sniper/x-loader-load.sh b/sniper/x-loader-load.sh
new file mode 100755 (executable)
index 0000000..116889f
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+. ./x-loader.sh
+
+PUSB="pusb"
+IMAGE="x-load.bin"
+USB_PRODUCT_ID="d00e"
+
+$PUSB -d $USB_PRODUCT_ID -f "$DST/$IMAGE"
diff --git a/sniper/x-loader.sh b/sniper/x-loader.sh
new file mode 100755 (executable)
index 0000000..500e97c
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+CROSS_COMPILE=arm-linux-gnueabihf-
+PARALLEL=9
+SRC="$( pwd )/x-loader"
+DST="$( pwd )/x-loader-out"
+ARCH=arm
+CONFIG=sniper_config
+TARGET=