Enhance build script to include strip tool verification and update wpa_supplicant configuration to enable stdout debug reduction for smaller binary size.
This commit is contained in:
5
build.sh
5
build.sh
@@ -11,6 +11,7 @@ set -euo pipefail
|
|||||||
|
|
||||||
TOOLCHAIN_PREFIX="${TOOLCHAIN_PREFIX:-arm-uclinuxfdpiceabi}"
|
TOOLCHAIN_PREFIX="${TOOLCHAIN_PREFIX:-arm-uclinuxfdpiceabi}"
|
||||||
CC_BIN="${CC_BIN:-${TOOLCHAIN_PREFIX}-gcc}"
|
CC_BIN="${CC_BIN:-${TOOLCHAIN_PREFIX}-gcc}"
|
||||||
|
STRIP_BIN="${STRIP_BIN:-${TOOLCHAIN_PREFIX}-strip}"
|
||||||
JOBS="${JOBS:-$(nproc)}"
|
JOBS="${JOBS:-$(nproc)}"
|
||||||
|
|
||||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
@@ -32,6 +33,9 @@ die() {
|
|||||||
if ! command -v "${CC_BIN}" >/dev/null 2>&1; then
|
if ! command -v "${CC_BIN}" >/dev/null 2>&1; then
|
||||||
die "Compiler not found in PATH: ${CC_BIN}"
|
die "Compiler not found in PATH: ${CC_BIN}"
|
||||||
fi
|
fi
|
||||||
|
if ! command -v "${STRIP_BIN}" >/dev/null 2>&1; then
|
||||||
|
die "Strip tool not found in PATH: ${STRIP_BIN}"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ ! -d "${WPA_DIR}" ]; then
|
if [ ! -d "${WPA_DIR}" ]; then
|
||||||
die "wpa_supplicant directory not found: ${WPA_DIR}"
|
die "wpa_supplicant directory not found: ${WPA_DIR}"
|
||||||
@@ -77,5 +81,6 @@ echo "libnl-genl-3.0 version: $(pkg-config --modversion libnl-genl-3.0)"
|
|||||||
cd "${WPA_DIR}"
|
cd "${WPA_DIR}"
|
||||||
make clean
|
make clean
|
||||||
make -j"${JOBS}" CC="${CC_BIN}"
|
make -j"${JOBS}" CC="${CC_BIN}"
|
||||||
|
"${STRIP_BIN}" wpa_supplicant wpa_cli wpa_passphrase
|
||||||
|
|
||||||
echo "Build completed successfully."
|
echo "Build completed successfully."
|
||||||
|
|||||||
@@ -241,7 +241,7 @@ CONFIG_CTRL_IFACE=y
|
|||||||
# This can be used to reduce the size of the wpa_supplicant considerably
|
# This can be used to reduce the size of the wpa_supplicant considerably
|
||||||
# if debugging code is not needed. The size reduction can be around 35%
|
# if debugging code is not needed. The size reduction can be around 35%
|
||||||
# (e.g., 90 kB).
|
# (e.g., 90 kB).
|
||||||
#CONFIG_NO_STDOUT_DEBUG=y
|
CONFIG_NO_STDOUT_DEBUG=y
|
||||||
|
|
||||||
# Remove WPA support, e.g., for wired-only IEEE 802.1X supplicant, to save
|
# Remove WPA support, e.g., for wired-only IEEE 802.1X supplicant, to save
|
||||||
# 35-50 kB in code size.
|
# 35-50 kB in code size.
|
||||||
|
|||||||
Reference in New Issue
Block a user