Git Product home page Git Product logo

llama's Introduction

llama Readme

##Codebase Structure

  • cross system root located at sysroot
  • libc
    • Each standard function is a file with the same name as the function inside a directory with the name of the header.
      • eg. strlen from string.h is in libc/string/strlen.c
    • The standard headers use a BSD-like scheme where sys/cdefs.h declares a bunch of useful preprocessor macros meant for internal use by the standard library.
      • eg. all the function prototypes are wrapped in extern "C" { and } such that C++ code can correctly link against libc (as libc doesn't use C++ linkage). Note also how the compiler provides the internal keyword __restrict unconditionally (even in C89) mode, which is useful for adding the restrict keyword to function prototypes even when compiling code in pre-C99 mode.
    • The special __is_llama_libc macro lets the source code detect whether it is part of the libc.

Full list of headers

(output of find . -name *.h)

libc/include/string.h
libc/include/stdio.h
libc/include/stdlib.h
libc/include/sys/cdefs.h
kernel/include/kernel/vga.h
kernel/include/kernel/tty.h

Runtime Order

  • The kernel implements the correct way of invoking global constructors (useful for C++ code and C code using __attribute__((constructor))). The kernel initialization is done in three steps:
    1. First the kernel_early() function is called which sets up the essential kernel features (such as the kernel log).
    2. The bootstrap assembly then proceeds to call _init (which invokes all the global constructors)
    3. kernel_main()

Notes

  • packages necessary
    • grub-pc
    • cross-compiler targeting i686-elf
    • qemu

Todo

  • proper keyboard driver, with a getc and gets
    • BKernDev's driver +
    • why is my keyboard routine printing characters?: putch() is in there. let's remove it and see what happens. Hey, it stopped!
    • what can I implement that can store inputted scancodes in a circular basis? sounds like an array and some counting logic.
    • how can i make the os stop and wait for a string? sounds like a while loop waiting for someone to hit enter.

llama's People

Contributors

ollghra avatar

Watchers

 avatar

llama's Issues

GDT

GDT needed

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.