more progress

This commit is contained in:
kevadesu 2024-11-02 23:10:12 +01:00
parent f452ab3573
commit 0229c8a48a
2 changed files with 34 additions and 5 deletions

View file

@ -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() {
}

View file

@ -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