configure: when detecting linux include directory for kernel compiler use target...
[AROS.git] / test / boot / testboot.c
blobba4ea7f64113bcf63275efe50be84707b9d86d87
1 /*
2 Copyright © 1995-2016, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <aros/kernel.h>
7 #include <hardware/vbe.h>
8 #include <utility/tagitem.h>
10 #include <bootconsole.h>
11 #include <stdarg.h>
13 int __vcformat(void *data, int(*outc)(int, void *), const char * format, va_list args);
14 int kprintf(const char *format, ...);
16 void __startup start(struct TagItem *tags)
18 struct vbe_mode *vbemode = NULL;
20 fb_Mirror = (void *)0x100000;
22 con_InitTagList(tags);
24 kprintf("Test module successfully started\n");
26 kprintf("Taglist at 0x%p:\n", tags);
27 for (; tags->ti_Tag != TAG_DONE; tags++)
29 kprintf("0x%08lX 0x%p\n", tags->ti_Tag, tags->ti_Data);
31 switch (tags->ti_Tag)
33 case KRN_VBEModeInfo:
34 vbemode = (struct vbe_mode *)tags->ti_Data;
35 break;
39 if (vbemode)
41 kprintf("VBE mode structure at 0x%p\n", vbemode);
42 kprintf("Mode : %dx%dx%d\n", vbemode->x_resolution, vbemode->y_resolution, vbemode->bits_per_pixel);
43 kprintf("Base : 0x%08X\n", vbemode->phys_base);
44 kprintf("Pitch: %u\n", vbemode->bytes_per_scanline);
45 kprintf("Flags: 0x%08X\n", vbemode->mode_attributes);
48 for (;;);
51 static int kputc(int c, void *data)
53 con_Putc(c);
54 return 1;
57 int kprintf(const char *format, ...)
59 va_list ap;
60 int res;
62 va_start(ap, format);
63 res = __vcformat(NULL, kputc, format, ap);
64 va_end(ap);
66 return res;
69 #ifdef __arm__
72 * ARM bootconsole doesn't have own serial port code because
73 * no known ARM hardware uses PC-compatible serial ports.
75 void serial_Init(char *opts)
79 void serial_Putc(char chr)
83 #endif