summaryrefslogtreecommitdiffstats
path: root/board/hardkernel/odroidc2/post-image.sh
diff options
context:
space:
mode:
Diffstat (limited to 'board/hardkernel/odroidc2/post-image.sh')
-rwxr-xr-xboard/hardkernel/odroidc2/post-image.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/board/hardkernel/odroidc2/post-image.sh b/board/hardkernel/odroidc2/post-image.sh
new file mode 100755
index 0000000000..aaf12c1e79
--- /dev/null
+++ b/board/hardkernel/odroidc2/post-image.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+BOARD_DIR="$(dirname $0)"
+GENIMAGE_CFG="${BOARD_DIR}/genimage.cfg"
+GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
+
+cp ${BOARD_DIR}/boot.ini ${BINARIES_DIR}/
+
+rm -rf "${GENIMAGE_TMP}"
+
+genimage \
+ --rootpath "${TARGET_DIR}" \
+ --tmppath "${GENIMAGE_TMP}" \
+ --inputpath "${BINARIES_DIR}" \
+ --outputpath "${BINARIES_DIR}" \
+ --config "${GENIMAGE_CFG}"
+
+dd if=${BINARIES_DIR}/u-boot.bin of=${BINARIES_DIR}/sdcard.img bs=1 count=442 conv=sync,notrunc
+dd if=${BINARIES_DIR}/u-boot.bin of=${BINARIES_DIR}/sdcard.img bs=512 skip=1 seek=1 conv=fsync,notrunc
OpenPOWER on IntegriCloud