summaryrefslogtreecommitdiffstats
path: root/core/modules/kernel-vanilla
diff options
context:
space:
mode:
authorJonathan Bauer2018-08-10 13:15:07 +0200
committerJonathan Bauer2018-08-10 13:15:07 +0200
commitebc06373c5eacf69028ffb9642e464fe5b12af73 (patch)
treec0a2abe07bc7d4ccf93bb221c1f072b323374a8d /core/modules/kernel-vanilla
parent[mltk] add rsync to dev tools -.- (diff)
downloadmltk-ebc06373c5eacf69028ffb9642e464fe5b12af73.tar.gz
mltk-ebc06373c5eacf69028ffb9642e464fe5b12af73.tar.xz
mltk-ebc06373c5eacf69028ffb9642e464fe5b12af73.zip
[kernel-vanilla] support for chroot environment
if the running kernel config cannot be found under /boot, use the kernel repo's default config instead.
Diffstat (limited to 'core/modules/kernel-vanilla')
-rw-r--r--core/modules/kernel-vanilla/module.build7
1 files changed, 6 insertions, 1 deletions
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"