forked from LibreELEC/LibreELEC.tv
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcheck_kernel_config
More file actions
executable file
·44 lines (35 loc) · 1.44 KB
/
Copy pathcheck_kernel_config
File metadata and controls
executable file
·44 lines (35 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)
. config/options linux
${SCRIPTS}/unpack linux
if [ -f "${DISTRO_DIR}/${DISTRO}/required_kernel_options" ]; then
while read OPTION; do
[ -z "$OPTION" -o -n "$(echo "$OPTION" | grep '^#')" ] && continue
if [ "${OPTION##*=}" == "m" ]; then
echo "[m] ${OPTION%%=*}"
$PKG_BUILD/scripts/config --file $PKG_KERNEL_CFG_FILE --module ${OPTION%%=*}
fi
if [ "${OPTION##*=}" == "y" ]; then
echo "[y] ${OPTION%%=*}"
$PKG_BUILD/scripts/config --file $PKG_KERNEL_CFG_FILE --enable ${OPTION%%=*}
fi
done < ${DISTRO_DIR}/${DISTRO}/required_kernel_options
else
echo "required kernel options file doesn't exist: ${DISTRO_DIR}/${DISTRO}/required_kernel_options"
fi
if [ -f "${DISTRO_DIR}/${DISTRO}/optional_kernel_options" ]; then
while read OPTION; do
[ -z "$OPTION" -o -n "$(echo "$OPTION" | grep '^#')" ] && continue
if [ "${OPTION##*=}" == "m" ]; then
echo "[m] ${OPTION%%=*}"
$PKG_BUILD/scripts/config --file $PKG_KERNEL_CFG_FILE --module ${OPTION%%=*}
fi
if [ "${OPTION##*=}" == "y" ]; then
echo "[y] ${OPTION%%=*}"
$PKG_BUILD/scripts/config --file $PKG_KERNEL_CFG_FILE --enable ${OPTION%%=*}
fi
done < ${DISTRO_DIR}/${DISTRO}/optional_kernel_options
else
echo "optional kernel options file doesn't exist: ${DISTRO_DIR}/${DISTRO}/optional_kernel_options"
fi