linux: check for config options before building

This commit is contained in:
Lukas Rusak 2021-01-26 17:07:20 -08:00
parent f6986f31da
commit 11e3f69eac
No known key found for this signature in database
GPG Key ID: 8C310C807E7393A3
2 changed files with 45 additions and 0 deletions

View File

@ -0,0 +1,27 @@
# general
CONFIG_DRM=y
CONFIG_SQUASHFS=y
CONFIG_SQUASHFS_ZSTD=y
CONFIG_VFAT_FS=y
CONFIG_EXT4_FS=y
# packages/network/iwd
CONFIG_CRYPTO_USER_API_HASH=y
CONFIG_CRYPTO_SHA1=y
CONFIG_CRYPTO_HMAC=y
CONFIG_CRYPTO_MD5=y
CONFIG_CRYPTO_AES=y
CONFIG_CRYPTO_CMAC=y
CONFIG_CRYPTO_SHA256=y
CONFIG_CRYPTO_SHA512=y
CONFIG_CRYPTO_USER_API_SKCIPHER=y
CONFIG_CRYPTO_DES=y
CONFIG_CRYPTO_ECB=y
CONFIG_CRYPTO_CBC=y
CONFIG_KEY_DH_OPERATIONS=y
CONFIG_KEYS=y
CONFIG_ASYMMETRIC_KEY_TYPE=y
CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y
CONFIG_X509_CERTIFICATE_PARSER=y
CONFIG_PKCS7_MESSAGE_PARSER=y
CONFIG_PKCS8_PRIVATE_KEY_PARSER=m

View File

@ -177,6 +177,24 @@ pre_make_target() {
fi
kernel_make oldconfig
if [ -f "${DISTRO_DIR}/${DISTRO}/kernel_options" ]; then
while read OPTION; do
[ -z "${OPTION}" -o -n "$(echo "${OPTION}" | grep '^#')" ] && continue
if [ "${OPTION##*=}" == "n" -a "$(${PKG_BUILD}/scripts/config --state ${OPTION%%=*})" == "undef" ]; then
continue
fi
if [ "$($PKG_BUILD/scripts/config --state ${OPTION%%=*})" != "${OPTION##*=}" ]; then
MISSING_KERNEL_OPTIONS+="\t${OPTION}\n"
fi
done < ${DISTRO_DIR}/${DISTRO}/kernel_options
if [ -n "${MISSING_KERNEL_OPTIONS}" ]; then
print_color CLR_WARNING "LINUX: kernel options not correct: \n${MISSING_KERNEL_OPTIONS%%}\nPlease run ./tools/check_kernel_config\n"
fi
fi
}
make_target() {