"improve" the way non-defconfig configs are enabled
This commit is contained in:
parent
a53f2df8f5
commit
0df21f12f9
@ -2,38 +2,6 @@
|
||||
|
||||
set -xeu
|
||||
|
||||
export EXTRA_LINUX_MODULES=()
|
||||
export EXTRA_LINUX_BUILTIN=()
|
||||
EXTRA_LINUX_CONFIG=()
|
||||
|
||||
for FILE in ./extra-configs/*.sh; do
|
||||
source "${FILE}"
|
||||
done
|
||||
|
||||
if [[ "${EXTRA_LINUX_MODULES[*]}" != "" ]]; then
|
||||
for CONFIG_MODULE in "${EXTRA_LINUX_MODULES[@]}"; do
|
||||
EXTRA_LINUX_CONFIG+=("${CONFIG_MODULE}"'=m')
|
||||
done
|
||||
fi
|
||||
|
||||
if [[ "${EXTRA_LINUX_BUILTIN[*]}" != "" ]]; then
|
||||
for CONFIG_BUILTIN in "${EXTRA_LINUX_BUILTIN[@]}"; do
|
||||
EXTRA_LINUX_CONFIG+=("${CONFIG_BUILTIN}"'=y')
|
||||
done
|
||||
fi
|
||||
|
||||
function verify_config {
|
||||
[[ "${EXTRA_LINUX_CONFIG[*]}" == "" ]] && >&2 echo '**** WARNING: List of extra config options to check is empty, doing nothing.'
|
||||
|
||||
if [[ ! -f .config ]]; then
|
||||
>&2 echo '**** ERROR: The config file could not be found.'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
for CONFIG_OPTION in "${EXTRA_LINUX_CONFIG[@]}"; do
|
||||
if ! grep "${CONFIG_OPTION}" .config 2>&1 /dev/null; then
|
||||
>&2 echo "**** ERROR: Config option '${CONFIG_OPTION}' not found in the config file."
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
EXTRA_LINUX_MODULES+=('CONFIG_R8169')
|
||||
./scripts/config --file .config --set-str R8169 'm'
|
||||
# Q: What requires this option to be enabled?
|
||||
# A: Enabling this option adds support for the Realtek RTL8125 2.5GbE Controller
|
||||
# that is present on the Radxa Rock 5 Model B SBC, connected via the PCIe bus.
|
||||
|
13
master.inc
13
master.inc
@ -86,22 +86,19 @@ pathfix.py -i "%{__python3} %{py3_shbang_opts}" -n -p \
|
||||
Documentation \
|
||||
drivers
|
||||
|
||||
tar -xf %{SOURCE2} -C .
|
||||
cp -vr kernel-tfg/{configure-linux.sh,extra-configs} .
|
||||
rm -rf kernel-tfg/
|
||||
|
||||
source ./configure-linux.sh
|
||||
|
||||
[ -f .config ] && rm -vf .config*
|
||||
%{make} distclean
|
||||
|
||||
%{make} "${EXTRA_LINUX_CONFIG[@]}" %{target_config}
|
||||
verify_config
|
||||
|
||||
tar -xf %{SOURCE2} -C .
|
||||
cp -vr kernel-tfg/{configure-linux.sh,extra-configs} .
|
||||
rm -rf kernel-tfg/
|
||||
./configure-linux.sh
|
||||
|
||||
%build
|
||||
source ./configure-linux.sh
|
||||
%{make} %{?_smp_mflags} PYTHON=%{__python3} %{make_targets}
|
||||
verify_config
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
Loading…
Reference in New Issue
Block a user