From 569d11d8a5f033fb3bb67b4cabe55d386bb25794 Mon Sep 17 00:00:00 2001 From: laforge Date: Wed, 20 Sep 2006 00:50:54 +0000 Subject: - implement some more missing DFU bits - add debugging support to DFU - introduce a auto-generated compile.h to add reviison number/... to firmware git-svn-id: https://svn.openpcd.org:2342/trunk@201 6dc7ffe9-61d6-0310-9af1-9938baff3ed1 --- firmware/scripts/mkcompile_h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 firmware/scripts/mkcompile_h (limited to 'firmware/scripts') diff --git a/firmware/scripts/mkcompile_h b/firmware/scripts/mkcompile_h new file mode 100755 index 0000000..22ac262 --- /dev/null +++ b/firmware/scripts/mkcompile_h @@ -0,0 +1,24 @@ +#!/bin/sh + +MAX_LEN=32 +TRUNCATE="sed -e s/\(.\{1,$MAX_LEN\}\).*/\1/" + +DATE=`LC_ALL=C LANG=C date +%Y%m%d-%H%M%S` +BY=`whoami` +HOST=`hostname | $TRUNCATE` +BYHOST=`echo ${BY}@${HOST} | $TRUNCATE` +SVNREV=`svn info | grep \^Revision: | cut -c 11-` + +svn st | grep \^M >/dev/null + +[ "$?" -eq "0" ] && SVNREV=${SVNREV}-unclean + +echo "#ifndef _COMPILE_H" +echo "#define _COMPILE_H" +echo +echo /\* This file is auto generated \*/ +echo \#define COMPILE_DATE \"${DATE}\" +echo \#define COMPILE_BY \"${BYHOST}\" +echo \#define COMPILE_SVNREV \"${SVNREV}\" +echo +echo "#endif /* _COMPILE_H */" -- cgit v1.2.3