All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: RFC: machine customized ixp4xx NPE firmware
@ 2007-05-16 14:32 Mark Gollahon
  0 siblings, 0 replies; 7+ messages in thread
From: Mark Gollahon @ 2007-05-16 14:32 UTC (permalink / raw)
  To: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 1103 bytes --]

Richard Purdie wrote ..
> 
> A neat way to handle this might be to define:
> 
> IXPMACHINES = "nslu2|ixp4xx|whatever"
> 
> and then the ixp specific .bb's check IXPMACHINES rather than a specific
> list. The list would then be maintained in one place and is easily
> updated if anyone adds a new ixp like machine.
> 
> I've not looked at the specifics, its just a random idea I had...
> 
> Cheers,
> 
> Richard

I want to second this approach as I tried awhile back to build OE for an IXP4XX-based machine that came into my possession and, during that time, ended up patching several IXP-specific .bb's to add my new machine.  My work would have been much easier had IXPMACHINES existed.

(NOTE: I did get it almost completely working, the only problem ended up being the networking ports didn't work, which, for a firewall machine, meant the device was useless.  There is an IC175 switch chip sitting between the IXP's two network ports and the physical ports and I couldn't figure out how to hack the IXP net driver to get the IC175 to pass eth frames.)

Regards,
-Mark Gollahon

^ permalink raw reply	[flat|nested] 7+ messages in thread
* RFC: machine customized ixp4xx NPE firmware
@ 2007-05-15 11:22 Robin Farine
  2007-05-15 18:38 ` Leon Woestenberg
  2007-05-16  1:24 ` Rod Whitby
  0 siblings, 2 replies; 7+ messages in thread
From: Robin Farine @ 2007-05-15 11:22 UTC (permalink / raw)
  To: openembedded-devel

Hello everyone,

The platform I am working on is using NPE-B and NPE-C as Ethernet
interfaces. The ixp4xx-npe package from the OE snapshot I am 
currently
using builds firmware for NPE-B only and the firmware type is 
hard-coded
in "IxNpeMicrocode.h".

The patch below proposes a means of letting the machine 
configuration file
decide which NPE firmware to build.

Another but somewhat related point is the COMPATIBLE_MACHINE 
variable. If
my machine's name does not start with nslug or ixp4xx, I am forced 
to
change many package recipes (I suspect it is a FAQ but I do not seem 
to
able to access the mailing-list archive at the moment), perhaps a
COMPATIBLE_ARCH variable would be help here ?

Thanks,

Robin

diff --git 
a/packages/ixp4xx/ixp4xx-npe-native-2.3.2/IxNpeMicrocode.h 
b/packages/ixp4xx/ixp4xx-npe-native-2.3.2/IxNpeMicrocode.h
--- a/packages/ixp4xx/ixp4xx-npe-native-2.3.2/IxNpeMicrocode.h
+++ b/packages/ixp4xx/ixp4xx-npe-native-2.3.2/IxNpeMicrocode.h
@@ -42,7 +42,7 @@
 // #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_NPEB_ETH_LEARN_FILTER_SPAN_FIREWALL
 
 
 // #define 
IX_NPEDL_NPEIMAGE_NPEC_ETH_SPAN_MASK_FIREWALL_VLAN_QOS_HDR_CONV_EXTMIB
@@ -51,7 +51,7 @@
 // #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_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
diff --git a/packages/ixp4xx/ixp4xx-npe-native_2.3.2.bb 
b/packages/ixp4xx/ixp4xx-npe-native_2.3.2.bb
--- a/packages/ixp4xx/ixp4xx-npe-native_2.3.2.bb
+++ b/packages/ixp4xx/ixp4xx-npe-native_2.3.2.bb
@@ -7,9 +7,14 @@ inherit native
 inherit native
 S = "${WORKDIR}/ixp400_xscale_sw/src/npeDl"
 
+# A space-separated list of CPP defines that select the firmware 
images
+# to build for the target machine.
+IXP4XX_NPE_FIRWMARE_DEFINES ?= "\
+-DIX_NPEDL_NPEIMAGE_NPEB_ETH_LEARN_FILTER_SPAN_FIREWALL"
+
 do_compile() {
 	mv ${WORKDIR}/IxNpeMicrocode.h ${S}/
-	gcc -Wall IxNpeMicrocode.c -o IxNpeMicrocode
+	gcc -Wall ${IXP4XX_NPE_FIRWMARE_DEFINES} IxNpeMicrocode.c -o 
IxNpeMicrocode
 }
 
 do_stage() {
diff --git a/packages/ixp4xx/ixp4xx-npe_2.3.2.bb 
b/packages/ixp4xx/ixp4xx-npe_2.3.2.bb
--- a/packages/ixp4xx/ixp4xx-npe_2.3.2.bb
+++ b/packages/ixp4xx/ixp4xx-npe_2.3.2.bb
@@ -13,7 +13,7 @@ S = "${WORKDIR}/ixp400_xscale_sw/src/npe
 
 COMPATIBLE_MACHINE = "(nslu2|ixp4xx)"
 
-FILES_${PN} = "${base_libdir}/firmware/NPE-B"
+FILES_${PN} = "${base_libdir}/firmware/NPE-*"
 
 do_compile() {
 	${STAGING_BINDIR_NATIVE}/IxNpeMicrocode-${PV} -be
@@ -21,13 +21,20 @@ do_compile() {
 
 do_install() {
 	install -d ${D}/${base_libdir}/firmware/
-	rm ${S}/NPE-B
-	mv ${S}/NPE-B.* ${S}/NPE-B
-	install ${S}/NPE-B ${D}/${base_libdir}/firmware/
+	for npe in A B C; do
+		rm ${S}/NPE-${npe} 2>/dev/null || true
+		mv ${S}/NPE-${npe}.* ${S}/NPE-${npe} 2>/dev/null || true
+		if test -f ${S}/NPE-${npe}; then
+			install -m 644 ${S}/NPE-${npe} ${D}/${base_libdir}/firmware/
+		fi
+	done
 }
 
 do_populate_staging() {
 	install -d ${STAGING_FIRMWARE_DIR}
-	install ${S}/NPE-B ${STAGING_FIRMWARE_DIR}/
+	for npe in A B C; do
+		if test -f ${S}/NPE-${npe}; then
+			install -m 644 ${S}/NPE-${npe} ${STAGING_FIRMWARE_DIR}/
+		fi
+	done
 }
-




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-05-16 14:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-16 14:32 RFC: machine customized ixp4xx NPE firmware Mark Gollahon
  -- strict thread matches above, loose matches on Subject: below --
2007-05-15 11:22 Robin Farine
2007-05-15 18:38 ` Leon Woestenberg
2007-05-15 20:17   ` Robin Farine
2007-05-16  1:24 ` Rod Whitby
2007-05-16  8:56   ` Robin Farine
2007-05-16 10:44   ` Richard Purdie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.