From ebc06373c5eacf69028ffb9642e464fe5b12af73 Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Fri, 10 Aug 2018 13:15:07 +0200 Subject: [kernel-vanilla] support for chroot environment if the running kernel config cannot be found under /boot, use the kernel repo's default config instead. --- core/modules/kernel-vanilla/module.build | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'core/modules/kernel-vanilla') diff --git a/core/modules/kernel-vanilla/module.build b/core/modules/kernel-vanilla/module.build index 0665b25c..5936424d 100644 --- a/core/modules/kernel-vanilla/module.build +++ b/core/modules/kernel-vanilla/module.build @@ -101,7 +101,12 @@ update_config() { # first we need to update the current config local BASE_CONFIG_FILE="/boot/config-$(uname -r)" - [ -e "${BASE_CONFIG_FILE}" ] || perror "$BASE_CONFIG_FILE could not be found! This should not happen." + if [ ! -e "${BASE_CONFIG_FILE}" ]; then + pwarning "$BASE_CONFIG_FILE could not be found! Using default config in the kernel repository as base config." + make -C "${MODULE_WORK_DIR}/ksrc" defconfig + [ -e "${MODULE_WORK_DIR}/ksrc/.config" ] || perror "Failed to create default kernel config." + BASE_CONFIG_FILE="${MODULE_WORK_DIR}/ksrc/.config" + fi # check for our wanted config parameter local OPENSLX_WANTED_CONFIG="${ROOT_DIR}/data/kernel.wanted.config" -- cgit v1.2.3-55-g7522