From e5353e8a8ed5a774ed0eb70d18d7329371b5d496 Mon Sep 17 00:00:00 2001 From: Aditya Date: Sun, 8 Jan 2023 15:24:09 +0530 Subject: [PATCH] Add 5.4 - build linux api headers --- scripts/chapter5/5.4-linux-headers.sh | 11 +++++++++++ scripts/main.sh | 12 ++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 scripts/chapter5/5.4-linux-headers.sh 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