Add top-level Makefile

Building the OS is now as simple as running `make` on a Gentoo system.

Interestingly, when `make` is executed as a (grand)child process of
another `make` process, it always prints an `Entering directory ...`
message.  This breaks the `make kernelversion` command, by adding
extraneous text to the output.
This commit is contained in:
2023-02-13 22:50:59 -06:00
parent f32c6d37a4
commit 1687e615b4
4 changed files with 100 additions and 3 deletions

View File

@@ -15,11 +15,11 @@ cd linux
../linux.config
make -C /usr/src/linux O=${PWD} olddefconfig
make -j$(nproc)
kver=$(make kernelversion)
kver=$(make -s kernelversion)
make modules_install INSTALL_MOD_PATH=/mnt/gentoo
cd -
printf 'Installing Kernel ...\n'
printf 'Installing Kernel %s ...\n' "${kver}"
mkdir -p /mnt/gentoo/boot
cp -au linux/arch/arm64/boot/Image.gz /mnt/gentoo/boot/vmlinuz-${kver}
cp -au linux/.config /mnt/gentoo/boot/config-${kver}