2024-10-02 07:59:04 +08:00
|
|
|
#!/bin/bash
|
|
|
|
|
2024-10-06 06:16:22 +08:00
|
|
|
source ../versions.sh
|
2024-10-02 07:59:04 +08:00
|
|
|
|
|
|
|
GLSOURCES="${LFS}/sources"
|
|
|
|
|
|
|
|
if [ "`whoami`" != "lfs" ]; then
|
|
|
|
myfail "Must run this script as lfs user"
|
|
|
|
fi
|
|
|
|
|
2024-10-08 15:48:40 +08:00
|
|
|
pushd ${GLSOURCES} > /dev/null 2>&1 || myfail "Failed to move to ${GLSOURCES}"
|
2024-10-02 07:59:04 +08:00
|
|
|
|
2024-10-04 01:04:58 +08:00
|
|
|
[ -d linux-${linux_lts_version} ] && rm -rf linux-${linux_lts_version}
|
|
|
|
|
2024-10-02 07:59:04 +08:00
|
|
|
tar -Jxf ${linux_lts_tarball}
|
|
|
|
cd linux-${linux_lts_version}
|
|
|
|
|
|
|
|
make mrproper
|
|
|
|
|
|
|
|
make headers
|
|
|
|
find usr/include -type f ! -name '*.h' -delete
|
|
|
|
cp -rv usr/include ${LFS}/usr
|
|
|
|
|
2024-10-08 15:48:40 +08:00
|
|
|
popd
|
2024-10-02 07:59:04 +08:00
|
|
|
|
2024-10-08 15:48:40 +08:00
|
|
|
# cleanup
|
|
|
|
|
|
|
|
pushd ${GLSOURCES}
|
|
|
|
|
|
|
|
rm -rf linux-${linux_lts_version}
|
|
|
|
|
|
|
|
popd
|