Root/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#
7include $(TOPDIR)/rules.mk
8include $(INCLUDE_DIR)/image.mk
9
10JFFS2_BLOCKSIZE=124k
11JFFS2OPTS += -n -s 2048
12
13define 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)/
21endef
22
23define 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
33endef
34
35define Image/Build
36    $(call Image/Build/$(1),$(1))
37endef
38
39
40$(eval $(call BuildImage))
41

Archive Download this file



interactive