diff options
author | Alex Auvolat <alex@adnab.me> | 2015-03-10 20:12:10 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2015-03-10 20:12:10 +0100 |
commit | 6d9cd139c42a48f5ddf8f8e284f56873de73fd31 (patch) | |
tree | 7b4ca008eb6375c0d5ba9eb1456674ee996fb5d6 /src/sysbin/giosrv | |
parent | 4ab8b6206b1ba36cbf4db4a416e04304bbd7ebc0 (diff) | |
download | kogata-6d9cd139c42a48f5ddf8f8e284f56873de73fd31.tar.gz kogata-6d9cd139c42a48f5ddf8f8e284f56873de73fd31.zip |
Things are happenning ; lots of bugs.
Diffstat (limited to 'src/sysbin/giosrv')
-rw-r--r-- | src/sysbin/giosrv/Makefile | 12 | ||||
-rw-r--r-- | src/sysbin/giosrv/main.c | 28 |
2 files changed, 40 insertions, 0 deletions
diff --git a/src/sysbin/giosrv/Makefile b/src/sysbin/giosrv/Makefile new file mode 100644 index 0000000..102bf4c --- /dev/null +++ b/src/sysbin/giosrv/Makefile @@ -0,0 +1,12 @@ + +OBJ = main.o + +LIB = ../../lib/libkogata/libkogata.lib ../../common/libc/libc.lib + +CFLAGS = -I ./include -I ../../common/include -I ../../lib/include + +LDFLAGS = -T ../linker.ld -Xlinker -Map=giosrv.map + +OUT = giosrv.bin + +include ../../rules.make diff --git a/src/sysbin/giosrv/main.c b/src/sysbin/giosrv/main.c new file mode 100644 index 0000000..ab30664 --- /dev/null +++ b/src/sysbin/giosrv/main.c @@ -0,0 +1,28 @@ +#include <string.h> + +#include <malloc.h> + +#include <syscall.h> +#include <debug.h> +#include <user_region.h> + +#include <proto/fb.h> + +int main(int argc, char **argv) { + dbg_print("[giosrv] Starting up.\n"); + + fd_t fbdev = open("io:/display/vesa", FM_READ | FM_WRITE | FM_MMAP); + if (fbdev == 0) PANIC("Could not open fbdev"); + + framebuffer_info_t i; + int r = ioctl(fbdev, IOCTL_FB_GET_INFO, &i); + dbg_printf("[giosrv] ioctl -> %d\n", r); + ASSERT(r == 1); + dbg_printf("[giosrv] Running on FB %dx%d\n", i.width, i.height); + + while(true); // nothing to do + + return 0; +} + +/* vim: set ts=4 sw=4 tw=0 noet :*/ |