1
0
Fork 0
forked from len0rd/rockbox

hwstub: don't put revision in the protocol, it's specific to the implementation

Change-Id: I1311a22da41fe977f1613f1e313a864baa03027c
This commit is contained in:
Amaury Pouly 2014-08-05 18:18:17 +02:00
parent 43ca127ebf
commit dd05dc76a4
4 changed files with 8 additions and 13 deletions

View file

@ -27,11 +27,6 @@
#define HWSTUB_VERSION_MAJOR 4 #define HWSTUB_VERSION_MAJOR 4
#define HWSTUB_VERSION_MINOR 0 #define HWSTUB_VERSION_MINOR 0
#define HWSTUB_VERSION_REV 0
#define HWSTUB_VERSION__(maj,min,rev) #maj"."#min"."#rev
#define HWSTUB_VERSION_(maj,min,rev) HWSTUB_VERSION__(maj,min,rev)
#define HWSTUB_VERSION HWSTUB_VERSION_(HWSTUB_VERSION_MAJOR,HWSTUB_VERSION_MINOR,HWSTUB_VERSION_REV)
/** /**
* A device can use any VID:PID but in case hwstub is in full control of the * A device can use any VID:PID but in case hwstub is in full control of the

View file

@ -1 +1,3 @@
#include "../hwstub_protocol.h" #include "../hwstub_protocol.h"
#define HWSTUB_VERSION_REV 1

View file

@ -231,7 +231,7 @@ int my_lua_udelay(lua_State *state)
bool my_lua_import_hwstub() bool my_lua_import_hwstub()
{ {
int oldtop = lua_gettop(g_lua); int oldtop = lua_gettop(g_lua);
lua_newtable(g_lua); // hwstub lua_newtable(g_lua); // hwstub
lua_newtable(g_lua); // options lua_newtable(g_lua); // options
@ -336,8 +336,6 @@ bool my_lua_import_hwstub()
lua_setfield(g_lua, -2, "major"); lua_setfield(g_lua, -2, "major");
lua_pushinteger(g_lua, HWSTUB_VERSION_MINOR); lua_pushinteger(g_lua, HWSTUB_VERSION_MINOR);
lua_setfield(g_lua, -2, "minor"); lua_setfield(g_lua, -2, "minor");
lua_pushinteger(g_lua, HWSTUB_VERSION_REV);
lua_setfield(g_lua, -2, "revision");
lua_setfield(g_lua, -2, "version"); lua_setfield(g_lua, -2, "version");
lua_setfield(g_lua, -2, "host"); lua_setfield(g_lua, -2, "host");
@ -677,8 +675,8 @@ bool my_lua_import_soc(const std::vector< soc_t >& socs)
void usage(void) void usage(void)
{ {
printf("hwstub_tool, compiled with hwstub %d.%d.%d\n", printf("hwstub_tool, compiled with hwstub protocol %d.%d\n",
HWSTUB_VERSION_MAJOR, HWSTUB_VERSION_MINOR, HWSTUB_VERSION_REV); HWSTUB_VERSION_MAJOR, HWSTUB_VERSION_MINOR);
printf("\n"); printf("\n");
printf("usage: hwstub_tool [options] <soc desc files>\n"); printf("usage: hwstub_tool [options] <soc desc files>\n");
printf("options:\n"); printf("options:\n");
@ -797,7 +795,7 @@ int main(int argc, char **argv)
{ {
printf("Warning: this tool is possibly incompatible with your device:\n"); printf("Warning: this tool is possibly incompatible with your device:\n");
printf("Device version: %d.%d.%d\n", g_hwdev_ver.bMajor, g_hwdev_ver.bMinor, g_hwdev_ver.bRevision); printf("Device version: %d.%d.%d\n", g_hwdev_ver.bMajor, g_hwdev_ver.bMinor, g_hwdev_ver.bRevision);
printf("Host version: %d.%d.%d\n", HWSTUB_VERSION_MAJOR, HWSTUB_VERSION_MINOR, HWSTUB_VERSION_REV); printf("Host version: %d.%d\n", HWSTUB_VERSION_MAJOR, HWSTUB_VERSION_MINOR);
} }
// get memory layout information // get memory layout information

View file

@ -66,8 +66,8 @@ end
if not hwstub.options.quiet then if not hwstub.options.quiet then
print("information") print("information")
print(" hwstub") print(" hwstub")
print(" version: " .. string.format("%d.%d.%d", hwstub.host.version.major, print(" version: " .. string.format("%d.%d", hwstub.host.version.major,
hwstub.host.version.minor, hwstub.host.version.revision)) hwstub.host.version.minor))
print(" device") print(" device")
print(" version: " .. string.format("%d.%d.%d", hwstub.dev.version.major, print(" version: " .. string.format("%d.%d.%d", hwstub.dev.version.major,
hwstub.dev.version.minor, hwstub.dev.version.revision)) hwstub.dev.version.minor, hwstub.dev.version.revision))