From: Robin Farine <robin.farine@terminus.org>
To: openembedded-devel@lists.openembedded.org
Subject: RFC: machine customized ixp4xx NPE firmware
Date: Tue, 15 May 2007 13:22:39 +0200 [thread overview]
Message-ID: <200705151322.39110.robin.farine@terminus.org> (raw)
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
}
-
next reply other threads:[~2007-05-15 11:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-15 11:22 Robin Farine [this message]
2007-05-15 18:38 ` RFC: machine customized ixp4xx NPE firmware 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
-- strict thread matches above, loose matches on Subject: below --
2007-05-16 14:32 Mark Gollahon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200705151322.39110.robin.farine@terminus.org \
--to=robin.farine@terminus.org \
--cc=openembedded-devel@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.