if [ "$EUID" = 0 ] then echo "Please don't run this as root" exit fi VER=6.0.2 if [ ! -d src ] then wget https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-${VER}.tar.xz mkdir src mv linux-${VER}.tar.xz src/ cd src tar xf linux-${VER}.tar.xz rm linux-${VER}.tar.xz mv linux-${VER}/* . rm -rf linux-${VER} cd - fi cd src # make clean qui supprime le .config #make mrproper cp ../.config .config make -j$(nproc) bzImage make -j$(nproc) modules sudo cp arch/x86_64/boot/bzImage ../../rootfs/boot/vmlinuz || exit 1 sudo cp System.map ../../rootfs/boot/System.map || exit 1 DESTDIR=$(pwd)/../../rootfs sudo make modules_install INSTALL_MOD_PATH=$(realpath $DESTDIR) || exit 1 cd -