diff options
| author | Riley Beckett <rbeckettvt@gmail.com> | 2026-09-27 13:41:34 -0400 |
|---|---|---|
| committer | Riley Beckett <rbeckettvt@gmail.com> | 2026-09-27 13:41:34 -0400 |
| commit | 92cc1136b99a3b079122e2edf5fc8da9a66babd6 (patch) | |
| tree | dcdbf4c23d2e31e6f64270a56a0bccbad34203bc | |
| parent | 0b567585484fa90d4f6968d29b0f406c2176be6e (diff) | |
bootstrap
| -rw-r--r-- | bootstrap.sh | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/bootstrap.sh b/bootstrap.sh new file mode 100644 index 0000000..28264e5 --- /dev/null +++ b/bootstrap.sh @@ -0,0 +1,65 @@ +#!/bin/sh + +bootstrapdir=$(mktemp -d -p $PWD bootstrap-XXXXXXXX) + +mkdir -p $bootstrapdir/tarballs +mkdir -p $bootstrapdir/tools +mkdir -p $boostrapdir/sources + +bootstrap_target=x86_64-rasde-linux-musl +cores=$(nproc) + +cd $bootstrapdir/tarballs +curl -LO https://sourceware.org/pub/binutils/releases/binutils-2.47.tar.zst +curl -LO https://ftp.gnu.org/gnu/gcc/gcc-16.2.0/gcc-16.2.0.tar.xz +curl -LO https://cdn.kernel.org/pub/linux/kernel/v7.x/linux-7.2.2.tar.xz +curl -LO https://musl.libc.org/releases/musl-1.2.6.tar.gz +curl -LO https://ftp.gnu.org/pub/gnu/m4/m4-1.4.21.tar.xz +curl -LO https://ftp.gnu.org/pub/gnu/ncurses/ncurses-6.6.tar.gz +curl -LO https://ftp.gnu.org/gnu/bash/bash-5.3.tar.gz +curl -LO https://ftp.gnu.org/gnu/coreutils/coreutils-9.11.tar.xz +curl -LO https://ftp.gnu.org/pub/gnu/diffutils/diffutils-3.12.tar.xz +curl -LO http://ftp.astron.com/pub/file/file-5.48.tar.gz +curl -LO https://ftp.gnu.org/pub/gnu/findutils/findutils-4.11.0.tar.xz +curl -LO https://ftp.gnu.org/pub/gnu/gawk/gawk-5.4.1.tar.xz +curl -LO https://ftp.gnu.org/pub/gnu/grep/grep-3.12.tar.xz +curl -LO https://ftp.gnu.org/gnu/gzip/gzip-1.14.tar.xz +curl -LO https://ftp.gnu.org/pub/gnu/make/make-4.4.1.tar.lz +curl -LO https://ftp.gnu.org/pub/gnu/patch/patch-2.8.tar.xz +curl -LO https://ftp.gnu.org/pub/gnu/sed/sed-4.10.tar.xz +curl -LO https://ftp.gnu.org/gnu/tar/tar-1.35.tar.xz +curl -LO https://tukaani.org/xz/xz-5.8.3.tar.gz + +tar xf $bootstrapdir/tarballs/binutils-2.47.tar.zst -C $bootstrapdir/sources +tar xf $bootstrapdir/tarballs/gcc-16.2.0.tar.xz -C $bootstrapdir/sources +tar xf $bootstrapdir/tarballs/linux-7.2.2.tar.xz -C $bootstrapdir/sources +tar xf $bootstrapdir/tarballs/musl-1.2.6.tar.gz -C $bootstrapdir/sources +tar xf $bootstrapdir/tarballs/m4-1.4.21.tar.xz -C $bootstrapdir/sources +tar xf $bootstrapdir/tarballs/ncurses-6.6.tar.gz -C $bootstrapdir/sources +tar xf $bootstrapdir/tarballs/bash-5.3.tar.gz -C $bootstrapdir/sources +tar xf $bootstrapdir/tarballs/coreutils-9.11.tar.xz -C $bootstrapdir/sources +tar xf $bootstrapdir/tarballs/diffutils-3.12.tar.xz -C $bootstrapdir/sources +tar xf $bootstrapdir/tarballs/file-5.48.tar.gz -C $bootstrapdir/sources +tar xf $bootstrapdir/tarballs/findutils-4.11.0.tar.xz -C $bootstrapdir/sources +tar xf $bootstrapdir/tarballs/gawk-5.4.1.tar.xz -C $bootstrapdir/sources +tar xf $bootstrapdir/tarballs/grep-3.12.tar.xz -C $bootstrapdir/sources +tar xf $bootstrapdir/tarballs/gzip-1.14.tar.xz -C $bootstrapdir/sources +tar xf $bootstrapdir/tarballs/make-4.4.1.tar.lz -C $bootstrapdir/sources +tar xf $bootstrapdir/tarballs/patch-2.8.tar.xz -C $bootstrapdir/sources +tar xf $bootstrapdir/tarballs/sed-4.10.tar.xz -C $bootstrapdir/sources +tar xf $bootstrapdir/tarballs/tar-1.35.tar.xz -C $bootstrapdir/sources +tar xf $bootstrapdir/tarballs/xz-5.8.3.tar.gz -C $bootstrapdir/sources + +cd $bootstrapdir/sources/binutils* +mkdir build +cd build +../configure --prefix=$bootstrapdir/tools \ + --with-sysroot=$bootstrapdir \ + --target=$bootstrap_target \ + --disable-nls \ + --enable-gprofng=no \ + --disable-werror \ + --enable-new-dtags \ + --enable-default-hash-style=gnu +make -j$cores +make install $cores |
