Skip to content

Instantly share code, notes, and snippets.

@cdcs
Last active August 29, 2015 14:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cdcs/0c789e9aae9e79200da5 to your computer and use it in GitHub Desktop.
Save cdcs/0c789e9aae9e79200da5 to your computer and use it in GitHub Desktop.
#!/bin/bash
NAME=XKYAPP
OBJCOPY=arm-rtems4.11-objcopy
MKIMAGE=mkimage
ADDRESS=0x80000000
ENTRY=0x80000000
$OBJCOPY -R -S -O binary $NAME.exe $NAME.bin
cat $NAME.bin | gzip -9 > $NAME.gz
$MKIMAGE -A arm -O rtems -T kernel -a $ADDRESS -e $ENTRY -n "RTEMS" -d $NAME.gz $NAME.img
rm $NAME.bin $NAME.gz
mv $NAME.img /var/lib/tftpboot/XKYAPP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment