2009-06-14 20:42:33 +00:00
|
|
|
#
|
2010-04-12 23:15:56 +00:00
|
|
|
# Copyright (C) 2006-2010 OpenWrt.org
|
2009-06-14 20:42:33 +00:00
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
include $(INCLUDE_DIR)/image.mk
|
|
|
|
|
|
|
|
JFFS2_BLOCKSIZE=124k
|
|
|
|
JFFS2OPTS += -n -s 2048
|
|
|
|
|
|
|
|
define Image/BuildKernel
|
|
|
|
$(TARGET_CROSS)objcopy -O binary -R .note -R .comment -S \
|
2010-04-12 23:15:56 +00:00
|
|
|
$(LINUX_DIR)/arch/arm/boot/compressed/vmlinux $(BIN_DIR)/$(IMG_PREFIX)-kernel.bin
|
2009-06-14 20:42:33 +00:00
|
|
|
$(if $(CONFIG_TARGET_ROOTFS_INITRAMFS), \
|
|
|
|
$(CP) $(LINUX_DIR)/usr/initramfs_data.cpio.gz, \
|
|
|
|
gzip -c < $(LINUX_DIR)/usr/initramfs_data.cpio > \
|
2010-04-12 23:15:56 +00:00
|
|
|
) $(BIN_DIR)/$(IMG_PREFIX)-ramdisk.bin
|
2009-06-14 20:42:33 +00:00
|
|
|
$(CP) ./run-emulator.sh $(BIN_DIR)/
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Image/Build/jffs2-124k
|
|
|
|
$(CP) ./ubinize.cfg $(KDIR)/
|
|
|
|
(cd $(KDIR); \
|
|
|
|
ubinize \
|
2010-04-12 23:15:56 +00:00
|
|
|
-o $(BIN_DIR)/$(IMG_PREFIX)-$(1).img \
|
2009-06-14 20:42:33 +00:00
|
|
|
-p 128KiB -m 2KiB -s 2KiB ubinize.cfg; \
|
|
|
|
)
|
|
|
|
nand_ecc \
|
2010-04-12 23:15:56 +00:00
|
|
|
$(BIN_DIR)/$(IMG_PREFIX)-$(1).img \
|
|
|
|
$(BIN_DIR)/$(IMG_PREFIX)-system.bin
|
2009-06-14 20:42:33 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Image/Build
|
|
|
|
$(call Image/Build/$(1),$(1))
|
|
|
|
endef
|
|
|
|
|
|
|
|
|
|
|
|
$(eval $(call BuildImage))
|