set -e
cores=$(nproc)
echo "${cores}"
/usr/bin/make clean
/usr/bin/make defconfig
#cat /boot/config-$(uname -r) > ./linux/.config
sed -i 's/CONFIG_SYSTEM_TRUSTED_KEYS="\.\*"/CONFIG_SYSTEM_TRUSTED_KEYS=""/' ./.config
sed -i 's/CONFIG_SYSTEM_REVOCATION_KEYS="\.\*"/CONFIG_SYSTEM_REVOCATION_KEYS=""/' ./.config
sed -i 's/CONFIG_EFI_STUB="\.\*"/CONFIG_EFI_STUB="n"/' ./.config
echo "CONFIG_FB_EFI=y" >> ./.config
echo "CONFIG_EFI=y" >> ./.config
echo "CONFIG_SYSFB=y" >> ./.config
echo "CONFIG_FB=y" >> ./.config
echo "CONFIG_FRAMEBUFFER_CONSOLE=y" >> ./.config
/usr/bin/make olddefconfig
/usr/bin/make -j ${cores}
