more progress

This commit is contained in:
kevadesu 2024-11-04 21:11:53 +01:00
parent 612df959e2
commit 17e2d01d5e

View file

@ -34,6 +34,7 @@ function eal.notification.buildconf() {echo "I: -- The installer is now configur
function eal.notification.compiling() {echo "I: -- The installer is now compiling the package $EIR_PKG --" && sleep 0.2} function eal.notification.compiling() {echo "I: -- The installer is now compiling the package $EIR_PKG --" && sleep 0.2}
function eal.notification.installing() {echo "I: -- The installer is now installing the package $EIR_PKG --" && sleep 0.2} function eal.notification.installing() {echo "I: -- The installer is now installing the package $EIR_PKG --" && sleep 0.2}
function eal.notification.extracting() {echo "I: -- The installer is now extracting the necessary archives for $EIR_PKG --" && sleep 0.2} function eal.notification.extracting() {echo "I: -- The installer is now extracting the necessary archives for $EIR_PKG --" && sleep 0.2}
function eal.emergencyAlert() {echo -e "\a" && sleep 0.1 && echo -e "\07" && sleep 0.1 && tput bel}
function eal.setup.toolchain() { function eal.setup.toolchain() {
echo -e "I: The detected system triplet is $(/usr/bin/gcc -dumpmachine)." echo -e "I: The detected system triplet is $(/usr/bin/gcc -dumpmachine)."
@ -108,5 +109,67 @@ function eal.install.cross-toolchain() {
make make
eal.notification.installing eal.notification.installing
make install make install
popd
EIR_PKG=linux
eal.notification.extracting
tar -xvf linux-6.10.5.tar.xz
mv -v linux-6.10.5 linux
pushd $LFS/sources/linux/
make mrproper
make headers
find usr/include -type f ! -name '*.h' -delete
cp -rv usr/include $LFS/usr
popd
EIR_PKG=glibc
eal.notification.extracting
tar -xvf glibc-2.40.tar.xz
mv -v glibc-2.40 glibc
echo -e "I: -- The installer is creating a symbolic link for LSB compliance. Depending on architecture, it may also create a compatibility symbolic link for proper operation of the dynamic library loader. --"
case $(uname -m) in
i?86) ln -sfv ld-linux.so.2 $LFS/lib/ld-lsb.so.3
;;
x86_64) ln -sfv ../lib/ld-linux-x86-64.so.2 $LFS/lib64
ln -sfv ../lib/ld-linux-x86-64.so.2 $LFS/lib64/ld-lsb-x86-64.so.3
;;
esac
pushd $LFS/sources/glibc/
echo -e "I: -- The installer is now patching glibc. --"
mkdir -v build
cd build
echo "rootsbindir=/usr/sbin" > configparms
eal.notification.buildconf
../configure \
--prefix=/usr \
--host=$LFS_TGT \
--build=$(../scripts/config.guess) \
--enable-kernel=4.19 \
--with-headers=$LFS/usr/include \
--disable-nscd \
libc_cv_slibdir=/usr/lib
eal.notification.compiling
make
eal.emergencyAlert
echo -e "\033[0;31mW: -- Before installing the package, make sure that the variable LFS is CORRECTLY SET to have the value of the target LFS system. If it doesn't, and you're running this script as root, despite the recommendations, this will install the newly built glibc to the HOST SYSTEM, rendering it almost certainly unusable. Please make sure that this variable is correctly set: --"
echo -e "\$LFS: ${LFS}"
echo -e "If this is incorrect, exit the installer immediately by pressing CTRL + C, wipe the target LFS partition and restart the entire installation process. If the variable is correct, press Enter"
read
eal.notification.installing
make DESTDIR=$LFS install
sed '/RTLDLIST=/s@/usr@@g' -i $LFS/usr/bin/ldd
echo "I: -- The next output you'll receive needs to start with \"[Requesting program interpreter:\". If the output is not similar to this, or not shown at all, something is wrong. Please confirm that there is an output by pressing enter. If the output is wrong, type \"R\" without the quotation marks to drop into the shell. --"
echo 'int main(){}' | $LFS_TGT-gcc -xc -
readelf -l a.out | grep ld-linux
read -p "->" TEMP_OUTPUT
case "$TEMP_OUTPUT" in
R)
echo "Fix issues by checking the LFS 12.2-systemd book. Once you fixed everything, clean up the test file by running \"rm -v a.out\"."
sh
;;
*)
echo "OK"
;;
esac
} }
main main