Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NON-DOCKER BUILD ENVIROMENT #61

Open
Andrej123456789 opened this issue Dec 4, 2021 · 4 comments
Open

NON-DOCKER BUILD ENVIROMENT #61

Andrej123456789 opened this issue Dec 4, 2021 · 4 comments

Comments

@Andrej123456789
Copy link

Andrej123456789 commented Dec 4, 2021

This is a tutorial how to compile OS without installing Docker - works for native Linux and WSL

Direct link

Type all commands in terminal:

sudo apt update
sudo apt install build-essential
sudo apt install bison
sudo apt install flex
sudo apt install libgmp3-dev
sudo apt install libmpc-dev
sudo apt install libmpfr-dev
sudo apt install texinfo
sudo apt install xorriso
sudo apt install nasm
export PREFIX="/usr/local/x86_64elfgcc"
export TARGET=x86_64-elf
export PATH="$PREFIX/bin:$PATH"
mkdir /tmp/src
cd /tmp/src
curl -O http://ftp.gnu.org/gnu/binutils/binutils-2.35.1.tar.gz
tar xf binutils-2.35.1.tar.gz
mkdir binutils-build
cd binutils-build
../binutils-2.35.1/configure --target=$TARGET --enable-interwork --enable-multilib --disable-nls --disable-werror --prefix=$PREFIX 2>&1 | tee configure.log
sudo make all install 2>&1 | tee make.log
cd /tmp/src
curl -O https://ftp.gnu.org/gnu/gcc/gcc-10.2.0/gcc-10.2.0.tar.gz
tar xf gcc-10.2.0.tar.gz
mkdir gcc-build
cd gcc-build
../gcc-10.2.0/configure --target=$TARGET --prefix="$PREFIX" --disable-nls --disable-libssp --enable-languages=c++ --without-headers
sudo make all-gcc
sudo make all-target-libgcc
sudo make install-gcc
sudo make install-target-libgcc

Now you need add folder to variable.

Type sudo nano ~/.bashrc

Scroll to end of file and type: export PATH="$PATH:/usr/local/x86_64/elfgcc/bin" save it and restart system (if you are using native Linux) or WSL.

Check if it was successful with: x86_64-elf-gcc.

I hope it's works

@Andrej123456789
Copy link
Author

Sometimes work, can someone help why GRUB bootloader fail to load

@davidcallanan
Copy link
Owner

@Andrej123456789 Thank you for this post.

The link you gave says 404 not found. Is this a private repository?

@Andrej123456789
Copy link
Author

Andrej123456789 commented Dec 24, 2021

@davidcallanan It was wrong branch, this is working link.

When you compile OS outside Docker you can't run on real hardware, but in Qemu normally

@ElectroBoy404NotFound
Copy link

Sometimes work, can someone help why GRUB bootloader fail to load

On my local computer, the grub files just dont exist!! idk why

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants