summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoy Cho <joy.cho@hardkernel.com>2017-12-28 05:15:36 +0300
committerJoy Cho <joy.cho@hardkernel.com>2017-12-28 05:17:45 +0300
commitf78866882b101dcdb37d0b5722d9693b7b492e38 (patch)
tree29fc5bd89fe4006c1ab2e44650cdd8f3e81fdca1
parentdeed6a89bf577f87ac933fac2e6dfdf5ad65a53f (diff)
downloadu-boot-f78866882b101dcdb37d0b5722d9693b7b492e38.tar.xz
sd_fuse: adjust sdfuse.sh to use flexible card node
Change-Id: I6fa0c6d365683bb4f9fe633049993e53922aaed3
-rwxr-xr-xsd_fuse/sdfuse.sh22
1 files changed, 19 insertions, 3 deletions
diff --git a/sd_fuse/sdfuse.sh b/sd_fuse/sdfuse.sh
index 25cda423f5..6fb975f8c2 100755
--- a/sd_fuse/sdfuse.sh
+++ b/sd_fuse/sdfuse.sh
@@ -1,7 +1,23 @@
#!/bin/bash
+#
+# initial fusing script for ODROID-N1 with Rockchip RK3399
+#
-sudo dd if=./idbloader.img of=/dev/sdd conv=fsync bs=512 seek=64
-sudo dd if=./uboot.img of=/dev/sdd conv=fsync bs=512 seek=16384
-sudo dd if=./trust.img of=/dev/sdd conv=fsync bs=512 seek=24576
+IDBLOADER=idbloader.img
+UBOOT=uboot.img
+TRUST=trust.img
+if [ -z $1 ]; then
+ echo "Usage ./sd_fusing.sh <SD card reader's device>"
+ exit 1
+fi
+
+sudo dd if=$IDBLOADER of=$1 conv=fsync bs=512 seek=64
+sudo dd if=$UBOOT of=$1 conv=fsync bs=512 seek=16384
+sudo dd if=$TRUST of=$1 conv=fsync bs=512 seek=24576
+
+sync
+
+sudo eject $1
+echo finished