diff options
author | Emanuel Sprung <emanuel.sprung@gmail.com> | 2019-11-11 13:58:18 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-11-11 21:29:56 +0100 |
commit | 3042c942d871b40a3d7dbb06079d29babefb780d (patch) | |
tree | f6b62ee74e60bd1547f20d64bee69d1cb64e0ed8 /Meta/BuildInstructions.md | |
parent | 2d19072115a2dde268435e2b300a7a93387db019 (diff) | |
download | serenity-3042c942d871b40a3d7dbb06079d29babefb780d.zip |
Toolchain: Add QEMU build script and improve documentation
Added a script to build QEMU from source as part of the Toolchain.
The script content could be in BuildIt.sh but has been put in
a seperate file to make the build optional.
Added PATH=$PATH to sudo calls to hand over the Toolchain's PATH
setup by UseIt.sh. This enabled the script's to use the QEMU
contained in the SerenityOS toolchain.
Deleted old documentation in Meta and replaced it by a new
documentation in the Toolchain folder.
Diffstat (limited to 'Meta/BuildInstructions.md')
-rw-r--r-- | Meta/BuildInstructions.md | 101 |
1 files changed, 0 insertions, 101 deletions
diff --git a/Meta/BuildInstructions.md b/Meta/BuildInstructions.md deleted file mode 100644 index b24d3cc33d..0000000000 --- a/Meta/BuildInstructions.md +++ /dev/null @@ -1,101 +0,0 @@ -# Building the Serenity operating system - -Let's start with a quick guide to building the i686-pc-serenity toolchain. - -I keep my toolchain in /opt/cross (so /opt/cross/bin needs to be in $PATH) and my Serenity sources are in $HOME/src/serenity - -You need to adjust these so they fit your system. - -## Dependencies: - -First off, GCC needs MPFR, MPC and GMP. On Ubuntu, this is as simple as: - - sudo apt install libmpfr-dev libmpc-dev libgmp-dev - -For Serenity, we will need e2fsprogs and QEMU: - - sudo apt install e2fsprogs qemu-system-i386 - -Note: there is a problem with the PS/2 keyboard/mouse emulation in QEMU 2.11.1 as packaged in Ubuntu's LTS releases. If you have any strange behaviour with missing keyboard inputs or jittery mouse movement, try building QEMU from source. 2.12.1, 3.0.1, 3.1.0, and 4.0.0 are all confirmed as working when built from source. - -## Binutils: - -Download GNU binutils-2.32 and apply the patch serenity/Meta/binutils-2.32-serenity.patch - -Make a build directory next to the binutils source directory. - -In the build directory, run configure: - - ../binutils-2.32/configure \ - --prefix=/opt/cross \ - --target=i686-pc-serenity \ - --with-sysroot=$HOME/src/serenity/Root \ - --disable-nls - - -Then build and install: - - make - sudo make install - -## Serenity LibC and LibM headers: - -Before we can build GCC, we need to put the Serenity LibC headers where GCC can find them. So go into serenity/LibC/ and install them: - - ./install.sh - -Then do the same in serenity/LibM/: - - ./install.sh - -Don't worry about any error messages from the above commands. We only care about copying the headers to the right place at this time. - -## GCC (part 1): - -Okay, then let's build GCC. - -Download GNU GCC-8.3.0 and apply the patch serenity/Meta/gcc-8.3.0-serenity.patch - -Make a build directory next to the GCC source directory. - -In the build directory, run configure: - - ../gcc-8.3.0/configure \ - --prefix=/opt/cross \ - --target=i686-pc-serenity \ - --with-sysroot=$HOME/src/serenity/Root \ - --with-newlib \ - --enable-languages=c,c++ - -Then build and install: - - make all-gcc all-target-libgcc - sudo make install-gcc install-target-libgcc - -## Serenity LibC for GCC: - -Now let's go into serenity/LibC/ and build the C library. This is required in order to complete the GCC build. - - make - ./install.sh - -The C library is now installed in serenity/Root/ and we can build GCC's libstdc++... - -## GCC (part 2): - -Go back to the GCC build directory and finish building libstdc++: - - make all-target-libstdc++-v3 - sudo make install-target-libstdc++-v3 - -## Serenity (Full build) - -If everything worked out, you now have the i686-pc-serenity toolchain ready and we can build Serenity. - -Go into serenity/Kernel and build it: - - ./makeall.sh - -Then take it for a spin: - - ./run |