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.
8 include $(TOPDIR
)/rules.mk
9 include $(INCLUDE_DIR
)/image.mk
12 JFFS2OPTS
+= -n
-s
2048
14 _PREFIX
=openwrt-goldfish-
16 define Image
/BuildKernel
17 $(TARGET_CROSS
)objcopy
-O binary
-R .note
-R .comment
-S \
18 $(LINUX_DIR
)/arch
/arm
/boot
/compressed
/vmlinux
$(BIN_DIR
)/$(_PREFIX
)kernel.bin
19 $(if
$(CONFIG_TARGET_ROOTFS_INITRAMFS
), \
20 $(CP
) $(LINUX_DIR
)/usr
/initramfs_data.cpio.gz
, \
21 gzip
-c
< $(LINUX_DIR
)/usr
/initramfs_data.cpio
> \
22 ) $(BIN_DIR
)/$(_PREFIX
)ramdisk.bin
23 $(CP
) .
/run-emulator.sh
$(BIN_DIR
)/
26 define Image
/Build
/jffs2-124k
27 $(CP
) .
/ubinize.cfg
$(KDIR
)/
30 -o
$(BIN_DIR
)/$(_PREFIX
)$(1).img \
31 -p
128KiB
-m
2KiB
-s
2KiB ubinize.cfg
; \
34 $(BIN_DIR
)/$(_PREFIX
)$(1).img \
35 $(BIN_DIR
)/$(_PREFIX
)system.bin
39 $(call Image
/Build
/$(1),$(1))
43 $(eval
$(call BuildImage
))