diff --git a/Einrichter-CLI.sh b/Einrichter-CLI.sh index 87642ef..fbb579e 100644 --- a/Einrichter-CLI.sh +++ b/Einrichter-CLI.sh @@ -154,6 +154,11 @@ function einrichter.installer.SafeUser() { chmod -v +x /home/lfs/Einrichter-as-LFS.sh echo -e "${BBlue}[i] ${Blue}Moving the host's bash.bashrc file aside if found... (THIS WILL BE RESTORED AFTER THE END OF THE INSTALLATION!)${Color_Off}" [ ! -e /etc/bash.bashrc ] || mv -v /etc/bash.bashrc /etc/bash.bashrc.NOUSE + echo -e "${BBlue}[i] ${Blue}Assigning permissions to the user lfs for the drive ${LFS}...${Color_Off}" + chown -v lfs $LFS/{usr{,/*},lib,var,etc,bin,sbin,tools} + case $(uname -m) in + x86_64) chown -v lfs $LFS/lib64 ;; + esac echo -e "${BBlue}[i] ${Blue}Attempting login as lfs...${Color_Off}" echo -e "${BBlue}[i] ${Blue}You are about to switch to the LFS user. When you log in, run the Einrichter-as-LFS.sh script located in your home directory by typing \"./Einrichter-as-LFS.sh\".${Color_Off}" su - lfs @@ -168,6 +173,7 @@ chown --from lfs -R root:root $LFS/{usr,lib,var,etc,bin,sbin,tools} x86_64) chown --from lfs -R root:root $LFS/lib64 ;; esac } + function einrichter.installer.bg() { } diff --git a/Einrichter-as-LFS.sh b/Einrichter-as-LFS.sh index 40c86d9..109ca70 100644 --- a/Einrichter-as-LFS.sh +++ b/Einrichter-as-LFS.sh @@ -23,18 +23,41 @@ PATH=/usr/bin if [ ! -L /bin ]; then PATH=/bin:$PATH; fi PATH=$LFS/tools/bin:$PATH CONFIG_SITE=$LFS/usr/share/config.site -export LFS LC_ALL LFS_TGT PATH CONFIG_SITE -export MAKEFLAGS=-j$(nproc) -export SYS_TRIPLET=/usr/bin/gcc -dumpmachine +MAKEFLAGS=-j$(nproc) +export LFS LC_ALL LFS_TGT PATH CONFIG_SITE MAKEFLAGS EOF source ~/.bash_profile } -eal.setup.toolchain() { +function eal.setup.toolchain() { echo -e "I: The detected system triplet is $(/usr/bin/gcc -dumpmachine)." - export SYS_TRIPLET=$(/usr/bin/gcc -dumpmachine) + export LFS_TGT=$(/usr/bin/gcc -dumpmachine) echo } +function eal.install.cross-binutils() { + cd $LFS/sources/ + echo -e "I: -- The installer is now extracting binutils --" + sleep 0.5 + tar -xvf $LFS/sources/binutils-2.43.1.tar.xz + cd $LFS/sources/binutils-2.43.1/ + mkdir -v build + cd build + echo -e "I: -- The installer is now configuring build options --" + sleep 0.5 + ../configure --prefix=$LFS/tools \ + --with-sysroot=$LFS \ + --target=$LFS_TGT \ + --disable-nls \ + --enable-gprofng=no \ + --disable-werror \ + --enable-new-dtags \ + --enable-default-hash-style=gnu + echo -e "I: -- The installer is now compiling the package --" + make + echo -e "I: -- The installer is now installing the package --" + make install + +} main \ No newline at end of file