aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Harrington <kb0iic@berzerkula.org>2021-04-19 02:01:33 +0000
committerWilliam Harrington <kb0iic@berzerkula.org>2021-04-19 02:01:33 +0000
commitca7ec24a78f9bd8824da23be1c24a98a3c764f5f (patch)
treef8b56862b35c0765024a081f3814043d6b172453
parent13f2c64995621d3180b468c4d525eff1eb8c9993 (diff)
Make adjustments for Odroid N2+ aarch64 build.
-rw-r--r--chapter10/linux.sh1
-rw-r--r--chapter5/binutils.sh1
-rw-r--r--chapter5/gcc.sh11
-rw-r--r--chapter5/glibc.sh4
-rw-r--r--chapter5/libstdc++.sh1
-rw-r--r--chapter5/linux-api-headers.sh1
-rw-r--r--chapter6/bash.sh1
-rw-r--r--chapter6/binutils.sh1
-rw-r--r--chapter6/coreutils.sh5
-rw-r--r--chapter6/diffutils.sh1
-rw-r--r--chapter6/file.sh1
-rw-r--r--chapter6/findutils.sh1
-rw-r--r--chapter6/gawk.sh1
-rw-r--r--chapter6/gcc.sh12
-rw-r--r--chapter6/grep.sh1
-rw-r--r--chapter6/gzip.sh1
-rw-r--r--chapter6/m4.sh1
-rw-r--r--chapter6/make.sh1
-rw-r--r--chapter6/ncurses.sh1
-rw-r--r--chapter6/patch.sh1
-rw-r--r--chapter6/sed.sh1
-rw-r--r--chapter6/tar.sh1
-rw-r--r--chapter6/xz.sh1
-rw-r--r--chapter7/bison.sh1
-rw-r--r--chapter7/gettext.sh1
-rw-r--r--chapter7/libstdc++.sh1
-rw-r--r--chapter7/perl.sh1
-rw-r--r--chapter7/python.sh1
-rw-r--r--chapter7/texinfo.sh1
-rw-r--r--chapter7/util-linux.sh1
-rw-r--r--chapter8/acl.sh1
-rw-r--r--chapter8/attr.sh1
-rw-r--r--chapter8/autoconf.sh1
-rw-r--r--chapter8/automake.sh1
-rw-r--r--chapter8/bash.sh1
-rw-r--r--chapter8/bc.sh1
-rw-r--r--chapter8/binutils.sh4
-rw-r--r--chapter8/bison.sh1
-rw-r--r--chapter8/bzip2.sh1
-rw-r--r--chapter8/check.sh1
-rw-r--r--chapter8/coreutils.sh6
-rw-r--r--chapter8/dejagnu.sh1
-rw-r--r--chapter8/diffutils.sh1
-rw-r--r--chapter8/e2fsprogs.sh1
-rw-r--r--chapter8/eudev.sh1
-rw-r--r--chapter8/expat.sh1
-rw-r--r--chapter8/expect.sh5
-rw-r--r--chapter8/file.sh1
-rw-r--r--chapter8/findutils.sh1
-rw-r--r--chapter8/flex.sh1
-rw-r--r--chapter8/gawk.sh1
-rw-r--r--chapter8/gcc.sh21
-rw-r--r--chapter8/gdbm.sh1
-rw-r--r--chapter8/gettext.sh1
-rw-r--r--chapter8/glibc.sh1
-rw-r--r--chapter8/gmp.sh1
-rw-r--r--chapter8/gperf.sh1
-rw-r--r--chapter8/grep.sh1
-rw-r--r--chapter8/groff.sh1
-rw-r--r--chapter8/grub.sh1
-rw-r--r--chapter8/gzip.sh1
-rw-r--r--chapter8/iana-etc.sh1
-rw-r--r--chapter8/inetutils.sh1
-rw-r--r--chapter8/intltool.sh1
-rw-r--r--chapter8/iproute2.sh1
-rw-r--r--chapter8/isl.sh1
-rw-r--r--chapter8/kbd.sh1
-rw-r--r--chapter8/kmod.sh1
-rw-r--r--chapter8/less.sh1
-rw-r--r--chapter8/libcap.sh1
-rw-r--r--chapter8/libelf.sh1
-rw-r--r--chapter8/libffi.sh1
-rw-r--r--chapter8/libpipeline.sh1
-rw-r--r--chapter8/libtool.sh1
-rw-r--r--chapter8/m4.sh1
-rw-r--r--chapter8/make.sh1
-rw-r--r--chapter8/man-db.sh1
-rw-r--r--chapter8/man-pages.sh1
-rw-r--r--chapter8/meson.sh1
-rw-r--r--chapter8/mpc.sh1
-rw-r--r--chapter8/mpfr.sh1
-rw-r--r--chapter8/ncurses.sh1
-rw-r--r--chapter8/ninja.sh1
-rw-r--r--chapter8/openssl.sh1
-rw-r--r--chapter8/patch.sh1
-rw-r--r--chapter8/perl.sh1
-rw-r--r--chapter8/pkg-config.sh1
-rw-r--r--chapter8/procps-ng.sh1
-rw-r--r--chapter8/psmisc.sh1
-rw-r--r--chapter8/python.sh1
-rw-r--r--chapter8/readline.sh1
-rw-r--r--chapter8/sed.sh1
-rw-r--r--chapter8/shadow.sh1
-rw-r--r--chapter8/sysklogd.sh1
-rw-r--r--chapter8/sysvinit.sh1
-rw-r--r--chapter8/tar.sh1
-rw-r--r--chapter8/tcl.sh3
-rw-r--r--chapter8/texinfo.sh1
-rw-r--r--chapter8/util-linux.sh1
-rw-r--r--chapter8/vim.sh1
-rw-r--r--chapter8/xml-parser.sh1
-rw-r--r--chapter8/xz.sh1
-rw-r--r--chapter8/zlib.sh1
-rw-r--r--chapter8/zstd.sh1
-rw-r--r--chapter9/bashprofile.sh1
-rw-r--r--chapter9/bootscriptconf.sh1
-rw-r--r--chapter9/inputrc.sh1
-rw-r--r--chapter9/network.sh1
-rw-r--r--chapter9/shells.sh1
-rw-r--r--download.sh1
-rw-r--r--env.sh3
-rw-r--r--functions.sh1
-rw-r--r--insidechroot.sh1
-rwxr-xr-xlfs.sh11
-rw-r--r--mountvirtfs.sh1
-rw-r--r--packageinstall.sh1
-rw-r--r--preparechroot.sh3
-rw-r--r--setupdisk.sh1
-rw-r--r--umountvirtfs.sh1
-rwxr-xr-xversioncheck.sh2
120 files changed, 180 insertions, 17 deletions
diff --git a/chapter10/linux.sh b/chapter10/linux.sh
index 143c692..e613b64 100644
--- a/chapter10/linux.sh
+++ b/chapter10/linux.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
make mrproper &&
cp -v ../kernelconfig .config &&
diff --git a/chapter5/binutils.sh b/chapter5/binutils.sh
index 2d9da5b..5176d0c 100644
--- a/chapter5/binutils.sh
+++ b/chapter5/binutils.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
mkdir build
cd build || exit 1
diff --git a/chapter5/gcc.sh b/chapter5/gcc.sh
index 52079a4..62768be 100644
--- a/chapter5/gcc.sh
+++ b/chapter5/gcc.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
mkdir -p mpfr gmp mpc
tar -xf ../mpfr-*.tar.xz -C mpfr --strip-components=1
@@ -10,6 +11,10 @@ case $(uname -m) in
sed -e '/m64=/s/lib64/lib/' \
-i.orig gcc/config/i386/t-linux64
;;
+ aarch64)
+ sed -e '/mabi.lp64=/s/lib64/lib/' \
+ -i.orig gcc/config/aarch64/t-aarch64-linux
+ ;;
esac
mkdir -v build
@@ -34,7 +39,11 @@ cd build || exit 1
--disable-libssp \
--disable-libvtv \
--disable-libstdcxx \
- --enable-languages=c,c++ &&
+ --enable-languages=c,c++ \
+ "$([ "$(uname -m)" = aarch64 ] && echo --with-arch=armv8-a)" \
+ "$([ "$(uname -m)" = aarch64 ] && echo --with-cpu=cortex-a73.cortex-a53)" \
+ "$([ "$(uname -m)" = aarch64 ] && echo --enable-fix-cortex-a53-835769)" \
+ "$([ "$(uname -m)" = aarch64 ] && echo --enable-fix-cortex-a53-843419)" &&
make &&
make -j1 install &&
diff --git a/chapter5/glibc.sh b/chapter5/glibc.sh
index edab0d3..df39bc9 100644
--- a/chapter5/glibc.sh
+++ b/chapter5/glibc.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
case $(uname -m) in
i?86) ln -sfv ld-linux.so.2 "${LFS}"/lib/ld-lsb.so.3
@@ -6,6 +7,9 @@ case $(uname -m) in
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
;;
+ aarch64) ln -sfv ../lib/ld-linux-aarch64.so.1 "${LFS}"/lib64
+ ln -sfv ../lib/ld-linux-aarch64.so.1 "${LFS}"/lib64/ld-lsb-aarch64.so.3
+ ;;
esac
patch -Np1 -i ../glibc-"${VERSION}"-fhs-1.patch &&
diff --git a/chapter5/libstdc++.sh b/chapter5/libstdc++.sh
index d1be7dd..d8cb707 100644
--- a/chapter5/libstdc++.sh
+++ b/chapter5/libstdc++.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
mkdir -v build
cd build || exit 1
diff --git a/chapter5/linux-api-headers.sh b/chapter5/linux-api-headers.sh
index 3111625..41d7cfc 100644
--- a/chapter5/linux-api-headers.sh
+++ b/chapter5/linux-api-headers.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
make mrproper &&
make headers &&
diff --git a/chapter6/bash.sh b/chapter6/bash.sh
index c920026..9251a89 100644
--- a/chapter6/bash.sh
+++ b/chapter6/bash.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
patch -Np1 -i ../bash-"${VERSION}"-fixes-1.patch &&
./configure --prefix=/usr \
diff --git a/chapter6/binutils.sh b/chapter6/binutils.sh
index 9b97c4b..3e4af1d 100644
--- a/chapter6/binutils.sh
+++ b/chapter6/binutils.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
mkdir -v build
cd build || exit 1
diff --git a/chapter6/coreutils.sh b/chapter6/coreutils.sh
index 536fa52..86eaf5f 100644
--- a/chapter6/coreutils.sh
+++ b/chapter6/coreutils.sh
@@ -1,4 +1,9 @@
#!/bin/bash
+set -e
+
+if [[ "$(uname -m)" = aarch64 ]]; then
+ patch -Np1 -i ../coreutils-"${VERSION}"-aarch64_fixes-1.patch
+fi
./configure --prefix=/usr \
--host="${LFS_TGT}" \
diff --git a/chapter6/diffutils.sh b/chapter6/diffutils.sh
index f6c45af..580d795 100644
--- a/chapter6/diffutils.sh
+++ b/chapter6/diffutils.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
sed 's/help2man -i/help2man --no-discard-stderr -i /' -i man/Makefile.in
HELP2MAN="help2man --no-discard-stderr" ./configure --prefix=/usr \
diff --git a/chapter6/file.sh b/chapter6/file.sh
index bd51747..6d39e77 100644
--- a/chapter6/file.sh
+++ b/chapter6/file.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
mkdir build
pushd build > /dev/null || exit 1
diff --git a/chapter6/findutils.sh b/chapter6/findutils.sh
index 0526c41..5617c10 100644
--- a/chapter6/findutils.sh
+++ b/chapter6/findutils.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
# shellcheck disable=SC2016
./configure --prefix=/usr \
diff --git a/chapter6/gawk.sh b/chapter6/gawk.sh
index 29d7a8b..1d18cdc 100644
--- a/chapter6/gawk.sh
+++ b/chapter6/gawk.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
sed -i 's/extras//' Makefile.in &&
./configure --prefix=/usr \
diff --git a/chapter6/gcc.sh b/chapter6/gcc.sh
index d40a855..7c6be43 100644
--- a/chapter6/gcc.sh
+++ b/chapter6/gcc.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
mkdir -p isl mpfr gmp mpc
tar -xf ../isl-*.tar.xz -C isl --strip-components=1 &&
@@ -10,6 +11,10 @@ case $(uname -m) in
x86_64)
sed -e '/m64=/s/lib64/lib/' -i.orig gcc/config/i386/t-linux64
;;
+ aarch64)
+ sed -e '/mabi.lp64=/s/lib64/lib/' \
+ -i.orig gcc/config/aarch64/t-aarch64-linux
+ ;;
esac
mkdir -v build
@@ -33,7 +38,12 @@ ln -s ../../../libgcc/gthr-posix.h "${LFS_TGT}"/libgcc/gthr-default.h &&
--disable-libssp \
--disable-libvtv \
--disable-libstdcxx \
- --enable-languages=c,c++ &&
+ --enable-languages=c,c++ \
+ "$([ "$(uname -m)" = aarch64 ] && echo --with-arch=armv8-a)" \
+ "$([ "$(uname -m)" = aarch64 ] && echo --with-cpu=cortex-a73.cortex-a53)" \
+ "$([ "$(uname -m)" = aarch64 ] && echo --enable-fix-cortex-a53-835769)" \
+ "$([ "$(uname -m)" = aarch64 ] && echo --enable-fix-cortex-a53-843419)" &&
+
make &&
make DESTDIR="${LFS}" -j1 install &&
ln -sv gcc "${LFS}"/usr/bin/cc
diff --git a/chapter6/grep.sh b/chapter6/grep.sh
index 9aab0f4..7aaa38a 100644
--- a/chapter6/grep.sh
+++ b/chapter6/grep.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
./configure --prefix=/usr \
--host="${LFS_TGT}" \
diff --git a/chapter6/gzip.sh b/chapter6/gzip.sh
index f894df6..d8a45c7 100644
--- a/chapter6/gzip.sh
+++ b/chapter6/gzip.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
./configure --prefix=/usr \
--host="${LFS_TGT}" &&
diff --git a/chapter6/m4.sh b/chapter6/m4.sh
index 2f67ebe..aeb1024 100644
--- a/chapter6/m4.sh
+++ b/chapter6/m4.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
sed -i 's/IO_ftrylockfile/IO_EOF_SEEN/' lib/*.c &&
echo "#define _IO_IN_BACKUP 0x100" >> lib/stdio-impl.h &&
diff --git a/chapter6/make.sh b/chapter6/make.sh
index 4de06b6..0b2ace4 100644
--- a/chapter6/make.sh
+++ b/chapter6/make.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
./configure --prefix=/usr \
--without-guile \
diff --git a/chapter6/ncurses.sh b/chapter6/ncurses.sh
index 6320a9f..1bf8824 100644
--- a/chapter6/ncurses.sh
+++ b/chapter6/ncurses.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
sed -i s/mawk// configure &&
diff --git a/chapter6/patch.sh b/chapter6/patch.sh
index fa1dac9..42add5e 100644
--- a/chapter6/patch.sh
+++ b/chapter6/patch.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
./configure --prefix=/usr \
--host="${LFS_TGT}" \
diff --git a/chapter6/sed.sh b/chapter6/sed.sh
index 9aab0f4..7aaa38a 100644
--- a/chapter6/sed.sh
+++ b/chapter6/sed.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
./configure --prefix=/usr \
--host="${LFS_TGT}" \
diff --git a/chapter6/tar.sh b/chapter6/tar.sh
index 730d108..28aea9c 100644
--- a/chapter6/tar.sh
+++ b/chapter6/tar.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
./configure --prefix=/usr \
--host="${LFS_TGT}" \
diff --git a/chapter6/xz.sh b/chapter6/xz.sh
index 6766de1..a519ebd 100644
--- a/chapter6/xz.sh
+++ b/chapter6/xz.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
./configure --prefix=/usr \
--host="${LFS_TGT}" \
diff --git a/chapter7/bison.sh b/chapter7/bison.sh
index 2385d22..9de734e 100644
--- a/chapter7/bison.sh
+++ b/chapter7/bison.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
./configure --prefix=/usr --docdir=/usr/share/doc/bison-"${VERSION}" &&
make &&
diff --git a/chapter7/gettext.sh b/chapter7/gettext.sh
index 696cf25..0e1771d 100644
--- a/chapter7/gettext.sh
+++ b/chapter7/gettext.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
./configure --disable-shared &&
make &&
diff --git a/chapter7/libstdc++.sh b/chapter7/libstdc++.sh
index de3a6b4..1a0b5ee 100644
--- a/chapter7/libstdc++.sh
+++ b/chapter7/libstdc++.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
ln -s gthr-posix.h libgcc/gthr-default.h &&
mkdir build
diff --git a/chapter7/perl.sh b/chapter7/perl.sh
index 970e17c..627e3e5 100644
--- a/chapter7/perl.sh
+++ b/chapter7/perl.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
MAJMIN="$(cut -d\. -f1,2 <<< "${VERSION}")"
diff --git a/chapter7/python.sh b/chapter7/python.sh
index daf1677..428beaa 100644
--- a/chapter7/python.sh
+++ b/chapter7/python.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
./configure --prefix=/usr \
--enable-shared \
diff --git a/chapter7/texinfo.sh b/chapter7/texinfo.sh
index 1935156..b3bba9e 100644
--- a/chapter7/texinfo.sh
+++ b/chapter7/texinfo.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
./configure --prefix=/usr &&
make &&
diff --git a/chapter7/util-linux.sh b/chapter7/util-linux.sh
index 7a00c8c..e0241fa 100644
--- a/chapter7/util-linux.sh
+++ b/chapter7/util-linux.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
mkdir -p /var/lib/hwclock &&
./configure ADJTIME_PATH=/var/lib/hwclock/adjtime \
diff --git a/chapter8/acl.sh b/chapter8/acl.sh
index 57b6dd8..516d861 100644
--- a/chapter8/acl.sh
+++ b/chapter8/acl.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
./configure --prefix=/usr \
--bindir=/bin \
diff --git a/chapter8/attr.sh b/chapter8/attr.sh
index 22e7b79..fc68246 100644
--- a/chapter8/attr.sh
+++ b/chapter8/attr.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
./configure --prefix=/usr \
--bindir=/bin \
diff --git a/chapter8/autoconf.sh b/chapter8/autoconf.sh
index 1f6d045..cb58e2e 100644
--- a/chapter8/autoconf.sh
+++ b/chapter8/autoconf.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
./configure --prefix=/usr &&
diff --git a/chapter8/automake.sh b/chapter8/automake.sh
index 73615bf..f30ffa6 100644
--- a/chapter8/automake.sh
+++ b/chapter8/automake.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
sed -i "s/''/etags/" t/tags-lisp-space.sh &&
diff --git a/chapter8/bash.sh b/chapter8/bash.sh
index 81d91c1..23546ee 100644
--- a/chapter8/bash.sh
+++ b/chapter8/bash.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
# shellcheck disable=SC2016
diff --git a/chapter8/bc.sh b/chapter8/bc.sh
index 8d2b2f7..c055edd 100644
--- a/chapter8/bc.sh
+++ b/chapter8/bc.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
CC=gcc ./configure.sh --prefix=/usr -G -O3 &&
diff --git a/chapter8/binutils.sh b/chapter8/binutils.sh
index e3fe6c5..43bf03b 100644
--- a/chapter8/binutils.sh
+++ b/chapter8/binutils.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
expect -c "spawn ls"
@@ -16,7 +17,8 @@ cd build || exit 1
--enable-64-bit-bfd \
--with-system-zlib &&
-make tooldir=/usr &&
+make tooldir=/usr \
+ "$([ "$(uname -m)" = aarch64 ] && echo -j5)" &&
make tooldir=/usr -j1 install &&
diff --git a/chapter8/bison.sh b/chapter8/bison.sh
index ab72461..75283ac 100644
--- a/chapter8/bison.sh
+++ b/chapter8/bison.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
./configure --prefix=/usr --docdir=/usr/share/doc/bison-"${VERSION}" &&
diff --git a/chapter8/bzip2.sh b/chapter8/bzip2.sh
index 1b35096..c6b832a 100644
--- a/chapter8/bzip2.sh
+++ b/chapter8/bzip2.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
# shellcheck disable=SC2016
diff --git a/chapter8/check.sh b/chapter8/check.sh
index af09e33..6b552e5 100644
--- a/chapter8/check.sh
+++ b/chapter8/check.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
./configure --prefix=/usr --disable-static &&
diff --git a/chapter8/coreutils.sh b/chapter8/coreutils.sh
index 7909f26..f024bc8 100644
--- a/chapter8/coreutils.sh
+++ b/chapter8/coreutils.sh
@@ -1,7 +1,13 @@
#!/bin/bash
+set -e
patch -Np1 -i ../coreutils-"${VERSION}"-i18n-1.patch &&
+if [[ "$(uname -m)" = aarch64 ]]; then
+ patch -Np1 -i ../coreutils-"${VERSION}"-aarch64_fixes-1.patch
+fi
+
+
sed -i '/test.lock/s/^/#/' gnulib-tests/gnulib.mk &&
autoreconf -fiv &&
diff --git a/chapter8/dejagnu.sh b/chapter8/dejagnu.sh
index 273ab0f..41ab6fc 100644
--- a/chapter8/dejagnu.sh
+++ b/chapter8/dejagnu.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
./configure --prefix=/usr &&
makeinfo --html --no-split -o doc/dejagnu.html doc/dejagnu.texi &&
diff --git a/chapter8/diffutils.sh b/chapter8/diffutils.sh
index 1f6d045..cb58e2e 100644
--- a/chapter8/diffutils.sh
+++ b/chapter8/diffutils.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
./configure --prefix=/usr &&
diff --git a/chapter8/e2fsprogs.sh b/chapter8/e2fsprogs.sh
index 48a9ead..b994c4e 100644
--- a/chapter8/e2fsprogs.sh
+++ b/chapter8/e2fsprogs.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
mkdir -v build
cd build || exit 1
diff --git a/chapter8/eudev.sh b/chapter8/eudev.sh
index bd6146f..31e8a0c 100644
--- a/chapter8/eudev.sh
+++ b/chapter8/eudev.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
./configure --prefix=/usr \
--bindir=/sbin \
diff --git a/chapter8/expat.sh b/chapter8/expat.sh
index e37a780..433062c 100644
--- a/chapter8/expat.sh
+++ b/chapter8/expat.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
./configure --prefix=/usr \
--disable-static \
diff --git a/chapter8/expect.sh b/chapter8/expect.sh
index 8a2e24b..7789eb5 100644
--- a/chapter8/expect.sh
+++ b/chapter8/expect.sh
@@ -1,10 +1,13 @@
#!/bin/bash
+set -e
./configure --prefix=/usr \
--with-tcl=/usr/lib \
--enable-shared \
--mandir=/usr/share/man \
- --with-tclinclude=/usr/include &&
+ --with-tclinclude=/usr/include \
+ "$([ "$(uname -m)" = aarch64 ] && echo aarch64-unknown-linux-gnu)" &&
+
make &&
make -j1 install &&
diff --git a/chapter8/file.sh b/chapter8/file.sh
index 2c0622c..2c5b982 100644
--- a/chapter8/file.sh
+++ b/chapter8/file.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
./configure --prefix=/usr &&
make &&
diff --git a/chapter8/findutils.sh b/chapter8/findutils.sh
index 101f464..02fdf62 100644
--- a/chapter8/findutils.sh
+++ b/chapter8/findutils.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
# shellcheck disable=SC2016
diff --git a/chapter8/flex.sh b/chapter8/flex.sh
index 35f99de..bf62717 100644
--- a/chapter8/flex.sh
+++ b/chapter8/flex.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
./configure --prefix=/usr \
--docdir=/usr/share/doc/flex-"${VERSION}" \
diff --git a/chapter8/gawk.sh b/chapter8/gawk.sh
index 3a25fc2..b6f25c5 100644
--- a/chapter8/gawk.sh
+++ b/chapter8/gawk.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
sed -i 's/extras//' Makefile.in
diff --git a/chapter8/gcc.sh b/chapter8/gcc.sh
index 85030d9..0a2bc8b 100644
--- a/chapter8/gcc.sh
+++ b/chapter8/gcc.sh
@@ -1,21 +1,32 @@
#!/bin/bash
+set -e
case $(uname -m) in
x86_64)
sed -e '/m64=/s/lib64/lib/' \
-i.orig gcc/config/i386/t-linux64
;;
+ aarch64)
+ sed -e '/mabi.lp64=/s/lib64/lib/' \
+ -i.orig gcc/config/aarch64/t-aarch64-linux
+ patch -Np1 -i ../gcc-"${VERSION}"-aarch64_enable_libquadmath-1.patch
+ ;;
esac
mkdir -v build
cd build || exit 1
../configure --prefix=/usr \
- LD=ld \
- --enable-languages=c,c++ \
- --disable-multilib \
- --disable-bootstrap \
- --with-system-zlib &&
+ LD=ld \
+ --enable-languages=c,c++ \
+ --disable-multilib \
+ --disable-bootstrap \
+ --with-system-zlib \
+ "$([ "$(uname -m)" = aarch64 ] && echo --with-arch=armv8-a)" \
+ "$([ "$(uname -m)" = aarch64 ] && echo --with-cpu=cortex-a73.cortex-a53)" \
+ "$([ "$(uname -m)" = aarch64 ] && echo --enable-fix-cortex-a53-835769)" \
+ "$([ "$(uname -m)" = aarch64 ] && echo --enable-fix-cortex-a53-843419)" &&
+
make &&
diff --git a/chapter8/gdbm.sh b/chapter8/gdbm.sh
index b81ce81..4ecac48 100644
--- a/chapter8/gdbm.sh
+++ b/chapter8/gdbm.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
./configure --prefix=/usr \
--disable-static \
diff --git a/chapter8/gettext.sh b/chapter8/gettext.sh
index df758da..4685d27 100644
--- a/chapter8/gettext.sh
+++ b/chapter8/gettext.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
./configure --prefix=/usr \
--disable-static \
diff --git a/chapter8/glibc.sh b/chapter8/glibc.sh
index e344b47..3392410 100644
--- a/chapter8/glibc.sh
+++ b/chapter8/glibc.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
# shellcheck disable=SC2016
diff --git a/chapter8/gmp.sh b/chapter8/gmp.sh
index 7ca2523..f3adfe7 100644
--- a/chapter8/gmp.sh
+++ b/chapter8/gmp.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
# Uncomment for generic libraries
# cp -v configfsf.guess config.guess
diff --git a/chapter8/gperf.sh b/chapter8/gperf.sh
index 1806dd3..bb69b31 100644
--- a/chapter8/gperf.sh
+++ b/chapter8/gperf.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
./configure --prefix=/usr --docdir=/usr/share/doc/gperf-"${VERSION}" &&
diff --git a/chapter8/grep.sh b/chapter8/grep.sh
index e567f51..5604bec 100644
--- a/chapter8/grep.sh
+++ b/chapter8/grep.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
./configure --prefix=/usr --bindir=/bin &&
diff --git a/chapter8/groff.sh b/chapter8/groff.sh
index f763a61..73b4b93 100644
--- a/chapter8/groff.sh
+++ b/chapter8/groff.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
PAGE=letter ./configure --prefix=/usr &&
diff --git a/chapter8/grub.sh b/chapter8/grub.sh
index 693adcd..128cdb9 100644
--- a/chapter8/grub.sh
+++ b/chapter8/grub.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
sed "s/gold-version/& -R .note.gnu.property/" \
-i Makefile.in grub-core/Makefile.in &&
diff --git a/chapter8/gzip.sh b/chapter8/gzip.sh
index f762cf3..f72a689 100644
--- a/chapter8/gzip.sh
+++ b/chapter8/gzip.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
./configure --prefix=/usr &&
diff --git a/chapter8/iana-etc.sh b/chapter8/iana-etc.sh
index 8576a80..be58311 100644
--- a/chapter8/iana-etc.sh
+++ b/chapter8/iana-etc.sh
@@ -1,3 +1,4 @@
#!/bin/bash
+set -e
cp -v services protocols /etc
diff --git a/chapter8/inetutils.sh b/chapter8/inetutils.sh
index ca54213..572c9e9 100644
--- a/chapter8/inetutils.sh
+++ b/chapter8/inetutils.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
./configure --prefix=/usr \
--localstatedir=/var \
diff --git a/chapter8/intltool.sh b/chapter8/intltool.sh
index 527e46a..758f568 100644
--- a/chapter8/intltool.sh
+++ b/chapter8/intltool.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
sed -i 's:\\\${:\\\$\\{:' intltool-update.in &&
diff --git a/chapter8/iproute2.sh b/chapter8/iproute2.sh
index 8034496..8612d5d 100644
--- a/chapter8/iproute2.sh
+++ b/chapter8/iproute2.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
sed -i /ARPD/d Makefile &&
rm -fv man/man8/arpd.8 &&
diff --git a/chapter8/isl.sh b/chapter8/isl.sh
index e1a68f7..7526c2f 100644
--- a/chapter8/isl.sh
+++ b/chapter8/isl.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
./configure --prefix=/usr \
--disable-static \
diff --git a/chapter8/kbd.sh b/chapter8/kbd.sh
index 00a7397..3e76d8c 100644
--- a/chapter8/kbd.sh
+++ b/chapter8/kbd.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
patch -Np1 -i ../kbd-"${VERSION}"-backspace-1.patch &&
diff --git a/chapter8/kmod.sh b/chapter8/kmod.sh
index 3435179..036a8fc 100644
--- a/chapter8/kmod.sh
+++ b/chapter8/kmod.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
./configure --prefix=/usr \
--bindir=/bin \
diff --git a/chapter8/less.sh b/chapter8/less.sh
index 01a6cb7..6f357a9 100644
--- a/chapter8/less.sh
+++ b/chapter8/less.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
./configure --prefix=/usr --sysconfdir=/etc &&
diff --git a/chapter8/libcap.sh b/chapter8/libcap.sh
index a67b607..33d374c 100644
--- a/chapter8/libcap.sh
+++ b/chapter8/libcap.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
sed -i '/install -m.*STA/d' libcap/Makefile &&
diff --git a/chapter8/libelf.sh b/chapter8/libelf.sh
index cc8798f..e5323e0 100644
--- a/chapter8/libelf.sh
+++ b/chapter8/libelf.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
./configure --prefix=/usr \
--disable-debuginfod \
diff --git a/chapter8/libffi.sh b/chapter8/libffi.sh
index 1a5b45a..ed8b1e5 100644
--- a/chapter8/libffi.sh
+++ b/chapter8/libffi.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
./configure --prefix=/usr --disable-static --with-gcc-arch=native &&
diff --git a/chapter8/libpipeline.sh b/chapter8/libpipeline.sh
index 1f6d045..cb58e2e 100644
--- a/chapter8/libpipeline.sh
+++ b/chapter8/libpipeline.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
./configure --prefix=/usr &&
diff --git a/chapter8/libtool.sh b/chapter8/libtool.sh
index a4c9dd5..a654e29 100644
--- a/chapter8/libtool.sh
+++ b/chapter8/libtool.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
./configure --prefix=/usr &&
diff --git a/chapter8/m4.sh b/chapter8/m4.sh
index 5174f00..8c6201b 100644
--- a/chapter8/m4.sh
+++ b/chapter8/m4.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
sed -i 's/IO_ftrylockfile/IO_EOF_SEEN/' lib/*.c &&
echo "#define _IO_IN_BACKUP 0x100" >> lib/stdio-impl.h &&
diff --git a/chapter8/make.sh b/chapter8/make.sh
index 1f6d045..cb58e2e 100644
--- a/chapter8/make.sh
+++ b/chapter8/make.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
./configure --prefix=/usr &&
diff --git a/chapter8/man-db.sh b/chapter8/man-db.sh
index cd60f12..afa8cb0 100644
--- a/chapter8/man-db.sh
+++ b/chapter8/man-db.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
./configure --prefix=/usr \
--docdir=/usr/share/doc/man-db-"${VERSION}" \
diff --git a/chapter8/man-pages.sh b/chapter8/man-pages.sh
index db9dad4..c019094 100644
--- a/chapter8/man-pages.sh
+++ b/chapter8/man-pages.sh
@@ -1,3 +1,4 @@
#!/bin/bash
+set -e
make -j1 install
diff --git a/chapter8/meson.sh b/chapter8/meson.sh
index 0aa9797..b1aa296 100644
--- a/chapter8/meson.sh
+++ b/chapter8/meson.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
python3 setup.py build &&
diff --git a/chapter8/mpc.sh b/chapter8/mpc.sh
index 793fab5..009662c 100644
--- a/chapter8/mpc.sh
+++ b/chapter8/mpc.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
./configure --prefix=/usr \
--disable-static \
diff --git a/chapter8/mpfr.sh b/chapter8/mpfr.sh
index 99fd5fe..c76276e 100644
--- a/chapter8/mpfr.sh
+++ b/chapter8/mpfr.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
./configure --prefix=/usr \
--disable-static \
diff --git a/chapter8/ncurses.sh b/chapter8/ncurses.sh
index 4bc80d1..c7ba368 100644
--- a/chapter8/ncurses.sh
+++ b/chapter8/ncurses.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
./configure --prefix=/usr \
--mandir=/usr/share/man \
diff --git a/chapter8/ninja.sh b/chapter8/ninja.sh
index e778780..f4f1017 100644
--- a/chapter8/ninja.sh
+++ b/chapter8/ninja.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
export NINJAJOBS=4
diff --git a/chapter8/openssl.sh b/chapter8/openssl.sh
index b5b85dd..59699f5 100644
--- a/chapter8/openssl.sh
+++ b/chapter8/openssl.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
./config --prefix=/usr \
--openssldir=/etc/ssl \
diff --git a/chapter8/patch.sh b/chapter8/patch.sh
index 1f6d045..cb58e2e 100644
--- a/chapter8/patch.sh
+++ b/chapter8/patch.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
./configure --prefix=/usr &&
diff --git a/chapter8/perl.sh b/chapter8/perl.sh
index 0fb9e3f..7e5cbc7 100644
--- a/chapter8/perl.sh
+++ b/chapter8/perl.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
MAJMIN="$(cut -d\. -f1,2 <<< "${VERSION}")"
diff --git a/chapter8/pkg-config.sh b/chapter8/pkg-config.sh
index b56df73..e404f44 100644
--- a/chapter8/pkg-config.sh
+++ b/chapter8/pkg-config.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
./configure --prefix=/usr \
--with-internal-glib \
diff --git a/chapter8/procps-ng.sh b/chapter8/procps-ng.sh
index 4100fe8..85be2d6 100644
--- a/chapter8/procps-ng.sh
+++ b/chapter8/procps-ng.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
./configure --prefix=/usr \
--exec-prefix= \
diff --git a/chapter8/psmisc.sh b/chapter8/psmisc.sh
index 4ac6405..e06ef92 100644
--- a/chapter8/psmisc.sh
+++ b/chapter8/psmisc.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
./configure --prefix=/usr &&
diff --git a/chapter8/python.sh b/chapter8/python.sh
index a04a3d4..04af366 100644
--- a/chapter8/python.sh
+++ b/chapter8/python.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
sed 's|cpython/||' -i Include/cpython/pystate.h &&
diff --git a/chapter8/readline.sh b/chapter8/readline.sh
index cace8ed..39a9479 100644
--- a/chapter8/readline.sh
+++ b/chapter8/readline.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
sed -i '/MV.*old/d' Makefile.in &&
sed -i '/{OLDSUFF}/c:' support/shlib-install &&
diff --git a/chapter8/sed.sh b/chapter8/sed.sh
index f41cce5..6b2d3d7 100644
--- a/chapter8/sed.sh
+++ b/chapter8/sed.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
./configure --prefix=/usr --bindir=/bin &&
diff --git a/chapter8/shadow.sh b/chapter8/shadow.sh
index ba1daa7..075caad 100644
--- a/chapter8/shadow.sh
+++ b/chapter8/shadow.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
# shellcheck disable=SC2016
ROOTPW='$1$5RPAAd$oejpw8ErihLIB7vmGE4SV1'
diff --git a/chapter8/sysklogd.sh b/chapter8/sysklogd.sh
index f9c093f..26c2394 100644
--- a/chapter8/sysklogd.sh
+++ b/chapter8/sysklogd.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
sed -i '/Error loading kernel symbols/{n;n;d}' ksym_mod.c &&
sed -i 's/union wait/int/' syslogd.c &&
diff --git a/chapter8/sysvinit.sh b/chapter8/sysvinit.sh
index f33bfe0..0c0c2db 100644
--- a/chapter8/sysvinit.sh
+++ b/chapter8/sysvinit.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
patch -Np1 -i ../sysvinit-"${VERSION}"-consolidated-1.patch &&
diff --git a/chapter8/tar.sh b/chapter8/tar.sh
index 076f17d..44df8a1 100644
--- a/chapter8/tar.sh
+++ b/chapter8/tar.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
FORCE_UNSAFE_CONFIGURE=1 \
./configure --prefix=/usr \
diff --git a/chapter8/tcl.sh b/chapter8/tcl.sh
index ba630df..244817a 100644
--- a/chapter8/tcl.sh
+++ b/chapter8/tcl.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
tar -xf ../tcl"${VERSION}"-html.tar.gz --strip-components=1 &&
@@ -6,7 +7,7 @@ SRCDIR=$(pwd)
cd unix || exit 1
./configure --prefix=/usr \
--mandir=/usr/share/man \
- "$([ "$(uname -m)" = x86_64 ] && echo --enable-64bit)" &&
+ "$([ "$(uname -m)" = x86_64 ] || [ "$(uname -m)" = aarch64 ] && echo --enable-64bit)" &&
make &&
diff --git a/chapter8/texinfo.sh b/chapter8/texinfo.sh
index f5edef4..87b0aae 100644
--- a/chapter8/texinfo.sh
+++ b/chapter8/texinfo.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
./configure --prefix=/usr &&
diff --git a/chapter8/util-linux.sh b/chapter8/util-linux.sh
index 962118a..de1a5e4 100644
--- a/chapter8/util-linux.sh
+++ b/chapter8/util-linux.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
./configure ADJTIME_PATH=/var/lib/hwclock/adjtime \
--docdir=/usr/share/doc/util-linux-"${VERSION}" \
diff --git a/chapter8/vim.sh b/chapter8/vim.sh
index afec4ed..39bb932 100644
--- a/chapter8/vim.sh
+++ b/chapter8/vim.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
echo '#define SYS_VIMRC_FILE "/etc/vimrc"' >> src/feature.h &&
diff --git a/chapter8/xml-parser.sh b/chapter8/xml-parser.sh
index 0164c33..ffaa526 100644
--- a/chapter8/xml-parser.sh
+++ b/chapter8/xml-parser.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
perl Makefile.PL &&
diff --git a/chapter8/xz.sh b/chapter8/xz.sh
index 4fbe922..4d567c8 100644
--- a/chapter8/xz.sh
+++ b/chapter8/xz.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
./configure --prefix=/usr \
diff --git a/chapter8/zlib.sh b/chapter8/zlib.sh
index 4de64f9..df67074 100644
--- a/chapter8/zlib.sh
+++ b/chapter8/zlib.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
./configure --prefix=/usr &&
make &&
diff --git a/chapter8/zstd.sh b/chapter8/zstd.sh
index 8dc163c..611785e 100644
--- a/chapter8/zstd.sh
+++ b/chapter8/zstd.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
make &&
make prefix=/usr -j1 install &&
diff --git a/chapter9/bashprofile.sh b/chapter9/bashprofile.sh
index 7ae73c2..22d3171 100644
--- a/chapter9/bashprofile.sh
+++ b/chapter9/bashprofile.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
cat > /etc/profile << "EOF"
# Begin /etc/profile
diff --git a/chapter9/bootscriptconf.sh b/chapter9/bootscriptconf.sh
index ae9633c..c5eb759 100644
--- a/chapter9/bootscriptconf.sh
+++ b/chapter9/bootscriptconf.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
cat > /etc/inittab << "EOF"
# Begin /etc/inittab
diff --git a/chapter9/inputrc.sh b/chapter9/inputrc.sh
index 5da8f3b..92c8af2 100644
--- a/chapter9/inputrc.sh
+++ b/chapter9/inputrc.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
cat > /etc/inputrc << "EOF"
# Begin /etc/inputrc
diff --git a/chapter9/network.sh b/chapter9/network.sh
index 05ab2fd..4b778cf 100644
--- a/chapter9/network.sh
+++ b/chapter9/network.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
pushd /etc/sysconfig/ >/dev/null || exit 1
cat > ifconfig.eth0 << "EOF"
diff --git a/chapter9/shells.sh b/chapter9/shells.sh
index dbeced4..60e0486 100644
--- a/chapter9/shells.sh
+++ b/chapter9/shells.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
cat > /etc/shells << "EOF"
# Begin /etc/shells
diff --git a/download.sh b/download.sh
index fff69f7..e733507 100644
--- a/download.sh
+++ b/download.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
# Downlod Packages and Patches
diff --git a/env.sh b/env.sh
index 18cab24..7502dd5 100644
--- a/env.sh
+++ b/env.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
# Begin book environment settings
@@ -19,7 +20,7 @@ CONFIG_SITE="${LFS}/usr/share/config.site"
LFS_VER="LFS_10_1"
# Disk where LFS partition will exist / or exists
-LFS_DISK="/dev/sdb"
+LFS_DISK="/dev/sda"
# Partition number where LFS will exist / or exists
LFS_PART="1"
diff --git a/functions.sh b/functions.sh
index b343e65..5d7bae6 100644
--- a/functions.sh
+++ b/functions.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
download()
{
diff --git a/insidechroot.sh b/insidechroot.sh
index ac193ae..3c365cb 100644
--- a/insidechroot.sh
+++ b/insidechroot.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
CHAPTER="$1"
diff --git a/lfs.sh b/lfs.sh
index 9a8a4f1..6f46443 100755
--- a/lfs.sh
+++ b/lfs.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
set -u
clear
@@ -51,7 +52,7 @@ printf "%b" "${GRN}Creating LFS directory at ${YLW}${LFS}${GRN}${RST}... "
if [[ -d "${LFS}" ]]; then
success "EXISTS"
else
- if ! mkdir "${LFS}" >/dev/null 2>&1; then
+ if ! sudo mkdir "${LFS}" >/dev/null 2>&1; then
fail "FAILED!"
exit 1
fi
@@ -85,7 +86,7 @@ if [[ ! -f "${LFS}"/sources/limited ]]; then
fi
case $(uname -m) in
- x86_64) mkdir -p "${LFS}"/lib64 ;;
+ x86_64 | aarch64) mkdir -p "${LFS}"/lib64 ;;
esac
# Will use normal user and not special lfs user
@@ -140,7 +141,7 @@ done
printf "%b" "\n${IWHT}======= ${IYLW}Chapter 6 ${IGRN}Cleanup and Backup \
${IWHT}=======${RST}\n"
source chapter6/cleanup.sh
-source chapter6/backup.sh
+#source chapter6/backup.sh
# Prepare chroot scripts to be executable for owner, group and others
chmod ugo+x preparechroot.sh
@@ -180,7 +181,7 @@ ${IWHT}=======${RST}\n"
# shellcheck source=chapter7/cleanup.sh
source "${LFS}"/sources/chapter7/cleanup.sh
# shellcheck source=chapter7/backup.sh
- source "${LFS}"/sources/chapter7/backup.sh
+ #source "${LFS}"/sources/chapter7/backup.sh
else
exit "$retval"
fi
@@ -217,7 +218,7 @@ ${IWHT}=======${RST}\n"
# shellcheck source=chapter8/cleanup.sh
source "${LFS}"/sources/chapter8/cleanup.sh
# shellcheck source=chapter8/backup.sh
- source "${LFS}"/sources/chapter8/backup.sh
+ #source "${LFS}"/sources/chapter8/backup.sh
else
exit "$retval"
fi
diff --git a/mountvirtfs.sh b/mountvirtfs.sh
index 237990d..862e453 100644
--- a/mountvirtfs.sh
+++ b/mountvirtfs.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
printf "%b" "${GRN}Mounting virtual kernel filesystems${RST}...\n"
if ! mountpoint "${LFS}"/dev >/dev/null 2>&1; then
diff --git a/packageinstall.sh b/packageinstall.sh
index e0516db..dee9f2c 100644
--- a/packageinstall.sh
+++ b/packageinstall.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
CHAPTER="$1"
PACKAGE="$2"
diff --git a/preparechroot.sh b/preparechroot.sh
index 809a0d4..0ad4da5 100644
--- a/preparechroot.sh
+++ b/preparechroot.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
source colors.sh
@@ -24,7 +25,7 @@ else
sudo chown -Rv root:root "${LFS}"/var
case $(uname -m) in
- x86_64) sudo chown -Rv root:root "${LFS}"/lib64 ;;
+ x86_64 | aarch64) sudo chown -Rv root:root "${LFS}"/lib64 ;;
esac
} >"${LFS}"/sources/log/preparechroot.log 2>&1
diff --git a/setupdisk.sh b/setupdisk.sh
index 659a621..0a3636f 100644
--- a/setupdisk.sh
+++ b/setupdisk.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
printf "%b" " ${IGRN}Creating primary partition at \
${IWHT}${LFS_DISK}${RST}...\n"
diff --git a/umountvirtfs.sh b/umountvirtfs.sh
index 8eb969f..6d5f637 100644
--- a/umountvirtfs.sh
+++ b/umountvirtfs.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
printf "%b" "${GRN}Unmounting virtual kernel filesystems${RST}...\n"
if mountpoint "${LFS}"/dev/pts >/dev/null 2>&1; then
diff --git a/versioncheck.sh b/versioncheck.sh
index 3b83d81..1de3ad0 100755
--- a/versioncheck.sh
+++ b/versioncheck.sh
@@ -1,4 +1,6 @@
#!/bin/bash
+set -e
+
# Simple script to list version numbers of critical development tools
export LC_ALL=C