Code Monkey home page Code Monkey logo

gw-kernel's Introduction

GNU/Weeb kernel
============

This is not yet a mother of any operating system. Under development.

The target arch is i686.

Assuming you're working from x86-64 environment, you will need a cross
compiler to work with, below are the setup instructions.

[Setup Instructions]
------------------------------------------------
# Install dependencies.
sudo apt-get install build-essential bison flex libgmp3-dev git \
libmpc-dev libmpfr-dev texinfo libisl-dev make nasm \
qemu-system-x86 -y;

# Clone the repository.
git clone https://github.com/GNUWeeb/gw-kernel;

# Create build dir and change working dir to it.
mkdir -pv gw-kernel/build;
cd gw-kernel/build;

# Download binutils.
wget https://ftp.gnu.org/gnu/binutils/binutils-2.37.tar.xz;

# Download GCC.
wget http://ftp.tsukuba.wide.ad.jp/software/gcc/releases/gcc-11.2.0/gcc-11.2.0.tar.xz;

# Extract downloaded files.
tar -xf binutils-2.37.tar.xz;
tar -xf gcc-11.2.0.tar.xz;

# Set several env vars.
# Make sure you are working in 'build' directory when using $PWD.
export PREFIX="$PWD/opt/cross";
export TARGET=i686-elf;
export PATH="$PREFIX/bin:$PATH";

# Build binutils.
mkdir -pv build-binutils;
cd build-binutils;
../binutils-2.37/configure --target=$TARGET --prefix="$PREFIX" \
  --with-sysroot --disable-nls --disable-werror;
make -j$(nproc) && \
make -j$(nproc) install;

# Back to 'build' directory.
cd ..;

# Build GCC.
mkdir -pv build-gcc;
cd build-gcc;
../gcc-11.2.0/configure --target=$TARGET --prefix="$PREFIX" --disable-nls --enable-languages=c,c++ --without-headers;
make -j4 all-gcc && \
make -j4 all-target-libgcc && \
make -j4 install-gcc && \
make -j4 install-target-libgcc;

# Back to root project directory.
cd ../..;

# Build the kernel.
make;

# Boot the kernel under QEMU.
make boot;
------------------------------------------------

Maintainer:
  - Ammar Faizi <[email protected]>

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.