]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
ixp4xx-microcode: use the linux-firmware images 24422/head
authorLinus Walleij <linusw@kernel.org>
Sat, 3 Jan 2026 22:19:28 +0000 (23:19 +0100)
committerLinus Walleij <linusw@kernel.org>
Sat, 1 Aug 2026 16:36:20 +0000 (18:36 +0200)
The IXP4xx firmware is now in linux-firmware so use these images
instead and drop the special microcode builder package.

Apply a change to the github labeler at the same time as the special
ixp4xx microcode package no longer exists after this.

Link: https://github.com/openwrt/openwrt/pull/24422
Signed-off-by: Linus Walleij <linusw@kernel.org>
.github/labeler.yml
package/firmware/ixp4xx-microcode/Makefile [deleted file]
package/firmware/ixp4xx-microcode/src/IxNpeMicrocode.h [deleted file]
package/firmware/ixp4xx-microcode/src/LICENSE.IPL [deleted file]
package/firmware/linux-firmware/Makefile
package/firmware/linux-firmware/ixp4xx.mk [new file with mode: 0644]

index 182293d4f67bb5a863e787c61fb7f38a2e6ee8e5..8411fac5cbd62b46b5cb7c1716b8d19e08fb50c5 100644 (file)
@@ -91,7 +91,7 @@
   - any-glob-to-any-file:
     - "target/linux/ixp4xx/**"
     - "package/boot/apex/Makefile/**"
-    - "package/firmware/ixp4xx-microcode/**"
+    - "package/firmware/linux-firmware/ixp4xx.mk"
 "target/kirkwood":
 - changed-files:
   - any-glob-to-any-file:
