Implemented git version printing in infobox

This commit is contained in:
John Kelley 2009-05-12 13:50:22 -07:00 committed by bushing
parent f09e899399
commit 8366174042
3 changed files with 10 additions and 1 deletions

View File

@ -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

7
ipc.c
View File

@ -13,6 +13,7 @@ Copyright (C) 2009 John Kelley <wiidev@kelley.ca>
*/
#include <stdarg.h>
#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);
}

1
ipc.h
View File

@ -49,6 +49,7 @@ Copyright (C) 2009 John Kelley <wiidev@kelley.ca>
#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