[PATCH 1/4] packages/x86: detect architecture, not x86/64 target
Elliott Mitchell
ehem+openwrt at m5p.com
Mon Feb 27 17:24:27 PST 2023
These spots should be detecting the amd64 architecture, not the
specific target name. If additional amd64 targets were added, or
the target was renamed, these would fail to build.
Signed-off-by: Elliott Mitchell <ehem+openwrt at m5p.com>
---
package/firmware/intel-microcode/Makefile | 2 +-
package/kernel/linux/modules/crypto.mk | 2 +-
package/kernel/linux/modules/virt.mk | 4 ++--
package/libs/wolfssl/Makefile | 2 +-
target/linux/x86/modules.mk | 4 ++--
5 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/package/firmware/intel-microcode/Makefile b/package/firmware/intel-microcode/Makefile
index 58ae7ee74b..750d7db26d 100644
--- a/package/firmware/intel-microcode/Makefile
+++ b/package/firmware/intel-microcode/Makefile
@@ -18,7 +18,7 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/intel-microcode-3.$(PKG_VERSION).1
PKG_BUILD_DEPENDS:=iucode-tool/host
-ifdef CONFIG_TARGET_x86_64
+ifdef CONFIG_x86_64
MICROCODE:="intel-microcode-64"
else
MICROCODE:="intel-microcode"
diff --git a/package/kernel/linux/modules/crypto.mk b/package/kernel/linux/modules/crypto.mk
index 83048e50d3..91b283cce6 100644
--- a/package/kernel/linux/modules/crypto.mk
+++ b/package/kernel/linux/modules/crypto.mk
@@ -722,7 +722,7 @@ define KernelPackage/crypto-misc
$(call AddDepends/crypto)
endef
-ifndef CONFIG_TARGET_x86_64
+ifndef CONFIG_x86_64
define KernelPackage/crypto-misc/x86
FILES+= \
$(LINUX_DIR)/arch/x86/crypto/twofish-i586.ko \
diff --git a/package/kernel/linux/modules/virt.mk b/package/kernel/linux/modules/virt.mk
index 59a2d79563..d572a873df 100644
--- a/package/kernel/linux/modules/virt.mk
+++ b/package/kernel/linux/modules/virt.mk
@@ -77,7 +77,7 @@ $(eval $(call KernelPackage,kvm-amd))
define KernelPackage/vfio
SUBMENU:=Virtualization
TITLE:=VFIO Non-Privileged userspace driver framework
- DEPENDS:=@TARGET_x86_64
+ DEPENDS:=@x86_64
KCONFIG:= \
CONFIG_VFIO \
CONFIG_VFIO_NOIOMMU=n \
@@ -99,7 +99,7 @@ $(eval $(call KernelPackage,vfio))
define KernelPackage/vfio-pci
SUBMENU:=Virtualization
TITLE:=Generic VFIO support for any PCI device
- DEPENDS:=@TARGET_x86_64 @PCI_SUPPORT +kmod-vfio +kmod-irqbypass
+ DEPENDS:=@x86_64 @PCI_SUPPORT +kmod-vfio +kmod-irqbypass
KCONFIG:= \
CONFIG_VFIO_PCI \
CONFIG_VFIO_PCI_IGD=y
diff --git a/package/libs/wolfssl/Makefile b/package/libs/wolfssl/Makefile
index 6ad44a9acf..b21ccde5df 100644
--- a/package/libs/wolfssl/Makefile
+++ b/package/libs/wolfssl/Makefile
@@ -188,7 +188,7 @@ else ifdef CONFIG_aarch64
CONFIGURE_ARGS += --enable-armasm
TARGET_CFLAGS:=$(TARGET_CFLAGS:-mcpu%=-mcpu%+crypto)
Package/libwolfsslcpu-crypto/preinst=$(Package/libwolfsslcpu-crypto/preinst-aarch64)
-else ifdef CONFIG_TARGET_x86_64
+else ifdef CONFIG_x86_64
CONFIGURE_ARGS += --enable-intelasm
endif
diff --git a/target/linux/x86/modules.mk b/target/linux/x86/modules.mk
index e0c3b4174f..a63ad725c7 100644
--- a/target/linux/x86/modules.mk
+++ b/target/linux/x86/modules.mk
@@ -5,7 +5,7 @@
define KernelPackage/amazon-ena
SUBMENU:=$(NETWORK_DEVICES_MENU)
TITLE:=Elastic Network Adapter (for Amazon AWS T3)
- DEPENDS:=@TARGET_x86_64
+ DEPENDS:=@x86_64
KCONFIG:=CONFIG_ENA_ETHERNET
FILES:=$(LINUX_DIR)/drivers/net/ethernet/amazon/ena/ena.ko
AUTOLOAD:=$(call AutoLoad,12,ena)
@@ -22,7 +22,7 @@ $(eval $(call KernelPackage,amazon-ena))
define KernelPackage/amd-xgbe
SUBMENU:=$(NETWORK_DEVICES_MENU)
TITLE:=AMD Ethernet on SoC support
- DEPENDS:=@PCI_SUPPORT @TARGET_x86_64 +kmod-lib-crc32c +kmod-ptp +kmod-libphy +(LINUX_5_10||LINUX_5_15):kmod-mdio-devres
+ DEPENDS:=@PCI_SUPPORT @x86_64 +kmod-lib-crc32c +kmod-ptp +kmod-libphy +(LINUX_5_10||LINUX_5_15):kmod-mdio-devres
KCONFIG:=CONFIG_AMD_XGBE
FILES:=$(LINUX_DIR)/drivers/net/ethernet/amd/xgbe/amd-xgbe.ko
AUTOLOAD:=$(call AutoLoad,35,amd-xgbe)
--
2.30.2
More information about the openwrt-devel
mailing list