2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
7 include $(TOPDIR
)/rules.mk
8 include $(INCLUDE_DIR
)/image.mk
10 UCODEFILE
:=IPL_ixp400NpeLibrary-2_4.zip
12 ifneq ($(CONFIG_IXP4XX_INCLUDE_UCODE
),)
13 define Require
/npe-ucode
14 [ -f
$(DL_DIR
)/$(UCODEFILE
) ]
16 define Build
/Compile
/npe
17 $(MAKE
) -C npe-ucode \
22 define Image
/Build
/slug
23 BIN_DIR
=$(BIN_DIR
) $(TOPDIR
)/scripts
/slugimage.pl \
24 -L
$(KDIR
)/apex-nslu2-armeb.bin
-m
$(KDIR
)/NPE-B \
25 -k
$(BIN_DIR
)/openwrt-nslu2-
$(KERNEL
)-zImage \
26 -r rootfs
:$(BIN_DIR
)/openwrt-
$(BOARD
)-$(KERNEL
)-$(1).img \
27 -p
-o
$(BIN_DIR
)/openwrt-nslu2-
$(KERNEL
)-$(1).bin
36 $(call Build
/Compile
/npe
)
41 $(MAKE
) -C npe-ucode
clean
45 cp
$(LINUX_DIR
)/arch
/arm
/boot
/zImage
$(KDIR
)/zImage
48 define Image
/BuildKernel
49 cp
$(KDIR
)/zImage
$(BIN_DIR
)/openwrt-
$(BOARD
)-$(KERNEL
)-zImage
50 # $(shell BIN_DIR=$(BIN_DIR) $(TOPDIR)/scripts/arm-magic.sh)
51 BIN_DIR
=$(BIN_DIR
) $(TOPDIR
)/scripts
/arm-magic.sh
55 $(call Image
/Build
/$(1),$(1))
58 define Image
/Build
/jffs2-64k
59 dd if
=$(KDIR
)/root.
$(1) of
=$(BIN_DIR
)/openwrt-
$(BOARD
)-$(KERNEL
)-$(1).img bs
=65536 conv
=sync
62 define Image
/Build
/jffs2-128k
63 dd if
=$(KDIR
)/root.
$(1) of
=$(BIN_DIR
)/openwrt-
$(BOARD
)-$(KERNEL
)-$(1).img bs
=131072 conv
=sync
64 $(call Image
/Build
/slug
,$(1))
67 define Image
/Build
/squashfs
68 $(call prepare_generic_squashfs
,$(KDIR
)/root.squashfs
)
69 dd if
=$(KDIR
)/root.
$(1) of
=$(BIN_DIR
)/openwrt-
$(BOARD
)-$(KERNEL
)-$(1).img bs
=131072 conv
=sync
70 $(call Image
/Build
/slug
,$(1))
73 $(eval
$(call BuildImage
))
75 $(eval
$(call Require
,npe-ucode
, \
76 You must manually download
$(UCODEFILE
) from
\\\
77 http
://www.intel.com
/design
/network
/products
/npfamily
/ixp400_archives.htm
\\\
78 and put it in
$(DL_DIR
).
\\\
79 You will need to agree to the Intel Public License to do so
- please do read it
! \