
On Wed, Jan 09, 2008 at 01:30:11PM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote:
From: Michael Schwingen michael@schwingen.org
Hi,
the following patch adds support to move the IXP42X NPE firmware to a separate flash block, whose start address is defined in CONFIG_IXP4XX_NPE_EXT_UCODE_BASE. Using that, it is possible to build NPE-enabled u-boot without copyright problems due to the NPE firmware.
I have also removed some unused code (#if 0 currently - should we completely remove those unused parts?)
I hope the patch applies, I get whitespace-related differences in the NPE files due to trailing whitespace in the original versions.
Signed-off-by: Michael Schwingen michael@schwingen.org Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagnioj@jcrosoft.com
Thanks - I had expected some more discussion if those NPE code cleanups should be done.
Now for CONFIG_IXP4XX_NPE_EXT_UCODE_BASE to really work, one more change in the Makefile is required (which I left out when I sent the patch, but with the new Makefile structure, this is really easy to do):
Signed-off-by: Michael Schwingen michael@schwingen.org
diff --git a/cpu/ixp/npe/Makefile b/cpu/ixp/npe/Makefile index 7f020b5..25117d7 100644 --- a/cpu/ixp/npe/Makefile +++ b/cpu/ixp/npe/Makefile @@ -72,7 +72,6 @@ COBJS := npe.o \ IxNpeDlImageMgr.o \ IxNpeDlNpeMgr.o \ IxNpeDlNpeMgrUtils.o \ - IxNpeMicrocode.o \ IxNpeMh.o \ IxNpeMhConfig.o \ IxNpeMhReceive.o \ @@ -80,6 +79,9 @@ COBJS := npe.o \ IxNpeMhSolicitedCbMgr.o \ IxNpeMhUnsolicitedCbMgr.o
+ifndef CONFIG_IXP4XX_NPE_EXT_UCODE_BASE +COBJS += IxNpeMicrocode.o +endif
SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS))
Having the NPE microcode in a seperate flash sector works well with both u-boot and with the OpenWRT patches, which expect the microcode in a separate MTD partition, so the code is in flash only once, and it should be GPL compliant.
cu Michael