diff options
author | Jonathan Bauer | 2018-08-10 13:15:07 +0200 |
---|---|---|
committer | Jonathan Bauer | 2018-08-10 13:15:07 +0200 |
commit | ebc06373c5eacf69028ffb9642e464fe5b12af73 (patch) | |
tree | c0a2abe07bc7d4ccf93bb221c1f072b323374a8d /core/modules | |
parent | [mltk] add rsync to dev tools -.- (diff) | |
download | mltk-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')
-rw-r--r-- | core/modules/kernel-vanilla/module.build | 7 |
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" |