define a shared IMG_PREFIX variable used as a basename for image files, it contains...
[openwrt.git] / target / linux / goldfish / image / Makefile
1 #
2 # Copyright (C) 2006-2010 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 include $(TOPDIR)/rules.mk
8 include $(INCLUDE_DIR)/image.mk
9
10 JFFS2_BLOCKSIZE=124k
11 JFFS2OPTS += -n -s 2048
12
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)/
21 endef
22
23 define Image/Build/jffs2-124k
24 $(CP) ./ubinize.cfg $(KDIR)/
25 (cd $(KDIR); \
26 ubinize \
27 -o $(BIN_DIR)/$(IMG_PREFIX)-$(1).img \
28 -p 128KiB -m 2KiB -s 2KiB ubinize.cfg; \
29 )
30 nand_ecc \
31 $(BIN_DIR)/$(IMG_PREFIX)-$(1).img \
32 $(BIN_DIR)/$(IMG_PREFIX)-system.bin
33 endef
34
35 define Image/Build
36 $(call Image/Build/$(1),$(1))
37 endef
38
39
40 $(eval $(call BuildImage))
This page took 0.043989 seconds and 5 git commands to generate.