]> rtime.felk.cvut.cz Git - can-benchmark.git/blobdiff - rtems/gw/mkimg-ppc
Initial commit of simple (just forwarding from CAN0 to CAN1 and back) CAN gateway...
[can-benchmark.git] / rtems / gw / mkimg-ppc
diff --git a/rtems/gw/mkimg-ppc b/rtems/gw/mkimg-ppc
new file mode 100755 (executable)
index 0000000..09c0eb2
--- /dev/null
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+TARGET=powerpc-rtems4.10.2
+DATETIME=`date +"%T-%d-%m-%y"`
+OBJCOPY="${TARGET}-objcopy"
+
+BIN_NAME=$1
+
+START_ADDR=0x00010000
+
+${OBJCOPY} -R -S -O binary "$BIN_NAME" "$BIN_NAME.bin" || exit 1
+cat "$BIN_NAME.bin" | gzip -9 >"$BIN_NAME.gz"
+mkimage \
+       -A ppc -O rtems -T kernel -a $START_ADDR -e $START_ADDR -n "RTEMS" \
+       -d "$BIN_NAME.gz" "$BIN_NAME.img"
+
+cp "$BIN_NAME.img" "/var/lib/tftpboot/ryu/uImage->${DATETIME}->${TARGET}"
+cp "$BIN_NAME.img" "/var/lib/tftpboot/ryu/uImage"