diff --git a/package/linux-headers/linux-headers.mk b/package/linux-headers/linux-headers.mk index 1102e76f0f..e2a0b7a7c9 100644 --- a/package/linux-headers/linux-headers.mk +++ b/package/linux-headers/linux-headers.mk @@ -33,6 +33,12 @@ LINUX_HEADERS_REPO_URL = $(call qstrip,$(BR2_KERNEL_HEADERS_CUSTOM_REPO_URL)) LINUX_HEADERS_CIP = endif # BR2_KERNEL_HEADERS_AS_KERNEL +ifeq ($(BR2_KERNEL_HEADERS_VERSION)$(BR_BUILDING),yy) +ifeq ($(LINUX_HEADERS_VERSION),) +$(error No kernel headers version set, check your BR2_DEFAULT_KERNEL_VERSION setting) +endif +endif + # Compute LINUX_HEADERS_SOURCE and LINUX_HEADERS_SITE from the configuration ifeq ($(LINUX_HEADERS_CUSTOM_TARBALL),y) ifeq ($(BR_BUILDING),y)