Initial commit of simple (just forwarding from CAN0 to CAN1 and back) CAN gateway...
[can-benchmark.git] / rtems / gw / mkimg-ppc
1 #!/bin/sh
2
3 TARGET=powerpc-rtems4.10.2
4 DATETIME=`date +"%T-%d-%m-%y"`
5 OBJCOPY="${TARGET}-objcopy"
6
7 BIN_NAME=$1
8
9 START_ADDR=0x00010000
10
11 ${OBJCOPY} -R -S -O binary "$BIN_NAME" "$BIN_NAME.bin" || exit 1
12 cat "$BIN_NAME.bin" | gzip -9 >"$BIN_NAME.gz"
13 mkimage \
14         -A ppc -O rtems -T kernel -a $START_ADDR -e $START_ADDR -n "RTEMS" \
15         -d "$BIN_NAME.gz" "$BIN_NAME.img"
16
17 cp "$BIN_NAME.img" "/var/lib/tftpboot/ryu/uImage->${DATETIME}->${TARGET}"
18 cp "$BIN_NAME.img" "/var/lib/tftpboot/ryu/uImage"