Support i386

This commit is contained in:
Alex
2023-03-29 03:03:42 +03:00
parent ca3a6f11e7
commit d0ba001bf2
11 changed files with 74 additions and 100 deletions

View File

@ -37,10 +37,10 @@ clone_all:
mkdir -p cross
mkdir -p qemu
mkdir -p build-binutilsamd64
mkdir -p build-binutilsi686
mkdir -p build-binutilsi386
mkdir -p build-binutilsarm64
mkdir -p build-gccamd64
mkdir -p build-gcci686
mkdir -p build-gcci386
mkdir -p build-gccarm64
mkdir -p build-toolchain-binutils64
mkdir -p build-toolchain-gcc64
@ -52,10 +52,10 @@ __clone_all_no_qemu:
git clone https://github.com/Fennix-Project/gcc.git gcc
mkdir -p cross
mkdir -p build-binutilsamd64
mkdir -p build-binutilsi686
mkdir -p build-binutilsi386
mkdir -p build-binutilsarm64
mkdir -p build-gccamd64
mkdir -p build-gcci686
mkdir -p build-gcci386
mkdir -p build-gccarm64
mkdir -p build-toolchain-binutils64
mkdir -p build-toolchain-gcc64
@ -73,8 +73,8 @@ do_binutils64:
make all -j$(shell nproc) && make install
do_binutils32:
cd build-binutilsi686 && \
../binutils-gdb/configure --target=i686-elf --prefix="$(CROSS_DIR)" --with-sysroot --disable-werror && \
cd build-binutilsi386 && \
../binutils-gdb/configure --target=i386-elf --prefix="$(CROSS_DIR)" --with-sysroot --disable-werror && \
make all -j$(shell nproc) && make install
do_binutilsarm64:
@ -88,8 +88,8 @@ do_gcc64:
make all-gcc -j$(shell nproc) && make install-gcc -j$(shell nproc)
do_gcc32:
cd build-gcci686 && \
../gcc/configure --target=i686-elf --prefix="$(CROSS_DIR)" --enable-languages=c,c++ --without-headers && \
cd build-gcci386 && \
../gcc/configure --target=i386-elf --prefix="$(CROSS_DIR)" --enable-languages=c,c++ --without-headers && \
make all-gcc -j$(shell nproc) && make install-gcc -j$(shell nproc)
do_gccarm64:
@ -117,12 +117,12 @@ do_toolchain_gcc64:
do_toolchain_binutils32:
cd build-toolchain-binutils32 && \
../binutils-gdb/configure --target=i686-fennix --prefix="$(CROSS_DIR)/toolchain" --with-sysroot --enable-shared --disable-werror && \
../binutils-gdb/configure --target=i386-fennix --prefix="$(CROSS_DIR)/toolchain" --with-sysroot --enable-shared --disable-werror && \
make all -j$(shell nproc) && make install
do_toolchain_gcc32:
cd build-toolchain-gcc32 && \
../gcc/configure --target=i686-fennix --prefix="$(CROSS_DIR)/toolchain" --enable-languages=c,c++ --enable-shared --without-headers && \
../gcc/configure --target=i386-fennix --prefix="$(CROSS_DIR)/toolchain" --enable-languages=c,c++ --enable-shared --without-headers && \
make all-gcc -j$(shell nproc) && \
make all-target-libgcc -j$(shell nproc) && \
make install-gcc -j$(shell nproc) && \

View File

