diff --git a/binutils.sh b/Outside Chroot/binutils-pass-1.sh similarity index 100% rename from binutils.sh rename to Outside Chroot/binutils-pass-1.sh diff --git a/gcc.sh b/Outside Chroot/gcc-pass-1.sh similarity index 96% rename from gcc.sh rename to Outside Chroot/gcc-pass-1.sh index 7c2d44c..2d8744b 100755 --- a/gcc.sh +++ b/Outside Chroot/gcc-pass-1.sh @@ -26,7 +26,7 @@ cd build ../configure \ --target=$2 \ --prefix=$1/tools \ - --with-glibc-version=2.11 \ + --with-glibc-version=2.34 \ --with-sysroot=$1 \ --with-newlib \ --without-headers \ diff --git a/glibc.sh b/Outside Chroot/glibc.sh similarity index 100% rename from glibc.sh rename to Outside Chroot/glibc.sh diff --git a/libstdcxx.sh b/Outside Chroot/libstdcxx-pass-1.sh similarity index 100% rename from libstdcxx.sh rename to Outside Chroot/libstdcxx-pass-1.sh diff --git a/linux-headers.sh b/Outside Chroot/linux-headers.sh similarity index 100% rename from linux-headers.sh rename to Outside Chroot/linux-headers.sh diff --git a/README.md b/README.md index ef0c560..57c610f 100644 --- a/README.md +++ b/README.md @@ -2,23 +2,12 @@ The toolchain that is used to build yiffOS. You'll need a working clang + gcc setup on the host system to run these scripts. - -You'll also need the sources for: -* binutils 2.36.1 -* gcc 11.2.0 -* linux 5.13.13 -* glibc 2.34 with [this patch](https://www.linuxfromscratch.org/patches/downloads/glibc/glibc-2.34-fhs-1.patch) -* openssl 1.1.1l -* cmake 3.21.1 -* llvm 12.0.1 -* clang 12.0.1 -* compiler-rt 12.0.1 -* libcxx 12.0.1 -* libcxxabi 12.0.1 - + To allow the scripts to find the sources, please ensure the extracted sources are in a folder with only it's name as the folder name. (Example: gcc 11.2.0 would be in /sources/gcc) -A destination folder will need to be created to allow the toolchain to properly link. +A destination folder will need to be created to allow the toolchain to properly link. + +After the script completes, you'll be able to chroot into a yiffOS environment to compile software. Script Usage: `./create-toolchain.sh "destination folder" "source folder" "makeflags"` diff --git a/create-toolchain.sh b/create-toolchain.sh index 23ed774..d8f0cd2 100755 --- a/create-toolchain.sh +++ b/create-toolchain.sh @@ -9,8 +9,13 @@ echo "Mount: $1" echo "Target: $target" echo "Source: $2" echo "Makeflags: $3" -./binutils.sh $1 $target $2/binutils $3 -./gcc.sh $1 $target $2/gcc $3 + +# Do stuff outside of chroot first +cd "Outside Chroot" + +# Inital temporary tools +./binutils-pass-1.sh $1 $target $2/binutils $3 +./gcc-pass-1.sh $1 $target $2/gcc $3 ./linux-headers.sh $1 $target $2/linux $3 ./glibc.sh $1 $target $2/glibc $3 -./libstdcxx.sh $1 $target $2/gcc $3 \ No newline at end of file +./libstdcxx-pass-1.sh $1 $target $2/gcc $3 \ No newline at end of file