diff --git a/README.md b/README.md index bc4081e1..51a5013c 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/script/image-create.sh b/script/image-create.sh index e1f945f9..95bb245d 100755 --- a/script/image-create.sh +++ b/script/image-create.sh @@ -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; } diff --git a/script/install-bootloader.sh b/script/install-bootloader.sh index a3c7cde3..bfc82cf9 100755 --- a/script/install-bootloader.sh +++ b/script/install-bootloader.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash set -e