Skip to content

Commit

Permalink
buildsystem: die if a kernel config is not available
Browse files Browse the repository at this point in the history
  • Loading branch information
MilhouseVH committed Jun 22, 2019
1 parent b602721 commit 8a7f1ed
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion config/functions
Original file line number Diff line number Diff line change
Expand Up @@ -989,8 +989,10 @@ kernel_config_path() {
$pkg_linux_dir/config/$config_name \
; do
[[ $cfg =~ /devices//linux/ ]] && continue
[ -f "$cfg" ] && echo "$cfg" && break
[ -f "$cfg" ] && echo "$cfg" && return
done

die "ERROR: Unable to locate kernel config for ${LINUX} - looking for ${config_name}"
}

kernel_make() {
Expand Down
4 changes: 3 additions & 1 deletion packages/linux-firmware/kernel-firmware/package.mk
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,12 @@ makeinstall_target() {
done < "${fwlist}"
done

PKG_KERNEL_CFG_FILE=$(kernel_config_path) || die

# The following files are RPi specific and installed by brcmfmac_sdio-firmware-rpi instead.
# They are also not required at all if the kernel is not suitably configured.
if listcontains "${FIRMWARE}" "brcmfmac_sdio-firmware-rpi" || \
! grep -q "^CONFIG_BRCMFMAC_SDIO=y" $(kernel_config_path); then
! grep -q "^CONFIG_BRCMFMAC_SDIO=y" ${PKG_KERNEL_CFG_FILE}; then
rm -fr $FW_TARGET_DIR/brcm/brcmfmac43430*-sdio.*
rm -fr $FW_TARGET_DIR/brcm/brcmfmac43455*-sdio.*
fi
Expand Down
2 changes: 1 addition & 1 deletion packages/linux/package.mk
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ case "$LINUX" in
;;
esac

PKG_KERNEL_CFG_FILE=$(kernel_config_path)
PKG_KERNEL_CFG_FILE=$(kernel_config_path) || die

if [ -n "$KERNEL_TOOLCHAIN" ]; then
PKG_DEPENDS_HOST="$PKG_DEPENDS_HOST gcc-arm-$KERNEL_TOOLCHAIN:host"
Expand Down

0 comments on commit 8a7f1ed

Please sign in to comment.