diff --git a/package/firmware/ixp4xx-microcode/Makefile b/package/firmware/ixp4xx-microcode/Makefile
deleted file mode 100644 (file)
index c01de13..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0-only
-#
-# Copyright (C) 2007-2023 OpenWrt.org
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=ixp4xx-microcode
-PKG_VERSION:=2.4
-PKG_RELEASE:=1
-
-PKG_SOURCE:=IPL_ixp400NpeLibraryWithCrypto-2_4.zip
-PKG_SOURCE_URL:=@OPENWRT
-PKG_HASH:=1b1170d0657847248589d946048c0aeaa9cd671966fc5bec5933283309485eaa
-
-PKG_FLAGS:=nonshared
-
-include $(INCLUDE_DIR)/package.mk
-
-# Ethernet or WAN support, pick one
-define Package/ixp4xx-microcode-ethernet
-  SECTION:=firmware
-  CATEGORY:=Firmware
-  TITLE:=IXP4xx ethernet firmware
-  DEPENDS:=@TARGET_ixp4xx
-endef
-define Package/ixp4xx-microcode-wan
-  SECTION:=firmware
-  CATEGORY:=Firmware
-  TITLE:=IXP4xx WAN firmware
-  DEPENDS:=@TARGET_ixp4xx
-endef
-
-define Package/ixp4xx-microcode-ethernet/description
- This package contains the microcode needed to use the network engines in
- IXP4xx CPUs for ethernet on all three NPEs.
-endef
-define Package/ixp4xx-microcode-wan/description
- This package contains the microcode needed to use the network engines in
- IXP4xx CPUs for ethernet on NPE-A and NPE-B and WAN (HSS) on NPE-C.
-endef
-
-define Build/Prepare
-       rm -rf $(PKG_BUILD_DIR)
-       mkdir -p $(PKG_BUILD_DIR)
-       unzip -d $(PKG_BUILD_DIR)/ $(DL_DIR)/$(PKG_SOURCE)
-       mv $(PKG_BUILD_DIR)/ixp400_xscale_sw/src/npeDl/IxNpeMicrocode.c $(PKG_BUILD_DIR)/
-       rm -rf $(PKG_BUILD_DIR)/ixp400_xscale_sw
-       $(CP) ./src/* $(PKG_BUILD_DIR)/
-endef
-
-define Build/Compile
-       (cd $(PKG_BUILD_DIR); \
-               $(HOSTCC) -Wall -I$(STAGING_DIR_HOST)/include IxNpeMicrocode.c -o IxNpeMicrocode; \
-               ./IxNpeMicrocode -be \
-       )
-endef
-
-define Package/ixp4xx-microcode-ethernet/install
-       $(INSTALL_DIR) $(1)/lib/firmware
-       $(INSTALL_DIR) $(1)/usr/share/doc
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/NPE-A $(1)/lib/firmware/
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/NPE-B $(1)/lib/firmware/
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/NPE-C $(1)/lib/firmware/
-       $(INSTALL_DATA) $(PKG_BUILD_DIR)/LICENSE.IPL $(1)/usr/share/doc/
-endef
-define Package/ixp4xx-microcode-wan/install
-       $(INSTALL_DIR) $(1)/lib/firmware
-       $(INSTALL_DIR) $(1)/usr/share/doc
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/NPE-A-HSS $(1)/lib/firmware/
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/NPE-B $(1)/lib/firmware/
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/NPE-C $(1)/lib/firmware/
-       $(INSTALL_DATA) $(PKG_BUILD_DIR)/LICENSE.IPL $(1)/usr/share/doc/
-endef
-
-
-$(eval $(call BuildPackage,ixp4xx-microcode-ethernet))
-$(eval $(call BuildPackage,ixp4xx-microcode-wan))
diff --git a/package/firmware/ixp4xx-microcode/src/IxNpeMicrocode.h b/package/firmware/ixp4xx-microcode/src/IxNpeMicrocode.h
deleted file mode 100644 (file)
index 16377e1..0000000
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * IxNpeMicrocode.h - Headerfile for compiling the Intel microcode C file
- *
- * Copyright (C) 2006 Christian Hohnstaedt <chohnstaedt@innominate.com>
- *
- * This file is released under the GPLv2
- *
- *
- * compile with
- *
- * gcc -Wall IxNpeMicrocode.c -o IxNpeMicrocode
- *
- * Executing the resulting binary on your build-host creates the
- * "NPE-[ABC].xxxxxxxx" files containing the selected microcode
- *
- * fetch the IxNpeMicrocode.c from the Intel Access Library.
- * It will include this header.
- *
- * select Images for every NPE from the following
- * (used C++ comments for easy uncommenting ....)
- */
-
-// #define IX_NPEDL_NPEIMAGE_NPEA_ETH_SPAN_MASK_FIREWALL_VLAN_QOS_HDR_CONV_EXTMIB
-// #define IX_NPEDL_NPEIMAGE_NPEA_ETH_SPAN_VLAN_QOS_HDR_CONV_EXTMIB
-// #define IX_NPEDL_NPEIMAGE_NPEA_ETH_LEARN_FILTER_SPAN_MASK_FIREWALL_VLAN_QOS_EXTMIB
-// #define IX_NPEDL_NPEIMAGE_NPEA_HSS_TSLOT_SWITCH
-#define IX_NPEDL_NPEIMAGE_NPEA_ETH_SPAN_FIREWALL_VLAN_QOS_HDR_CONV
-// #define IX_NPEDL_NPEIMAGE_NPEA_ETH_LEARN_FILTER_SPAN_FIREWALL_VLAN_QOS
-// #define IX_NPEDL_NPEIMAGE_NPEA_ETH_LEARN_FILTER_SPAN_FIREWALL
-#define IX_NPEDL_NPEIMAGE_NPEA_HSS_2_PORT
-// #define IX_NPEDL_NPEIMAGE_NPEA_DMA
-// #define IX_NPEDL_NPEIMAGE_NPEA_ATM_MPHY_12_PORT
-// #define IX_NPEDL_NPEIMAGE_NPEA_HSS0_ATM_MPHY_1_PORT
-// #define IX_NPEDL_NPEIMAGE_NPEA_HSS0_ATM_SPHY_1_PORT
-// #define IX_NPEDL_NPEIMAGE_NPEA_HSS0
-// #define IX_NPEDL_NPEIMAGE_NPEA_WEP
-
-
-// #define IX_NPEDL_NPEIMAGE_NPEB_ETH_SPAN_MASK_FIREWALL_VLAN_QOS_HDR_CONV_EXTMIB
-// #define IX_NPEDL_NPEIMAGE_NPEB_ETH_SPAN_VLAN_QOS_HDR_CONV_EXTMIB
-// #define IX_NPEDL_NPEIMAGE_NPEB_ETH_LEARN_FILTER_SPAN_MASK_FIREWALL_VLAN_QOS_EXTMIB
-// #define IX_NPEDL_NPEIMAGE_NPEB_DMA
-#define IX_NPEDL_NPEIMAGE_NPEB_ETH_SPAN_FIREWALL_VLAN_QOS_HDR_CONV
-// #define IX_NPEDL_NPEIMAGE_NPEB_ETH_LEARN_FILTER_SPAN_FIREWALL_VLAN_QOS
-// #define IX_NPEDL_NPEIMAGE_NPEB_ETH_LEARN_FILTER_SPAN_FIREWALL
-
-
-// #define IX_NPEDL_NPEIMAGE_NPEC_ETH_SPAN_MASK_FIREWALL_VLAN_QOS_HDR_CONV_EXTMIB
-// #define IX_NPEDL_NPEIMAGE_NPEC_ETH_SPAN_VLAN_QOS_HDR_CONV_EXTMIB
-// #define IX_NPEDL_NPEIMAGE_NPEC_ETH_LEARN_FILTER_SPAN_MASK_FIREWALL_VLAN_QOS_EXTMIB
-// #define IX_NPEDL_NPEIMAGE_NPEC_DMA
-// #define IX_NPEDL_NPEIMAGE_NPEC_CRYPTO_AES_ETH_LEARN_FILTER_SPAN
-// #define IX_NPEDL_NPEIMAGE_NPEC_CRYPTO_AES_ETH_LEARN_FILTER_FIREWALL
-#define IX_NPEDL_NPEIMAGE_NPEC_CRYPTO_AES_CCM_ETH
-// #define IX_NPEDL_NPEIMAGE_NPEC_CRYPTO_AES_CCM_EXTSHA_ETH
-// #define IX_NPEDL_NPEIMAGE_NPEC_CRYPTO_ETH_LEARN_FILTER_SPAN_FIREWALL
-// #define IX_NPEDL_NPEIMAGE_NPEC_ETH_SPAN_FIREWALL_VLAN_QOS_HDR_CONV
-// #define IX_NPEDL_NPEIMAGE_NPEC_ETH_LEARN_FILTER_SPAN_FIREWALL_VLAN_QOS
-// #define IX_NPEDL_NPEIMAGE_NPEC_ETH_LEARN_FILTER_SPAN_FIREWALL
-
-
-#include <stdio.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <netinet/in.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <endian.h>
-#include <byteswap.h>
-#include <string.h>
-
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-#define to_le32(x) (x)
-#define to_be32(x) bswap_32(x)
-#else
-#define to_be32(x) (x)
-#define to_le32(x) bswap_32(x)
-#endif
-
-struct dl_image {
-       unsigned magic;
-       unsigned id;
-       unsigned size;
-       unsigned data[0];
-};
-
-const unsigned IxNpeMicrocode_array[];
-
-int main(int argc, char *argv[])
-{
-       struct dl_image *image = (struct dl_image *)IxNpeMicrocode_array;
-       int imgsiz, i, fd, cnt;
-       const unsigned *arrayptr = IxNpeMicrocode_array;
-       const char *names[] = { "IXP425", "IXP465", "unknown" };
-       int bigendian = 1;
-
-       if (argc > 1) {
-               if (!strcmp(argv[1], "-le"))
-                       bigendian = 0;
-               else if (!strcmp(argv[1], "-be"))
-                       bigendian = 1;
-               else {
-                       printf("Usage: %s <-le|-be>\n", argv[0]);
-                       return EXIT_FAILURE;
-               }
-       }
-
-       for (image = (struct dl_image *)arrayptr, cnt=0;
-               (image->id != 0xfeedf00d) && (image->magic == 0xfeedf00d);
-               image = (struct dl_image *)(arrayptr), cnt++)
-       {
-               unsigned char field[4];
-               imgsiz = image->size + 3;
-               *(unsigned*)field = to_be32(image->id);
-               char filename[40], slnk[10];
-
-               snprintf(filename, sizeof(filename), "NPE-%c.%08x",
-                        (field[0] & 0xf) + 'A', image->id);
-               if (image->id == 0x00090000)
-                       snprintf(slnk, sizeof(slnk), "NPE-%c-HSS",
-                                (field[0] & 0xf) + 'A');
-               else
-                       snprintf(slnk, sizeof(slnk), "NPE-%c",
-                                (field[0] & 0xf) + 'A');
-
-               printf("Writing image: %s.NPE_%c Func: %2x Rev: %02x.%02x "
-                       "Size: %5d to: '%s'\n",
-                       names[field[0] >> 4], (field[0] & 0xf) + 'A',
-                       field[1], field[2], field[3], imgsiz*4, filename);
-               fd = open(filename, O_CREAT | O_RDWR | O_TRUNC, 0644);
-               if (fd >= 0) {
-                       for (i=0; i<imgsiz; i++) {
-                               *(unsigned*)field = bigendian ?
-                                       to_be32(arrayptr[i]) :
-                                       to_le32(arrayptr[i]);
-                               write(fd, field, sizeof(field));
-                       }
-                       close(fd);
-                       unlink(slnk);
-                       symlink(filename, slnk);
-               } else {
-                       perror(filename);
-               }
-               arrayptr += imgsiz;
-       }
-       close(fd);
-       return 0;
-}
diff --git a/package/firmware/ixp4xx-microcode/src/LICENSE.IPL b/package/firmware/ixp4xx-microcode/src/LICENSE.IPL
deleted file mode 100644 (file)
index dad2566..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-INTEL(R) SOFTWARE LICENSE AGREEMENT
-Copyright (c) 2007, Intel Corporation.
-All rights reserved.
-
-Redistribution. Redistribution and use in binary form, without modification, are permitted
-provided that the following conditions are met:
-o Redistributions must reproduce the above copyright notice and the following disclaimer in the
-documentation and/or other materials provided with the distribution. 
-o Neither the name of Intel Corporation nor the names of its suppliers may be used to endorse
-or promote products derived from this software without specific prior written permission. 
-o No reverse engineering, decompilation, or disassembly of this software is permitted.
-
-Limited patent license. Intel Corporation grants a world-wide, royalty-free, non-exclusive
-license under patents it now or hereafter owns or controls to make, have made, use, import,
-offer to sell and sell (.Utilize.) this software, but solely to the extent that any such patent is
-necessary to Utilize the software alone. The patent license shall not apply to any combinations
-which include this software. No hardware per se is licensed hereunder.
-DISCLAIMER. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
-GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
-OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
-OF SUCH DAMAGE.
index 61fce656b6e7b83e78adc53b8eb94578c9fd58a5..b32514b3c532efafd60913eece2e5c359aedd20d 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=linux-firmware
 PKG_VERSION:=20260622
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_URL:=@KERNEL/linux/kernel/firmware
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
diff --git a/package/firmware/linux-firmware/ixp4xx.mk b/package/firmware/linux-firmware/ixp4xx.mk
new file mode 100644 (file)
index 0000000..d38124c
--- /dev/null
@@ -0,0 +1,29 @@
+# SPDX-License-Identifier: GPL-2.0-only
+#
+# Copyright (C) 2007-2026 OpenWrt.org
+
+# Ethernet or WAN support, pick one
+
+Package/ixp4xx-microcode-ethernet = $(call Package/firmware-default,IXP4xx ethernet firmware,@TARGET_ixp4xx,LICENSE.ixp4xx,,nonshared)
+define Package/ixp4xx-microcode-ethernet/install
+       $(INSTALL_DIR) $(1)/lib/firmware/
+       $(INSTALL_DATA) \
+               $(PKG_BUILD_DIR)/ixp4xx/NPE-A \
+               $(PKG_BUILD_DIR)/ixp4xx/NPE-B \
+               $(PKG_BUILD_DIR)/ixp4xx/NPE-C \
+               $(1)/lib/firmware/
+endef
+$(eval $(call BuildPackage,ixp4xx-microcode-ethernet))
+
+Package/ixp4xx-microcode-wan = $(call Package/firmware-default,IXP4xx WAN firmware,@TARGET_ixp4xx,LICENSE.ixp4xx,,nonshared)
+define Package/ixp4xx-microcode-wan/install
+       $(INSTALL_DIR) $(1)/lib/firmware/
+       $(INSTALL_DATA) \
+               $(PKG_BUILD_DIR)/ixp4xx/NPE-A-HSS \
+               $(1)/lib/firmware/NPE-A
+       $(INSTALL_DATA) \
+               $(PKG_BUILD_DIR)/ixp4xx/NPE-B \
+               $(PKG_BUILD_DIR)/ixp4xx/NPE-C \
+               $(1)/lib/firmware/
+endef
+$(eval $(call BuildPackage,ixp4xx-microcode-wan))