Compare commits
2 Commits
8b5e437936
...
af80bad87a
Author | SHA1 | Date |
---|---|---|
Bananymous | af80bad87a | |
Bananymous | 87272f0cd7 |
|
@ -14,6 +14,8 @@ Each major component and library has its own subdirectory (kernel, userspace, li
|
||||||
|
|
||||||
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.
|
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.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
To build the toolchain for this os. You can run the following command.
|
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.
|
> ***NOTE:*** The following step has to be done only once. This might take a long time since we are compiling binutils and gcc.
|
||||||
```sh
|
```sh
|
||||||
|
|
|
@ -14,7 +14,7 @@ make_build_dir () {
|
||||||
mkdir -p $BANAN_BUILD_DIR
|
mkdir -p $BANAN_BUILD_DIR
|
||||||
cd $BANAN_BUILD_DIR
|
cd $BANAN_BUILD_DIR
|
||||||
if ! [[ -f "build.ninja" ]]; then
|
if ! [[ -f "build.ninja" ]]; then
|
||||||
cmake --toolchain=$BANAN_TOOLCHAIN_DIR/Toolchain.txt -G Ninja $BANAN_ROOT_DIR
|
$CMAKE_COMMAND --toolchain=$BANAN_TOOLCHAIN_DIR/Toolchain.txt -G Ninja $BANAN_ROOT_DIR
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -66,6 +66,10 @@ if [[ $# -eq 0 ]]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ -z $CMAKE_COMMAND ]]; then
|
||||||
|
export CMAKE_COMMAND=cmake
|
||||||
|
fi
|
||||||
|
|
||||||
case $1 in
|
case $1 in
|
||||||
toolchain)
|
toolchain)
|
||||||
build_toolchain
|
build_toolchain
|
||||||
|
|
|
@ -153,6 +153,7 @@ build_libstdcpp () {
|
||||||
}
|
}
|
||||||
|
|
||||||
# delete everything but toolchain
|
# delete everything but toolchain
|
||||||
|
mkdir -p $BANAN_BUILD_DIR
|
||||||
find $BANAN_BUILD_DIR -mindepth 1 -maxdepth 1 ! -name toolchain -exec rm -r {} +
|
find $BANAN_BUILD_DIR -mindepth 1 -maxdepth 1 ! -name toolchain -exec rm -r {} +
|
||||||
|
|
||||||
# NOTE: we have to manually create initial sysroot with libc headers
|
# NOTE: we have to manually create initial sysroot with libc headers
|
||||||
|
|
Loading…
Reference in New Issue