diff --git a/scripts/chapter5/5.4-linux-headers.sh b/scripts/chapter5/5.4-linux-headers.sh new file mode 100644 index 0000000..8c8a84c --- /dev/null +++ b/scripts/chapter5/5.4-linux-headers.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +cd $LFS/sources +tar xvf linux-5.19.2.tar.xz +cd linux-5.19.2 + +make mrproper + +make headers +find usr/include -type f ! -name '*.h' -delete +cp -rv usr/include $LFS/usr diff --git a/scripts/main.sh b/scripts/main.sh index b89216e..c981494 100644 --- a/scripts/main.sh +++ b/scripts/main.sh @@ -151,3 +151,15 @@ if [ $exit_status -ne 0 ] then stop_script "chapter5/5.3-gcc.sh" fi + +# Chapter 5.4 +# =========== +echo "Building Linux API Headers" +su - lfs -c "$PWD/chapter5/5.4-linux-headers.sh" + +# Exit on error +check_exit_code +if [ $exit_status -ne 0 ] +then + stop_script "chapter5/5.4-linux-headers.sh" +fi