From 27cac96001521454887b6b1a744dcfabe2c71b18 Mon Sep 17 00:00:00 2001 From: Andrew Beltrano Date: Tue, 2 Jan 2024 09:16:56 -0700 Subject: [PATCH 1/2] Fix kernel prep ordering. --- .docker/netremote-dev/build-mac80211_hwsim-kmod.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.docker/netremote-dev/build-mac80211_hwsim-kmod.sh b/.docker/netremote-dev/build-mac80211_hwsim-kmod.sh index 0c7f71d1..f4277e13 100644 --- a/.docker/netremote-dev/build-mac80211_hwsim-kmod.sh +++ b/.docker/netremote-dev/build-mac80211_hwsim-kmod.sh @@ -65,6 +65,9 @@ if [[ ! -f .config ]]; then ln -s ${WSL_SRC_CONFIG} .config fi +# Supply defaults for any new/unspecified options in the configuration. +make olddefconfig + # Update the configuration to build the mac80211_hwsim module and its dependencies. echo "Updating kernel configuration to build mac80211_hwsim module and its dependencies..." ${KERNEL_CONFIG_UTIL} \ @@ -73,9 +76,6 @@ ${KERNEL_CONFIG_UTIL} \ --module CONFIG_MAC80211 \ --module CONFIG_MAC80211_HWSIM -# Supply defaults for any new/unspecified options in the configuration. -make olddefconfig - echo "Preparing kernel source tree for building external modules..." make prepare modules_prepare ${WSL_KERNEL_COMPILE_ARG_PARALLEL} From 1effa97d880c0e08d1846e83b284ff6893ce4a8a Mon Sep 17 00:00:00 2001 From: Andrew Beltrano Date: Tue, 2 Jan 2024 09:18:28 -0700 Subject: [PATCH 2/2] Download and unpack source if not already done. --- .docker/netremote-dev/build-mac80211_hwsim-kmod.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.docker/netremote-dev/build-mac80211_hwsim-kmod.sh b/.docker/netremote-dev/build-mac80211_hwsim-kmod.sh index f4277e13..ebd262ef 100644 --- a/.docker/netremote-dev/build-mac80211_hwsim-kmod.sh +++ b/.docker/netremote-dev/build-mac80211_hwsim-kmod.sh @@ -50,9 +50,12 @@ if [[ ! -d ${WSL_SRC_DIRECTORY_BASE} ]]; then mkdir -p ${WSL_SRC_DIRECTORY_BASE} fi -cd ${WSL_SRC_DIRECTORY_BASE} -wget ${KERNEL_URL_FILE} ${WGET_XTRA_ARGS:+"${WGET_XTRA_ARGS}"} -O - | tar xzvf - -cd ${WSL_SRC_DIRECTORY} +if [[ ! -d ${WSL_SRC_DIRECTORY_BASE}/${WSL_SRC_DIRECTORY} ]]; then + cd ${WSL_SRC_DIRECTORY_BASE} + wget ${KERNEL_URL_FILE} ${WGET_XTRA_ARGS:+"${WGET_XTRA_ARGS}"} -O - | tar xzvf - +fi + +cd ${WSL_SRC_DIRECTORY_BASE}/${WSL_SRC_DIRECTORY} # Prepare the kernel source with the configuration for the running kernel. echo "Preparing kernel source with configuration for running kernel..."