OSDN Git Service

2013.10.24
[uclinux-h8/uClinux-dist.git] / vendors / McAfee / SG560U / Makefile
1 #
2 #       Makefile -- Build instructions for McAfee SG560U
3 #
4
5 ROMFSIMG  = $(IMAGEDIR)/ramdisk
6 ZIMAGE    = $(IMAGEDIR)/zImage
7 IMAGE     = $(IMAGEDIR)/image.bin
8 FLASH     = $(IMAGEDIR)/flash.bin
9 BOOTLOADER = $(PRODUCTDIR)/SG560U_v4.1.0p0_20090216.sgb
10
11 ROMFS_DIRS = $(DEFAULT_ROMFS_DIRS) sda1
12
13 DEVICES += $(DEVICE_PTY_64)
14
15 FLASH_DEVICES = \
16         boot,c,90,0 \
17         tags,c,90,2 \
18         log0,c,90,4 \
19         log1,c,90,6 \
20         kboot,c,90,8 \
21         kbootblock,b,31,4 \
22         all,c,90,10
23
24 all:
25
26 clean: image.clean
27
28 romfs: romfs_dev romfs.dirs romfs.symlinks romfs.default romfs.rc romfs.version romfs.boot romfs.cryptokey
29         $(ROMFSINST) ../network.init.std /etc/network.init
30         $(ROMFSINST) ../firewall.init.std /etc/firewall.init
31
32 romfs.post:: romfs.no-ixp400-modules romfs.ixp425-microcode
33
34 image: image.configs image.dir image.arm.zimage image.squashfs image.bin image.tag image.copy image.flash
35
36 #
37 # build up a flash.bin
38 #
39 vendor_flashbin:
40         @cp $(ROOTDIR)/boot/boot.bin $(FLASH)
41         @BOOTSIZE=`cat $(ROOTDIR)/boot/boot.bin | wc -c` ; \
42          PADSIZE=`expr 917504 - $$BOOTSIZE` ; \
43          dd if=/dev/zero bs=$$PADSIZE count=1 2> /dev/null | tr '\000' '\377' >> $(FLASH)
44         @cat $(IMAGE) >> $(FLASH)
45         @IMGSIZE=`cat $(FLASH) | wc -c` ; \
46          PADSIZE=`expr 8388608 - $$IMGSIZE` ; \
47          dd if=/dev/zero bs=$$PADSIZE count=1 2> /dev/null | tr '\000' '\377' >> $(FLASH)
48         @echo "Factory `basename $(FLASH)` created."
49         [ -n "$(NO_BUILD_INTO_TFTPBOOT)" ] || cp $(FLASH) /tftpboot/.
50
51 include $(ROOTDIR)/vendors/config/config.dev
52 include ../vendor.mak