2 # Copyright (C) 2012-2014 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
10 UBIFS_OPTS
= -F
-m
2048 -e
124KiB
-c
4096 -U
11 UBI_OPTS
= -m
2048 -p
128KiB
-s
512 -O
2048
13 define Image
/BuildKernel
14 $(CP
) $(KDIR
)/zImage
$(BIN_DIR
)/$(IMG_PREFIX
)-zImage
15 ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS
),)
16 $(CP
) $(KDIR
)/zImage-initramfs
$(BIN_DIR
)/$(IMG_PREFIX
)-zImage-initramfs
18 -mkdir
$(BIN_DIR
)/dtbs
19 -$(CP
) $(DTS_DIR
)/am335x
*.dtb
$(BIN_DIR
)/dtbs
/
20 -$(CP
) $(DTS_DIR
)/omap3
*.dtb
$(BIN_DIR
)/dtbs
/
21 -$(CP
) $(DTS_DIR
)/omap4
*.dtb
$(BIN_DIR
)/dtbs
/
25 $(call Image
/Build
/$(1),$(1))
28 define Image
/Build
/jffs2-64k
29 dd if
=$(KDIR
)/root.
$(1) of
=$(BIN_DIR
)/$(IMG_PREFIX
)-$(1).img bs
=65536 conv
=sync
32 define Image
/Build
/jffs2-128k
33 dd if
=$(KDIR
)/root.
$(1) of
=$(BIN_DIR
)/$(IMG_PREFIX
)-$(1).img bs
=131072 conv
=sync
36 define Image
/Build
/squashfs
37 $(call prepare_generic_squashfs
,$(KDIR
)/root.squashfs
)
38 dd if
=$(KDIR
)/root.
$(1) of
=$(BIN_DIR
)/$(IMG_PREFIX
)-$(1).img bs
=131072 conv
=sync
41 $(eval
$(call BuildImage
))