diff --git a/Makefile b/Makefile index 8906d54..c982107 100644 --- a/Makefile +++ b/Makefile @@ -29,7 +29,8 @@ upload: $(TARGET_BIN) @$(WIIDEV)/bin/bootmii -a $< git_version.h: - echo 'const char git_version[] = "'`./describesimple.sh`'";' > git_version.h + @echo " GITVER $@" + @echo 'const char git_version[] = "'`./describesimple.sh`'";' > git_version.h clean: myclean diff --git a/ipc.c b/ipc.c index 573af11..b0edc04 100644 --- a/ipc.c +++ b/ipc.c @@ -13,6 +13,7 @@ Copyright (C) 2009 John Kelley */ #include +#include "string.h" #include "types.h" #include "irq.h" #include "memory.h" @@ -36,6 +37,7 @@ static volatile ipc_request out_queue[IPC_OUT_SIZE] ALIGNED(32) MEM2_BSS; static volatile ipc_request slow_queue[IPC_SLOW_SIZE]; extern char __mem2_area_start[]; +extern const char git_version[]; // These defines are for the ARMCTRL regs // See http://wiibrew.org/wiki/Hardware/IPC @@ -142,6 +144,11 @@ static u32 process_slow(volatile ipc_request *req) case IPC_SYS_GETVERS: ipc_post(req->code, req->tag, 1, MINI_VERSION_MAJOR << 16 | MINI_VERSION_MINOR); break; + case IPC_SYS_GETGITS: + strlcpy((char *)req->args[0], git_version, 32); + dc_flushrange((void *)req->args[0], 32); + ipc_post(req->code, req->tag, 0); + break; default: gecko_printf("IPC: unknown SLOW SYS request %04x\n", req->req); } diff --git a/ipc.h b/ipc.h index 1505160..bb3ca77 100644 --- a/ipc.h +++ b/ipc.h @@ -49,6 +49,7 @@ Copyright (C) 2009 John Kelley #define IPC_SYS_PING 0x0000 #define IPC_SYS_JUMP 0x0001 #define IPC_SYS_GETVERS 0x0002 +#define IPC_SYS_GETGITS 0x0003 #define IPC_SYS_WRITE32 0x0100 #define IPC_SYS_WRITE16 0x0101 #define IPC_SYS_WRITE8 0x0102