@ -12,11 +12,9 @@
<div style="position: relative; top: 40%; transform: translateY(-40%);">
<h1 class="on-background-text move-to-middle gradienttext glowtext">Fennix</h1>
<h4 class="on-background-text move-to-middle glowtext">Operating System from scratch made in C and C++</h4>
<button class="button round-border-med hdrbtn" style="backdrop-filter: blur(10px); cursor: pointer;"
onclick="window.location.href='https://github.com/Fennix-Project/Fennix/releases'">Download Stable
<button class="button round-border-med hdrbtn" style="backdrop-filter: blur(10px); cursor: pointer;" onclick="window.location.href='https://github.com/Fennix-Project/Fennix/releases'">Download Stable
Version</button>
<button class="button round-border-med hdrbtn" style="backdrop-filter: blur(10px); cursor: pointer;"
onclick="window.location.href='https://github.com/Fennix-Project/Fennix/actions/workflows/makefile.yml'">Download
<button class="button round-border-med hdrbtn" style="backdrop-filter: blur(10px); cursor: pointer;" onclick="window.location.href='https://github.com/Fennix-Project/Fennix/actions/workflows/makefile.yml'">Download
Unstable Version</button>
</div>
</div>
@ -34,14 +32,10 @@
</div>
<div class="header" style="padding-bottom: 250px; padding-left: 0px; backdrop-filter: blur(40px);">
<div style="padding-top: 25px;">
<img alt="GitHub Workflow Status"
src="https://img.shields.io/github/workflow/status/Fennix-Project/Fennix/Build%20OS?style=for-the-badge"
onclick="window.location.href='https://github.com/Fennix-Project/Fennix/actions/workflows/makefile.yml'">
<img alt="GitHub Workflow Status" src="https://img.shields.io/github/workflow/status/Fennix-Project/Fennix/Build%20OS?style=for-the-badge" onclick="window.location.href='https://github.com/Fennix-Project/Fennix/actions/workflows/makefile.yml'">
<img alt="GitHub" src="https://img.shields.io/github/license/Fennix-Project/Fennix?style=for-the-badge">
<img alt="GitHub repo size"
src="https://img.shields.io/github/repo-size/Fennix-Project/Fennix?style=for-the-badge">
<img alt="GitHub Repo stars"
src="https://img.shields.io/github/stars/Fennix-Project/Fennix?label=Repo%20Stars&style=for-the-badge">
<img alt="GitHub repo size" src="https://img.shields.io/github/repo-size/Fennix-Project/Fennix?style=for-the-badge">
<img alt="GitHub Repo stars" src="https://img.shields.io/github/stars/Fennix-Project/Fennix?label=Repo%20Stars&style=for-the-badge">
</div>
<div>
<h1 class="gradienttext" style="font-size: 50px;">About</h1>
@ -49,20 +43,14 @@
<tbody>
<tr>
<th>
<iframe src="https://discord.com/widget?id=887406812612157451&theme=dark" width="350"
height="500" allowtransparency="true" frameborder="0"
sandbox="allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts"></iframe>
<iframe src="https://discord.com/widget?id=887406812612157451&theme=dark" width="350" height="500" allowtransparency="true" frameborder="0" sandbox="allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts"></iframe>
</th>
</tr>
</tbody>
</table>
<div style="padding-top: 100px; font-size: 35px;">
Hello!<br>
This is my Operating System from scratch, my goal is to make a fully functional Operating System with a
GUI and a lot of features.<br>
I'm working on this project alone, but I'm open to any kind of help, if you want to help me, you can
contribute to the project on GitHub.<br>
I have a Discord server too &#8594<br>
Hello!<br> This is my Operating System from scratch, my goal is to make a fully functional Operating System with a GUI and a lot of features.<br> I'm working on this project alone, but I'm open to any kind of help, if you want to help
me, you can contribute to the project on GitHub.<br> I have a Discord server too &#8594<br>
</div>
</div>
@ -71,21 +59,14 @@
<h1 class="gradienttext" style="padding-top: 100px; font-size: 50px;">Compiling Instructions</h1>
<div style="text-align: left; margin-left: 10px; margin-right: 10px;">
<h4>Requirements</h4>
First of all, you need to install the required packages to build the cross-compiler, bootloader, OS,
etc.<br>
First of all, you need to install the required packages to build the cross-compiler, bootloader, OS, etc.
<br>
<hr color="#292929">
<b>&#x2022; Ubuntu 22.04</b><br>
For cross-compiler:<br>
<code
class="panel">sudo apt install build-essential bison flex libgmp3-dev libmpc-dev libmpfr-dev texinfo libzstd-dev libisl-dev autoconf m4 automake gettext gperf dejagnu guile-3.0 guile-3.0-dev expect tcl autogen tex-common sphinx-common git ssh diffutils patch
<i class="fa-solid fa-clipboard" style="cursor: pointer;" title="Copy to clipboard" onclick="CopyToClipboard('sudo apt install build-essential bison flex libgmp3-dev libmpc-dev libmpfr-dev texinfo libzstd-dev libisl-dev autoconf m4 automake gettext gperf dejagnu guile-3.0 guile-3.0-dev expect tcl autogen tex-common sphinx-common git ssh diffutils patch');return false;"></i></code><br>
For bootloader:<br>
<code
class="panel">sudo apt-get install make gcc-mingw-w64-x86-64 gcc-mingw-w64-i686 mingw-w64
<i class="fa-solid fa-clipboard" style="cursor: pointer;" title="Copy to clipboard" onclick="CopyToClipboard('sudo apt-get install make gcc-mingw-w64-x86-64 gcc-mingw-w64-i686 mingw-w64');return false;"></i></code><br>
For QEMU you'll have to follow this page <a href="https://wiki.qemu.org/Hosts/Linux"
target="_blank">here</a><br>
For OS:<br>
<b>&#x2022; Ubuntu 22.04</b><br> For cross-compiler:<br>
<code class="panel">sudo apt install build-essential bison flex libgmp3-dev libmpc-dev libmpfr-dev texinfo libzstd-dev libisl-dev autoconf m4 automake gettext gperf dejagnu guile-3.0 guile-3.0-dev expect tcl autogen tex-common sphinx-common git ssh diffutils patch
<i class="fa-solid fa-clipboard" style="cursor: pointer;" title="Copy to clipboard" onclick="CopyToClipboard('sudo apt install build-essential bison flex libgmp3-dev libmpc-dev libmpfr-dev texinfo libzstd-dev libisl-dev autoconf m4 automake gettext gperf dejagnu guile-3.0 guile-3.0-dev expect tcl autogen tex-common sphinx-common git ssh diffutils patch');return false;"></i></code><br> For bootloader:<br>
<code class="panel">sudo apt-get install make gcc-mingw-w64-x86-64 gcc-mingw-w64-i686 mingw-w64
<i class="fa-solid fa-clipboard" style="cursor: pointer;" title="Copy to clipboard" onclick="CopyToClipboard('sudo apt-get install make gcc-mingw-w64-x86-64 gcc-mingw-w64-i686 mingw-w64');return false;"></i></code><br> For QEMU you'll have to follow this page <a href="https://wiki.qemu.org/Hosts/Linux" target="_blank">here</a><br> For OS:<br>
<code class="panel">sudo apt-get install xorriso mtools genisoimage ovmf nasm doxygen
<i class="fa-solid fa-clipboard" style="cursor: pointer;" title="Copy to clipboard" onclick="CopyToClipboard('sudo apt-get install xorriso mtools genisoimage ovmf nasm doxygen');return false;"></i>
</code><br>
@ -94,10 +75,8 @@
<div style="text-align: left; margin-left: 10px; margin-right: 10px;">
<h4 style="padding-top: 50px;">Building The Cross-Compiler</h4>
The cross-compiler is used to compile the OS, the bootloader and the kernel.<br>
<hr color="#292929">
All you have to do is to write this command in the terminal:<br>
<code class="panel">make tools</code><br>
You'll have to wait a while, but when it's done, you can jump to the next step.<br>
<hr color="#292929"> All you have to do is to write this command in the terminal:<br>
<code class="panel">make tools</code><br> You'll have to wait a while, but when it's done, you can jump to the next step.<br>
</div>
<div style="text-align: left; margin-left: 10px; margin-right: 10px;">
@ -105,39 +84,27 @@
If you want to build different architecture, use other QEMU binary or change kernel name you can find in
<code class="panel">Makefile.conf</code> file.<br>
<hr color="#292929">
<code class="panel">DEBUG</code> &#x2022; If it's set to <code class="panel">1</code>, the kernel will
be compiled in debug mode.<br>
<code class="panel">DEBUG</code> &#x2022; If it's set to <code class="panel">1</code>, the kernel will be compiled in debug mode.<br>
<code class="panel">TESTING</code> &#x2022; Enable unit testing.<br>
<code class="panel">OSNAME</code> &#x2022; The name of the kernel. This can be anything.<br>
<code class="panel">OSARCH</code> &#x2022; The architecture of the kernel. Supported values are: <code
class="panel">amd64</code> <code class="panel">i686</code> <code class="panel">aarch64</code>.<br>
<code class="panel">OSARCH</code> &#x2022; The architecture of the kernel. Supported values are: <code class="panel">amd64</code> <code class="panel">i386</code> <code class="panel">aarch64</code>.<br>
<code class="panel">KERNEL_VERSION</code> &#x2022; The version of the kernel. This can be anything.<br>
<code class="panel">BOOTLOADER</code> &#x2022; The bootloader to be used. If set to <code
class="panel">other</code>, the bootloader will be <a
href="https://github.com/limine-bootloader/limine" target="_blank">Limine</a> for 64-bit,
or with <a href="https://www.gnu.org/software/grub/" target="_blank">GRUB</a> if 32-bit. <code
class="panel">lynx</code> it's still under development.<br>
<code class="panel">COMPILER_PATH</code> &#x2022; The path of the cross compiler. If you want to use
your own cross compiler, change it to the path of the compiler.<br>
<code class="panel">BOOTLOADER</code> &#x2022; The bootloader to be used. If set to <code class="panel">other</code>, the bootloader will be <a href="https://github.com/limine-bootloader/limine" target="_blank">Limine</a> for 64-bit, or
with <a href="https://www.gnu.org/software/grub/" target="_blank">GRUB</a> if 32-bit. <code class="panel">lynx</code> it's still under development.<br>
<code class="panel">COMPILER_PATH</code> &#x2022; The path of the cross compiler. If you want to use your own cross compiler, change it to the path of the compiler.<br>
<code class="panel">LIMINE_FOLDER</code> &#x2022; The path of the Limine bootloader.<br>
<code class="panel">QEMU_PATH</code> &#x2022; Qemu path. If you want to use the one you have installed
in your system, change it to /usr/bin/qemu-system- (do not include x86_64 or i386, it will be added
automatically)<br>
That's all you can change in this file.<br>
<code class="panel">QEMU_PATH</code> &#x2022; Qemu path. If you want to use the one you have installed in your system, change it to /usr/bin/qemu-system- (do not include x86_64 or i386, it will be added automatically)
<br> That's all you can change in this file.<br>
</div>
<div style="text-align: left; margin-left: 10px; margin-right: 10px;">
<h4 style="padding-top: 50px;">Building The Operating System</h4>
The fun part!<br>
<hr color="#292929">
Now that you have the cross-compiler, you can build the OS.<br>
There are a few commands that you can use to compile the OS:<br>
<hr color="#292929"> Now that you have the cross-compiler, you can build the OS.<br> There are a few commands that you can use to compile the OS:<br>
<code class="panel">make build</code> &#x2022; Builds the entire OS and creates an ISO image.<br>
<code class="panel">make run</code> &#x2022; Same as <code class="panel">make build</code> but starts
the QEMU too.<br>
<code class="panel">make run</code> &#x2022; Same as <code class="panel">make build</code> but starts the QEMU too.<br>
<code class="panel">make clean</code> &#x2022; Clean all files (object files, ISO, etc...).<br>
<code class="panel">make doxygen</code> &#x2022; Generate the documentation in directory <code
class="panel">doxygen-doc</code>.<br>
<code class="panel">make doxygen</code> &#x2022; Generate the documentation in directory <code class="panel">doxygen-doc</code>.<br>
</div>
</div>
@ -145,12 +112,8 @@
<h1 style="font-size: 50px;" class="gradienttext">Running With Other Virtual Machines</h1>
<hr color="#292929">
<div style="text-align: left; margin-left: 10px; margin-right: 10px;">
&#x2022; On VirtualBox and VMware, you can use the ISO image to run the OS.<br>
&#x2022; HDD/SSD are not required.<br>
&#x2022; The minimum RAM required is 4G. You can run with lower memory, but sometimes can cause issues
(I don't know why).<br>
&#x2022; UEFI required. BIOS sometimes doesn't work properly.<br>
&#x2022; Serial Port (COM1) is recommended.<br>
&#x2022; On VirtualBox and VMware, you can use the ISO image to run the OS.<br> &#x2022; HDD/SSD are not required.<br> &#x2022; The minimum RAM required is 4G. You can run with lower memory, but sometimes can cause issues (I don't know
why).<br> &#x2022; UEFI required. BIOS sometimes doesn't work properly.<br> &#x2022; Serial Port (COM1) is recommended.<br>
</div>
</div>
@ -158,8 +121,7 @@
<h1 style="font-size: 50px;" class="gradienttext">Reporting Issues</h1>
<hr color="#292929">
<div style="text-align: left; margin-left: 10px; margin-right: 10px;">
You can report bugs or crash issues to <a
href="https://github.com/Fennix-Project/Fennix/issues/new?assignees=&labels=bug&template=bug_report.md&title=">Issues
You can report bugs or crash issues to <a href="https://github.com/Fennix-Project/Fennix/issues/new?assignees=&labels=bug&template=bug_report.md&title=">Issues
tab</a>.<br>
</div>
</div>