/* Check if the compiler thinks you are targeting the wrong operating system. */ #if defined(__linux__) #error "You are not using a cross-compiler" #endif /* This tutorial will only work for the 32-bit ix86 targets. */ #if !defined(__i386__) #error "This tutorial needs to be compiled with a ix86-elf compiler" #endif #include #include #include "vga.h" extern "C" void dump_multiboot(uint32_t mb_magic, uint32_t mb_addr); extern "C" void kernel_main(uint32_t mb_magic, uint32_t mb_addr) { VGA terminal; Console::set(&terminal); printk("Hello, kernel World!\n"); dump_multiboot(mb_magic, mb_addr); abort(); }