2007-03-12 03:49:50 +08:00
|
|
|
#
|
2010-04-13 07:15:56 +08:00
|
|
|
# Copyright (C) 2007-2010 OpenWrt.org
|
2007-03-12 03:49:50 +08: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
|
|
|
|
|
|
|
|
define Image/BuildKernel
|
2010-04-13 07:15:56 +08:00
|
|
|
cp $(KDIR)/zImage $(BIN_DIR)/$(IMG_PREFIX)-zImage
|
2007-03-12 03:49:50 +08:00
|
|
|
#
|
|
|
|
# XXX - FIXME
|
|
|
|
#
|
2010-04-14 22:36:41 +08:00
|
|
|
# BIN_DIR=$(BIN_DIR) IMG_PREFIX="$(IMG_PREFIX)" $(TOPDIR)/scripts/arm-magic.sh
|
2007-03-12 03:49:50 +08:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Image/Build
|
|
|
|
$(call Image/Build/$(1),$(1))
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Image/Build/jffs2-64k
|
2010-04-13 07:15:56 +08:00
|
|
|
dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-$(1).img bs=65536 conv=sync
|
2007-03-12 03:49:50 +08:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Image/Build/jffs2-128k
|
2010-04-13 07:15:56 +08:00
|
|
|
dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-$(1).img bs=131072 conv=sync
|
2007-03-12 03:49:50 +08:00
|
|
|
$(call Image/Build/slug,$(1))
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Image/Build/squashfs
|
|
|
|
$(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
|
2010-04-13 07:15:56 +08:00
|
|
|
dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-$(1).img bs=131072 conv=sync
|
2007-03-12 03:49:50 +08:00
|
|
|
$(call Image/Build/slug,$(1))
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call BuildImage))
|