2 # Copyright (C) 2006-2010 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
11 JFFS2OPTS
+= -n
-s
2048
13 define Image
/BuildKernel
14 $(TARGET_CROSS
)objcopy
-O binary
-R .note
-R .comment
-S \
15 $(LINUX_DIR
)/arch
/arm
/boot
/compressed
/vmlinux
$(BIN_DIR
)/$(IMG_PREFIX
)-kernel.bin
16 $(if
$(CONFIG_TARGET_ROOTFS_INITRAMFS
), \
17 $(CP
) $(LINUX_DIR
)/usr
/initramfs_data.cpio.gz
, \
18 gzip
-c
< $(LINUX_DIR
)/usr
/initramfs_data.cpio
> \
19 ) $(BIN_DIR
)/$(IMG_PREFIX
)-ramdisk.bin
20 $(CP
) .
/run-emulator.sh
$(BIN_DIR
)/
23 define Image
/Build
/jffs2-124k
24 $(CP
) .
/ubinize.cfg
$(KDIR
)/
27 -o
$(BIN_DIR
)/$(IMG_PREFIX
)-$(1).img \
28 -p
128KiB
-m
2KiB
-s
2KiB ubinize.cfg
; \
31 $(BIN_DIR
)/$(IMG_PREFIX
)-$(1).img \
32 $(BIN_DIR
)/$(IMG_PREFIX
)-system.bin
36 $(call Image
/Build
/$(1),$(1))
40 $(eval
$(call BuildImage
))