df4383f1d47ca3bff05fecabb8bd17582efe881a
[openwrt/staging/noltari.git] / target / linux / armvirt / image / Makefile
1 #
2 # Copyright (C) 2016 Yousong Zhou <yszhou4tech@gmail.com>
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 include $(TOPDIR)/rules.mk
8 include $(INCLUDE_DIR)/image.mk
9
10 define Image/BuildKernel
11 cp $(KDIR)/$(KERNELNAME) $(BIN_DIR)/$(IMG_PREFIX)-$(KERNELNAME)
12 endef
13
14 define Image/Build/Initramfs
15 cp $(KDIR)/$(KERNELNAME)-initramfs $(BIN_DIR)/$(IMG_PREFIX)-$(KERNELNAME)-initramfs
16 endef
17
18 define Image/Build
19 $(call Image/Build/$(1))
20 dd if=$(KDIR)/root.$(1) bs=128k conv=sync | \
21 gzip -9n >$(BIN_DIR)/$(IMG_PREFIX)-root.$(1).gz
22 endef
23
24 $(eval $(call BuildImage))