瀏覽代碼

package/busybox: disable CONFIG_FEATURE_IP_LINK_CAN if headers < 4.11

Since the recent bump of Busybox to 1.37.0 in commit
ed84e971c36b43f564df881d86ac459bb5b7dad0, the build fails on
configurations with old kernel headers. Indeed, the new
CONFIG_FEATURE_IP_LINK_CAN Busybox option uses IFLA_CAN_TERMINATION,
which was only introduced in Linux 4.11.

This commit addresses this issue by disabling
CONFIG_FEATURE_IP_LINK_CAN if the headers are not old enough.

Fixes:

  https://gitlab.com/kubu93/buildroot/-/jobs/9059854451

Fixes: ed84e971c36b43f564df881d86ac459bb5b7dad0 ("package/busybox bump version to 1.37.0")
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
Thomas Petazzoni 5 月之前
父節點
當前提交
71b170d098
共有 1 個文件被更改,包括 8 次插入0 次删除
  1. 8 0
      package/busybox/busybox.mk

+ 8 - 0
package/busybox/busybox.mk

@@ -410,6 +410,13 @@ define BUSYBOX_INSTALL_ADD_TO_SHELLS
 endef
 BUSYBOX_TARGET_FINALIZE_HOOKS += BUSYBOX_INSTALL_ADD_TO_SHELLS
 
+ifeq ($(BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_11),)
+# IFLA_CAN_TERMINATION was introduced in Linux 4.11
+define BUSYBOX_DISABLE_IP_LINK_CAN
+	$(call KCONFIG_DISABLE_OPT,CONFIG_FEATURE_IP_LINK_CAN)
+endef
+endif
+
 define BUSYBOX_KCONFIG_FIXUP_CMDS
 	$(BUSYBOX_MUSL_DISABLE_SHA_HWACCEL)
 	$(BUSYBOX_SET_MMU)
@@ -422,6 +429,7 @@ define BUSYBOX_KCONFIG_FIXUP_CMDS
 	$(BUSYBOX_SET_SELINUX)
 	$(BUSYBOX_SET_LESS_FLAGS)
 	$(BUSYBOX_SET_INDIVIDUAL_BINARIES)
+	$(BUSYBOX_DISABLE_IP_LINK_CAN)
 	$(PACKAGES_BUSYBOX_CONFIG_FIXUPS)
 endef