2 # Copyright (C) 2007-2010 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 define Image
/BuildKernel
11 cp
$(LINUX_DIR
)/vmlinux
$(BIN_DIR
)/$(IMG_PREFIX
)-vmlinux
13 dd if
=$(KDIR
)/vmlinux of
=$(KDIR
)/$(IMG_PREFIX
)-vmlinux bs
=64k conv
=sync
14 mkimage
-A mips
-O linux
-T kernel
-a
0x80100000 -C none
-e \
16 -n
'MIPS OpenWrt Linux-$(LINUX_VERSION)' \
17 -d
$(KDIR
)/$(IMG_PREFIX
)-vmlinux
$(BIN_DIR
)/$(IMG_PREFIX
)-uImage
21 $(call Image
/Build
/$(1),$(1))
24 define Image
/Build
/jffs2-64k
25 dd if
=$(KDIR
)/root.
$(1) of
=$(BIN_DIR
)/$(IMG_PREFIX
)-$(1).img bs
=65536 conv
=sync
28 define Image
/Build
/jffs2-128k
29 dd if
=$(KDIR
)/root.
$(1) of
=$(BIN_DIR
)/$(IMG_PREFIX
)-$(1).img bs
=131072 conv
=sync
30 $(call Image
/Build
/slug
,$(1))
33 define Image
/Build
/squashfs
34 $(call prepare_generic_squashfs
,$(KDIR
)/root.squashfs
)
35 dd if
=$(KDIR
)/root.
$(1) of
=$(BIN_DIR
)/$(IMG_PREFIX
)-$(1).img bs
=131072 conv
=sync
38 $(eval
$(call BuildImage
))