Author: jaguarondi
Date: 2008-08-11 13:11:01 +0200 (Mon, 11 Aug 2008)
New Revision: 1455

Added:
   firmware/fuxusb/trunk/src/Makefile
   firmware/fuxusb/trunk/src/svnrev.tmpl.h
Modified:
   firmware/fuxusb/trunk/src/global.c
   firmware/fuxusb/trunk/src/usb_commands.c
   firmware/fuxusb/trunk/src/version.h
Log:
* Added revision numbers updated from the Makefile and the revision number 
bytes were swapped.


Added: firmware/fuxusb/trunk/src/Makefile
===================================================================
--- firmware/fuxusb/trunk/src/Makefile                          (rev 0)
+++ firmware/fuxusb/trunk/src/Makefile  2008-08-11 11:11:01 UTC (rev 1455)
@@ -0,0 +1,30 @@
+# Makefile - GNU Makefile for TUXCORE
+#
+# TUXCORE - Firmware for the 'core' CPU of tuxdroid
+# Copyright (C) 2007 C2ME S.A. <[EMAIL PROTECTED]>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+#
+
+# $Id$
+
+## Build
+all: svnrev.h
+
+## Generate SVN info
+#  We need to change the status each time a file changes, thus so many
+#  dependencies
+svnrev.h: $(CSOURCE) $(HEADERS)
+       svnwcrev . svnrev.tmpl.h svnrev.h


Property changes on: firmware/fuxusb/trunk/src/Makefile
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Modified: firmware/fuxusb/trunk/src/global.c
===================================================================
--- firmware/fuxusb/trunk/src/global.c  2008-08-11 08:41:45 UTC (rev 1454)
+++ firmware/fuxusb/trunk/src/global.c  2008-08-11 11:11:01 UTC (rev 1455)
@@ -46,8 +46,9 @@
 
 /** \name Dongle infos 
  * @{ */
-code version_t info_version ={VERSION_CMD, CPU_VER_JOIN(FUXUSB_CPU_NUM, 
VER_MAJOR), VER_MINOR, VER_UPDATE}; 
-code revision_t info_revision={REVISION_CMD, REVISION_NUMBER, RELEASE_TYPE};
+code version_t info_version ={VERSION_CMD, 
+    CPU_VER_JOIN(FUXUSB_CPU_NUM, VER_MAJOR), VER_MINOR, VER_UPDATE}; 
+code revision_t info_revision={REVISION_CMD, SVN_REV, RELEASE_TYPE};
 code author_t info_author={AUTHOR_CMD, AUTHOR_ID, VARIATION};
 /* @} */
 

Added: firmware/fuxusb/trunk/src/svnrev.tmpl.h
===================================================================
--- firmware/fuxusb/trunk/src/svnrev.tmpl.h                             (rev 0)
+++ firmware/fuxusb/trunk/src/svnrev.tmpl.h     2008-08-11 11:11:01 UTC (rev 
1455)
@@ -0,0 +1,38 @@
+/*
+ * TUXCORE - Firmware for the 'core' CPU of tuxdroid
+ * Copyright (C) 2007 C2ME S.A. <[EMAIL PROTECTED]>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+/* $Id$ */
+
+/* This file is a template to generate svnrev.h automatically.
+ * SubWCRev performs keyword susbstitution whith SVN information.
+ */
+
+#ifndef _SVNREV_H_
+#define _SVNREV_H_
+
+#define SVN_REV     $WCREV$
+#define SVN_REVSTR  "$WCREV$"
+#define SVN_REVDATE "$WCDATE$"
+#define SVN_MOD     $WCMODS?1:0$
+#define SVN_MIX     $WCMIXED?1:0$
+#define SVN_STATUS  (SVN_MOD + (SVN_MIX<<1))
+#define SVN_RANGE   "$WCRANGE$"
+#define SVN_URL     "$WCURL$"
+
+#endif /* _SVNREV_H_ */


Property changes on: firmware/fuxusb/trunk/src/svnrev.tmpl.h
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Modified: firmware/fuxusb/trunk/src/usb_commands.c
===================================================================
--- firmware/fuxusb/trunk/src/usb_commands.c    2008-08-11 08:41:45 UTC (rev 
1454)
+++ firmware/fuxusb/trunk/src/usb_commands.c    2008-08-11 11:11:01 UTC (rev 
1455)
@@ -254,14 +254,14 @@
 
         /* Revision */
         FIFO_STT_put(info_revision.revision_cmd);
+        FIFO_STT_put((info_revision.revision&0x00FF));
         FIFO_STT_put((info_revision.revision&0xFF00)>>8);
-        FIFO_STT_put((info_revision.revision&0x00FF));
         FIFO_STT_put(info_revision.release_type);
 
         /* Author */
         FIFO_STT_put(info_author.author_cmd);
+        FIFO_STT_put((info_author.author_id&0x00FF));
         FIFO_STT_put((info_author.author_id&0xFF00)>>8);
-        FIFO_STT_put((info_author.author_id&0x00FF));
         FIFO_STT_put(info_author.variation);
 
         status_requested = True;

Modified: firmware/fuxusb/trunk/src/version.h
===================================================================
--- firmware/fuxusb/trunk/src/version.h 2008-08-11 08:41:45 UTC (rev 1454)
+++ firmware/fuxusb/trunk/src/version.h 2008-08-11 11:11:01 UTC (rev 1455)
@@ -24,18 +24,24 @@
 #ifndef _VERSION_H_
 #define _VERSION_H_
 
+#include "svnrev.h"
+
 /*
  * Version number
  */
 #define VER_MAJOR           0
-#define VER_MINOR           4
-#define VER_UPDATE          1
+#define VER_MINOR           5
+#define VER_UPDATE          0
 
+/** RELEASE should be set to '1' prior to tagging a release, and reset
+ * immediately after. It's like appending (SVN_UNRELEASED) to a version number
+ * when equal to '0'. */
+#define RELEASE             1
+
 #define AUTHOR_ID           0 /* official release */
 #define VARIATION           0 /* generic firmware */
-#define REVISION_NUMBER     0 /* XXX find a way to define this automatically 
in \
-                                 the Makefile from SVN */
-#define RELEASE_TYPE        0x04
 
+#define RELEASE_TYPE (SVN_STATUS | (RELEASE << 2))
+
 #endif /* _VERSION_H_ */
 


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Tux-droid-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn

Reply via email to