2 # Makefile -- Build instructions for McAfee SG560U
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
11 ROMFS_DIRS = $(DEFAULT_ROMFS_DIRS) sda1
13 DEVICES += $(DEVICE_PTY_64)
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
32 romfs.post:: romfs.no-ixp400-modules romfs.ixp425-microcode
34 image: image.configs image.dir image.arm.zimage image.squashfs image.bin image.tag image.copy image.flash
37 # build up a flash.bin
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/.
51 include $(ROOTDIR)/vendors/config/config.dev