1
0
mirror of https://github.com/krglaws/MyLFS.git synced 2025-08-01 23:54:52 +00:00

add linux build

This commit is contained in:
Kyle Glaws
2022-04-02 14:26:13 -04:00
parent a7c50e15a9
commit f032a12d92
6 changed files with 52 additions and 4886 deletions

View File

@ -72,6 +72,7 @@ e2fsprogs
sysklogd
sysvinit
lfsbootscripts
linux
# UEFI Boot Dependencies
popt

View File

@ -21,7 +21,7 @@ make install
mv /etc/bash_completion.d/grub /usr/share/bash-completion/completions
GRUB_OUTPUT=$(grub-install --bootloader-id=LFS --recheck)
if ! echo $GRUB_OUTPUT | grep "No error reported"
if [ -n "$(echo $GRUB_OUTPUT | grep "No error reported")" ]
then
echo "An error occured while installing GRUB:"
echo $GRUB_OUTPUT

View File

@ -1,31 +1,25 @@
#!/usr/bin/env bash
# LINUX Phase 4
# ~~~~~~~~~~~~~
set -e
cd /sources
eval "$(grep LINUX $PACKAGE_LIST)"
PKG_LINUX=$(basename $PKG_LINUX)
tar -xf $PKG_LINUX
cd ${PKG_LINUX%.tar*}
CONFIGFILE=config-$KERNELVERS
make mrproper
cp /boot/config-5.16.9 ./.config
if [ -f /boot/$CONFIGFILE ]
then
cp /boot/$CONFIGFILE ./.config
else
# if kernel config not provided, use default architecture config
make defconfig
fi
make
make modules_install
cp arch/x86_64/boot/bzImage /boot/vmlinuz-5.16.9-lfs-11.1
cp ./.config /boot/$CONFIGFILE
cp System.map /boot/System.map-5.16.9
cp arch/x86_64/boot/bzImage /boot/vmlinuz-$KERNELVERS-lfs-11.1
install -d /usr/share/doc/linux-5.16.9
cp -r Documentation/* /usr/share/doc/linux-5.16.9
cp System.map /boot/System.map-$KERNELVERS
cd /sources
rm -rf ${PKG_LINUX%.tar*}
install -d /usr/share/doc/linux-$KERNELVERS
cp -r Documentation/* /usr/share/doc/linux-$KERNELVERS