Host insane unsafe usage

This commit is contained in:
Ciro Santilli
2017-08-03 04:32:06 +01:00
parent dfc4981e46
commit 0bb3e8519a
13 changed files with 85 additions and 54 deletions

15
kernel_module/make-host.sh Executable file
View File

@@ -0,0 +1,15 @@
#!/usr/bin/env bash
# We can almost do everything from the Makefile itself by using default values for
#
# LINUX_DIR ?= "/lib/modules/$(uname -r)/build"
# BR2_EXTERNAL_KERNEL_MODULE_PATH="$(pwd)"
#
# The problem with that is that if you define those variables in your environment,
# the build breaks, so this is more portable.
#
# Trying to add `-i` to overcome incompatible modules will fail,
# because any build failure prevents the generation of all `.mod.c` files.
make -j $(($(nproc) - 2)) BR2_EXTERNAL_KERNEL_MODULE_PATH="$(pwd)" LINUX_DIR="/lib/modules/$(uname -r)/build" "$@"
make -C user/ -j $(($(nproc) - 2)) "$@"