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
28 BIN_DIR
=$(BIN_DIR
) $(TOPDIR
)/scripts
/slugimage.pl \
29 -F
-L
$(KDIR
)/apex-nslu2-armeb.bin
-m
$(KDIR
)/NPE-B \
30 -k
$(BIN_DIR
)/openwrt-nslu2-
$(KERNEL
)-zImage \
31 -r rootfs
:$(BIN_DIR
)/openwrt-
$(BOARD
)-$(KERNEL
)-$(1).img \
32 -p
-o
$(BIN_DIR
)/openwrt-nslu2-
$(KERNEL
)-$(1)-16mb.bin
41 $(call Build
/Compile
/npe
)
46 $(MAKE
) -C npe-ucode
clean
50 cp
$(LINUX_DIR
)/arch
/arm
/boot
/zImage
$(KDIR
)/zImage
53 define Image
/BuildKernel
54 cp
$(KDIR
)/zImage
$(BIN_DIR
)/openwrt-
$(BOARD
)-$(KERNEL
)-zImage
55 # $(shell BIN_DIR=$(BIN_DIR) $(TOPDIR)/scripts/arm-magic.sh)
56 BIN_DIR
=$(BIN_DIR
) $(TOPDIR
)/scripts
/arm-magic.sh
60 $(call Image
/Build
/$(1),$(1))
63 define Image
/Build
/jffs2-64k
64 dd if
=$(KDIR
)/root.
$(1) of
=$(BIN_DIR
)/openwrt-
$(BOARD
)-$(KERNEL
)-$(1).img bs
=65536 conv
=sync
67 define Image
/Build
/jffs2-128k
68 dd if
=$(KDIR
)/root.
$(1) of
=$(BIN_DIR
)/openwrt-
$(BOARD
)-$(KERNEL
)-$(1).img bs
=131072 conv
=sync
69 $(call Image
/Build
/slug
,$(1))
72 define Image
/Build
/squashfs
73 $(call prepare_generic_squashfs
,$(KDIR
)/root.squashfs
)
74 dd if
=$(KDIR
)/root.
$(1) of
=$(BIN_DIR
)/openwrt-
$(BOARD
)-$(KERNEL
)-$(1).img bs
=131072 conv
=sync
75 $(call Image
/Build
/slug
,$(1))
78 $(eval
$(call BuildImage
))
80 $(eval
$(call Require
,npe-ucode
, \
81 You must manually download
$(UCODEFILE
) from
\\\
82 http
://www.intel.com
/design
/network
/products
/npfamily
/ixp400_archives.htm
\\\
83 and put it in
$(DL_DIR
).
\\\
84 You will need to agree to the Intel Public License to do so
- please do read it
! \