rename kernel_module to kernel_modules, start README mass factorings

This commit is contained in:
Ciro Santilli
2018-09-08 07:14:31 +01:00
parent 0a2446edf7
commit a99e041c8a
101 changed files with 558 additions and 430 deletions

View File

@@ -0,0 +1,24 @@
#!/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_MODULES_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.
j="$(($(nproc) - 2))"
while getopts j: OPT; do
case "$OPT" in
'j')
j="$OPTARG"
;;
esac
done
shift $(($OPTIND - 1))
make -j "$j" KERNEL_MODULES_PATH="$(pwd)" LINUX_DIR="/lib/modules/$(uname -r)/build" "$@"
make -C user/ -j "$j" "$@"