From afb43302af289e0e17e0198f8bcefe10fe2f31ec Mon Sep 17 00:00:00 2001 From: ag-tsotetsi Date: Fri, 20 Feb 2026 14:27:20 +0200 Subject: [PATCH] added utilities and create symlink for lib64 to usr/lib --- build.sh | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/build.sh b/build.sh index 69dccaa..8721472 100755 --- a/build.sh +++ b/build.sh @@ -92,14 +92,22 @@ TAR_URL=https://mirror.ufs.ac.za/gnu/tar/tar-$TAR_VERSION.tar.xz XZ_VERSION=5.8.2 XZ_URL=https://github.com//tukaani-project/xz/releases/download/v$XZ_VERSION/xz-$XZ_VERSION.tar.xz -if [ ! -d "$SYSROOT" ]; then - mkdir -p "$SYSROOT"/{etc,cross,sources,usr,dev,proc,sys,run} - mkdir -p "$SYSROOT"/usr/{bin,sbin,lib,include} +create_sysroot() { + if [ ! -d "$SYSROOT" ]; then + mkdir -p "$SYSROOT"/{etc,cross,sources,usr,dev,proc,sys,run} + mkdir -p "$SYSROOT"/usr/{bin,sbin,lib,include} - for directory in bin sbin lib; do - ln -fs "usr/$directory" "$SYSROOT/$directory" - done -fi + for directory in bin sbin lib; do + ln -fs "usr/$directory" "$SYSROOT/$directory" + done + + ln -s usr/lib "$SYSROOT"/lib64 + fi +} + +change_owner() { + sudo chown -R root:root "$SYSROOT"/{etc,cross,usr,dev,proc,sys,run,var} +} fetch() { wget -N -c --show-progress -q -P "$SOURCES" $1 @@ -605,4 +613,5 @@ toolchain_gcc() { #toolchain_tar #toolchain_xz #toolchain_binutils -toolchain_gcc \ No newline at end of file +#toolchain_gcc +change_owner \ No newline at end of file