add target to be used with qemu

SVN-Revision: 23920
This commit is contained in:
Florian Fainelli
2010-11-08 07:31:31 +00:00
parent b6e9f1dfe0
commit 6a61d2d905
5 changed files with 210 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
#
# Copyright (C) 2010 OpenWrt.org
#
# 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
cp $(LINUX_DIR)/arch/$(ARCH)/boot/$(subst ",,$(KERNELNAME)) $(BIN_DIR)/openwrt-$(BOARD)-vmlinux.elf
endef
define Image/Build/squashfs
$(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
endef
define Image/Build
$(call Image/Build/$(1))
dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/openwrt-$(BOARD)-root.$(1) bs=128k conv=sync
endef
$(eval $(call BuildImage))