Giter Club home page Giter Club logo

barebones's People

Contributors

fwsgonzo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

barebones's Issues

Undefined-sanitizer support

I have added support for ubsan now, however there is a problem with using clang, as its referencing some C++ typeid structures. I tried adding -fno-sanitize=vptr, but it had no effect on linking.

compile error in serial1.c on MacOS

hello,

Get this error when trying to build_iso.sh on MacOS

-- Configuring done
-- Generating done
-- Build files have been written to: /Users/thierry/Dev/barebones/machines/default/build
Scanning dependencies of target exceptions
Scanning dependencies of target tinyprintf
[ 7%] Building C object ext/CMakeFiles/tinyprintf.dir/tinyprintf/tinyprintf.c.o
[ 7%] Creating directories for 'exceptions'
[ 11%] Performing download step (download, verify and extract) for 'exceptions'
-- Downloading...
dst='/Users/thierry/Dev/barebones/machines/default/build/exceptions/src/exceptions.zip'
timeout='none'
-- Using src='https://github.com/fwsGonzo/barebones/releases/download/exceptions/exceptions.zip'
[ 14%] Linking C static library libtinyprintf.a
[ 14%] Built target tinyprintf
Scanning dependencies of target kernel
[ 25%] Building C object src/CMakeFiles/kernel.dir/hw/serial1.c.o
[ 25%] Building C object src/CMakeFiles/kernel.dir/crt/c_abi.c.o
[ 25%] Building C object src/CMakeFiles/kernel.dir/kernel/kernel_start.c.o
/Users/thierry/Dev/barebones/src/hw/serial1.c:4:48: error: argument to 'section' attribute is not valid for this target: mach-o section specifier requires a segment and
section separated by a comma
static char initialized attribute((section(".data"))) = 0;
^
1 error generated.
make[2]: *** [src/CMakeFiles/kernel.dir/hw/serial1.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/Users/thierry/Dev/barebones/src/kernel/kernel_start.c:6:13: warning: unused function '__init_paging' [-Wunused-function]
static void __init_paging()
^
1 warning generated.

Minimal bootloader

A glaring flaw is the lack of a 512b minimal bootloader that ATA loads the kernel to its dest and then enters protected and jumps to _start. One reason to add one is the extra swag of having very very tiny kernels that still can do stuff.

Several problems:

  1. Theres not enough room to really inspect ELFs and validate stuff, GRUB will at least tell you if something is wrong even if its a big blob. So, either the bootloader just jumps to <some offset in the ELF that corresponds to the 64-bit program entry>, or we need to burn the _start location into the bootloader itself via a script.
  2. We no longer get memory maps from GRUB so we have to do without. CMOS chip will tell us about up to 64mb of memory, which is basically nothing today. It really is a problem.
  3. It will likely be brittle on real hardware - especially the ATA loader code. It also won't work on modern clouds like GCE which demands you boot using virtio-scsi.

In short, it may just not be worth it.

License?

I can't find any mention of the license in the repository, which one is it? Is it public domain or something more restrictive?

C++ ABI

There is a case for bundling libcxxabi with the project so that we can potentially enable RTTI and exceptions in C++. This will come at a cost in binary size, for the most part, but it will at the very least be a CMake option. Sadly, the archive may have to be compiled beforehand and bundled as a download.

The archive will likely bring in a few extra dependencies on C standard functions.

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.