bpf-headers: Fix download URL with kernel 6.1
authorHauke Mehrtens <hauke@hauke-m.de>
Mon, 6 Nov 2023 00:30:31 +0000 (01:30 +0100)
committerHauke Mehrtens <hauke@hauke-m.de>
Mon, 6 Nov 2023 22:20:14 +0000 (23:20 +0100)
This fixes the download of the kernel 5.15 for the bpf-headers when
kernel 6.1 is build for the target.

Even if kernel 6.1 was selected for the target we still use kernel 5.15
for the bpf-headers. The download script tried to download the 5.15
kernel from the 6.x directory on kernel,org and this failed. Define
PKG_SOURCE_URL based on PKG_PATCHVER and not KERNEL_BASE like done in
kernel.mk.

Without this change it tries to download the kernel from this URL:
ttps://cdn.kernel.org/pub/linux/kernel/v6.x/linux-5.15.129.tar.xz

Fixes: #13190
Fixes: #13671
Fixes: #13814
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
package/kernel/bpf-headers/Makefile

index 733f358672708246d3f2e5805a22a149991300c6..5efd2e1cf0fb7453f38829441c9f6407cb678286 100644 (file)
@@ -19,7 +19,7 @@ include $(INCLUDE_DIR)/kernel-$(PKG_PATCHVER)
 
 PKG_VERSION:=$(PKG_PATCHVER)$(strip $(LINUX_VERSION-$(PKG_PATCHVER)))
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_SOURCE_URL:=$(LINUX_SITE)
+PKG_SOURCE_URL:=@KERNEL/linux/kernel/v$(word 1,$(subst ., ,$(PKG_PATCHVER))).x
 PKG_HASH:=$(LINUX_KERNEL_HASH-$(strip $(PKG_VERSION)))
 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/bpf-headers/$(PKG_NAME)-$(PKG_VERSION)