add exclude_drivers
This commit is contained in:
parent
d6e1d23c70
commit
a464d0731d
3
config
3
config
@ -44,6 +44,9 @@
|
||||
# custom drivers
|
||||
#drivers=""
|
||||
|
||||
# exclude drivers
|
||||
#drivers_exclude=""
|
||||
|
||||
# custom binaries
|
||||
#binaries=""
|
||||
|
||||
|
10
tinyramfs
10
tinyramfs
@ -32,7 +32,7 @@ usage: $0 [options]
|
||||
-c, --config <file> config file
|
||||
-m, --moddir <dir> drivers directory
|
||||
-k, --kernel <ver> kernel version
|
||||
-f, --files <dir> files directory
|
||||
-F, --files <dir> files directory
|
||||
-d, --debug 0|1 debug mode
|
||||
-f, --force 0|1 overwrite existing initramfs image
|
||||
|
||||
@ -58,7 +58,7 @@ parse_args() {
|
||||
_kernel="${2:?}"
|
||||
shift 2
|
||||
;;
|
||||
-f | --files)
|
||||
-F | --files)
|
||||
_filesdir="${2:?}"
|
||||
shift 2
|
||||
;;
|
||||
@ -265,6 +265,12 @@ install_driver() {
|
||||
driver="${driver##*net*}"
|
||||
driver="${driver#insmod }"
|
||||
|
||||
# exclude user specified drivers
|
||||
[ "$drivers_exclude" ] &&
|
||||
for _exclude_driver in $drivers_exclude; do
|
||||
driver="${driver##*${_exclude_driver}*}"
|
||||
done
|
||||
|
||||
# check empty
|
||||
[ "$driver" ] || continue
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user