#include "syscall.h" #include #include #define VGA_TEXT_W 80 #define VGA_TEXT_H 25 void term(); int ptys; int ptym; fb_info_t fb_info; void* framebuffer_address; int terminal_col = 0; int terminal_row = 0; void term_write_char(char c) { } int main(int argc, char *argv[]) { (void)argc; (void)argv; ptym = pty(&ptys); if (fork() == 0) { close(ptym); dup2(ptys, 0); dup2(0, 1); dup2(0, 2); exec("/bin/rocksh.elf"); } close(ptys); dup2(ptym, 0); dup2(0, 1); dup2(0, 2); int vga_fd = open("/dev/vga"); if (vga_fd == -1) return 1; int kbd_fd = open("/dev/kbd"); if (kbd_fd == -1) return 1; int res = ioctl(vga_fd, FBIOGET_INFO, &fb_info); if (!res) { return 1; } framebuffer_address = mmap(vga_fd); return 0; }