ramips: mt7621: refresh kernel config
[oweals/openwrt.git] / target / linux / armvirt / image / Makefile
1 #
2 # Copyright (C) 2016-2017 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         $(foreach k,$(filter zImage Image,$(KERNELNAME)), \
12                 cp $(KDIR)/$(KERNELNAME) $(BIN_DIR)/$(IMG_PREFIX)-$(k) \
13         )
14 endef
15
16 define Image/Build/Initramfs
17         $(foreach k,$(filter zImage Image,$(KERNELNAME)), \
18                 cp $(KDIR)/$(k)-initramfs $(BIN_DIR)/$(IMG_PREFIX)-$(k)-initramfs \
19         )
20 endef
21
22 define Image/Build/gzip
23         gzip -f9n $(BIN_DIR)/$(IMG_ROOTFS)-$(1).img
24 endef
25
26 $(eval $(call Image/gzip-ext4-padded-squashfs))
27
28 define Image/Build
29         $(call Image/Build/$(1))
30         $(CP) $(KDIR)/root.$(1) $(BIN_DIR)/$(IMG_ROOTFS)-$(1).img
31         $(call Image/Build/gzip/$(1))
32 endef
33
34 $(eval $(call BuildImage))