BuildSystem: Add instructions + fixes to build system
You can now easily build with clean ubuntu install
This commit is contained in:
parent
7c6565880d
commit
9fafafb17e
|
@ -12,9 +12,14 @@ Each major component and library has its own subdirectory (kernel, userspace, li
|
|||
|
||||
## Building
|
||||
|
||||
There does not exist a complete list of needed packages for building. From the top of my head I can say that *cmake*, *ninja*, *make*, *grub*, *rsync* and emulator (*qemu* or *bochs*) are needed.
|
||||
### Needed packages
|
||||
|
||||
You need cmake version of atleast 2.26. If you are using cmake that is not found from PATH, you can set the CMAKE\_COMMAND environment variable to point to the correct cmake binary.
|
||||
#### apt (tested on ubuntu 22.04)
|
||||
```# apt install build-essential git ninja-build texinfo bison flex libgmp-dev libmpfr-dev libmpc-dev parted qemu-system-x86```
|
||||
|
||||
> ***NOTE:*** You need cmake version of atleast 2.26. If you are using cmake that is not found from PATH, you can set the CMAKE\_COMMAND environment variable to point to the correct cmake binary. Or you can let build script download correct version of cmake if you don't have one.
|
||||
|
||||
When you clone this reposity, make sure to also clone submodules. This can be done by cloning with the command ```git clone --recurse-submodules https://git.bananymous.com/bananymous/banan-os.git``` or if you have already cloned this repo, run ```git submodule init && git submodule update```.
|
||||
|
||||
To build the toolchain for this os. You can run the following command.
|
||||
> ***NOTE:*** The following step has to be done only once. This might take a long time since we are compiling binutils and gcc.
|
||||
|
|
|
@ -87,7 +87,7 @@ sudo partprobe $LOOP_DEV
|
|||
PARTITION1=${LOOP_DEV}p1
|
||||
PARTITION2=${LOOP_DEV}p2
|
||||
|
||||
sudo mkfs.ext2 -q $PARTITION2
|
||||
sudo mkfs.ext2 -q -b 1024 $PARTITION2
|
||||
|
||||
sudo mkdir -p $MOUNT_DIR || { echo "Failed to create banan mount dir."; exit 1; }
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
|
|
Loading…
Reference in New Issue