Git Product home page Git Product logo

brutal-org / brutal Goto Github PK

View Code? Open in Web Editor NEW
1.0K 1.0K 44.0 13.96 MB

๐Ÿข An operating system inspired by brutalist design that combines the ideals of UNIX from the 1970s with modern technology and engineering

Home Page: https://brutal.smnx.sh/

License: MIT License

Makefile 0.90% C 96.18% Assembly 0.50% Shell 0.32% Python 0.12% CSS 1.98%
c hobby-os kernel microkernel modern-c operating-system osdev

brutal's People

Contributors

bumbelbee777 avatar circutrider21 avatar d0p1s4m4 avatar daemononunix avatar feliwir avatar jjuliano avatar kvuj avatar nekrofr avatar quentindeve avatar rdmsr avatar sleepy-monax avatar smdevji avatar spocino avatar supercip971 avatar tetrahedron341 avatar timgates42 avatar tix3dev 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

brutal's Issues

clang-15: `stdnoreturn.h` is deprecated in C2x

Can't build brutal using clang-15 since <stdnoreturn.h> issue a warning (due to deprecation) and brutal enable -Werror.

/usr/lib/llvm-15/lib/clang/15.0.0/include/stdnoreturn.h:24:2: error: "the '<stdnoreturn.h>' header is deprecated in C2x; either use the '_Noreturn' keyword or the '[[noreturn]]' attribute" [-Werror,-W#warnings]
#warning "the '<stdnoreturn.h>' header is deprecated in C2x; either use the '_Noreturn' keyword or the '[[noreturn]]' attribute"
 ^

build-all (gnu): not working anymore after nullptr removal

In file included from bin/generated/headers/brutal-base:4:
sources/libs/brutal-base/any.h:65:28: error: use of undeclared identifier 'nullptr'
        return any.ptr_ != nullptr;
                           ^
In file included from sources/utils/test/main.c:1:
In file included from bin/generated/headers/brutal-test:3:
In file included from sources/libs/brutal-test/hook-gfx.h:5:
sources/libs/brutal-test/hook-alloc.h:30:9: error: use of undeclared identifier 'nullptr'
        nullptr,
        ^
In file included from sources/utils/test/main.c:1:
In file included from bin/generated/headers/brutal-test:3:
sources/libs/brutal-test/hook-gfx.h:34:9: error: use of undeclared identifier 'nullptr'
        nullptr,
        ^
sources/libs/brutal-test/hook-gfx.h:71:9: error: use of undeclared identifier 'nullptr'
        nullptr,
        ^
4 errors generated.
make: *** [sources/build/host/build.mk:32: bin/devel/x86_64-host-llvm/utils/test/main.c.o] Error 1

The only successful compile of all tests was before removing nullptr and setting LLVM_VERSION=-13

llvm-13: nullptr removal breaks test build

In file included from bin/generated/headers/brutal-base:4:
sources/libs/brutal-base/any.h:65:28: error: use of undeclared identifier 'nullptr'
        return any.ptr_ != nullptr;
                           ^
In file included from sources/utils/test/main.c:1:
In file included from bin/generated/headers/brutal-test:3:
In file included from sources/libs/brutal-test/hook-gfx.h:5:
sources/libs/brutal-test/hook-alloc.h:30:9: error: use of undeclared identifier 'nullptr'
        nullptr,
        ^
In file included from sources/utils/test/main.c:1:
In file included from bin/generated/headers/brutal-test:3:
sources/libs/brutal-test/hook-gfx.h:34:9: error: use of undeclared identifier 'nullptr'
        nullptr,
        ^
sources/libs/brutal-test/hook-gfx.h:71:9: error: use of undeclared identifier 'nullptr'
        nullptr,
        ^
4 errors generated.
make: *** [sources/build/host/build.mk:32: bin/devel/x86_64-host-llvm/utils/test/main.c.o] Error 1

Building on macOS

When I try to build it on macOS, it works fine for the most part. However, it always now ends in this:

make: *** No rule to make target `/opt/homebrew/Cellar/llvm/13.0.0_1/lib/clang/13.0.0/share/asan_ignorelist.txt', needed by `bin/arm64-llvm/host/embed/posix/err.c.o'.  Stop.

How do I fix this, or get around this?

How to run

brutal.sh doesnt work and where is the iso?

bad percentage makefile

> make run-cc -j11 CONFIG_TOOLCHAIN=llvm
expr: division by zero
   0% host   CC sources/bins/cc/cc.c
expr: division by zero
   0% host   LD build/x86_64-llvm/host/cc

Unused parameter 'magic' while building on MacOS

I have followed the given build instructions (building.md) but have been running into the same problem while trying to build on MacOS (ARM).

sources/kernel/x86_64/boot.c:25:51: error: unused parameter 'magic' [-Werror,-Wunused-parameter]
void arch_entry_main(Handover *handover, uint64_t magic)
                                                  ^
1 error generated.
make: *** [bin/devel/x86_64-kernel-llvm/kernel/x86_64/boot.c.o] Error 1

The needed packages are already installed:

โžœ  brutal git:(main) brew install qemu nasm xorriso llvm binutils wget pkg-config sdl2
Warning: qemu 7.1.0 is already installed and up-to-date.
To reinstall 7.1.0, run:
  brew reinstall qemu
Warning: nasm 2.15.05 is already installed and up-to-date.
To reinstall 2.15.05, run:
  brew reinstall nasm
Warning: xorriso 1.5.4 is already installed and up-to-date.
To reinstall 1.5.4, run:
  brew reinstall xorriso
Warning: llvm 15.0.3 is already installed and up-to-date.
To reinstall 15.0.3, run:
  brew reinstall llvm
Warning: binutils 2.39_1 is already installed and up-to-date.
To reinstall 2.39_1, run:
  brew reinstall binutils
Warning: wget 1.21.3 is already installed and up-to-date.
To reinstall 1.21.3, run:
  brew reinstall wget
Warning: pkg-config 0.29.2_3 is already installed and up-to-date.
To reinstall 0.29.2_3, run:
  brew reinstall pkg-config
Warning: sdl2 2.24.1 is already installed and up-to-date.
To reinstall 2.24.1, run:
  brew reinstall sdl2

The needed environment variables have also been set.

Problem when building brutal

It returns me this error:
In file included from sources/kernel/x86_64/boot.c:21:
sources/kernel/x86_64/stivale2.h:4:10: fatal error: 'stivale/stivale2.h' file not found
#include <stivale/stivale2.h>
^~~~~~~~~~~~~~~~~~~~
1 error generated.
make: *** [sources/kernel/.build.mk:37: build/x86_64-llvm/cross/kernel/x86_64/boot.c.o] Error 1

math.h file not found

During the building process math.h can not be found.

In file included from sources/apps/about/main.c:2:
In file included from bin/generated/headers/brutal-ui:3:
In file included from sources/libs/brutal-ui/text.h:3:
In file included from sources/libs/brutal-ui/view.h:3:
In file included from sources/libs/brutal-ui/color.h:3:
In file included from bin/generated/headers/brutal-gfx:3:
In file included from sources/libs/brutal-gfx/path.h:3:
In file included from bin/generated/headers/brutal-math:3:
sources/libs/brutal-math/vec2.h:3:10: fatal error: 'math.h' file not found
#include <math.h>
         ^~~~~~~~
1 error generated.
make: *** [bin/devel/arm64-host-llvm/apps/about/main.c.o] Error 1

Feature suggestion: Add source code comments

Currently, the majority of the .C source code is undocumented.

Consider that it's often easier to expose oneself to the concepts of a new application when the source can be scanned quickly, and the high-level concepts ingested as fast as possible; if going deeper is needed, the actual code is just a few lines away.

llvm-16: typedef redefinition of nullptr_t

clang-16 -c -o bin/devel/x86_64-host-llvm/apps/about/main.c.o sources/apps/about/main.c -Og -MD -std=gnu2x -Wall -Wextra -Werror -Wshadow -Wvla -Isources/libs/ -Isources/libs/hw -Isources/apps -Isources/srvs -Isources/utils -Isources/ -Ibin/generated -Ibin/generated/headers -Wnewline-eof -Wignored-attributes -Wunknown-attributes `pkg-config sdl2 --cflags`
In file included from sources/apps/about/main.c:2:
In file included from bin/generated/headers/brutal-ui:12:
In file included from sources/libs/brutal-ui/win.h:4:
In file included from sources/libs/embed/win-decl.h:6:
In file included from sources/libs/embed/sdl/win.h:3:
In file included from /usr/include/SDL2/SDL.h:32:
In file included from /usr/include/SDL2/SDL_main.h:25:
In file included from /usr/include/SDL2/SDL_stdinc.h:34:
In file included from /usr/include/sys/types.h:144:
/usr/lib/llvm/16/bin/../../../../lib/clang/16/include/stddef.h:103:25: error: typedef redefinition with different types ('typeof (((NullPtr)0))' (aka 'void *') vs 'typeof (nullptr)' (aka 'nullptr_t'))
typedef typeof(nullptr) nullptr_t;
                        ^
/usr/lib/llvm/16/bin/../../../../lib/clang/16/include/stdatomic.h:27:10: note: '/usr/lib/llvm/16/bin/../../../../lib/clang/16/include/stddef.h' included multiple times, additional include site here
#include <stddef.h>
         ^
/usr/include/sys/types.h:144:10: note: '/usr/lib/llvm/16/bin/../../../../lib/clang/16/include/stddef.h' included multiple times, additional include site here
#include <stddef.h>
         ^
/usr/lib/llvm/16/bin/../../../../lib/clang/16/include/stddef.h:103:25: note: unguarded header; consider using #ifdef guards or #pragma once
typedef typeof(nullptr) nullptr_t;

Loading...

How long does Brutal take to load? It doesn't seem to load for me.

Error on unused variable

sources/libs/brutal/ds/range.c:117:17: error: unused variable 'range' [-Werror,-Wunused-variable]
vec_foreach(range, self)

Unable to build on macOS

I am using macOs and I followed the steps below. Please let me know if I am missing anything.

  • Cloned the repo
  • followed the steps written in ./meta/building.md
  • got the following error
make: ld.lld: No such file or directory
make: *** [bin/devel/x86_64-kernel-llvm/kernel.elf] Error 1

my system -
Mac M2, OS - MacOS Venture13

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.