target: use SPDX license identifiers on Makefiles
[openwrt/staging/wigyori.git] / target / linux / armvirt / image / Makefile
1 # SPDX-License-Identifier: GPL-2.0-only
2 #
3 # Copyright (C) 2016-2017 Yousong Zhou <yszhou4tech@gmail.com>
4
5 include $(TOPDIR)/rules.mk
6 include $(INCLUDE_DIR)/image.mk
7
8 define Image/BuildKernel
9 $(foreach k,$(filter zImage Image,$(KERNELNAME)), \
10 cp $(KDIR)/$(KERNELNAME) $(BIN_DIR)/$(IMG_PREFIX)-$(k) \
11 )
12 endef
13
14 define Image/Build/Initramfs
15 $(foreach k,$(filter zImage Image,$(KERNELNAME)), \
16 cp $(KDIR)/$(k)-initramfs $(BIN_DIR)/$(IMG_PREFIX)-$(k)-initramfs \
17 )
18 endef
19
20 define Image/Build/gzip
21 gzip -f9n $(BIN_DIR)/$(IMG_ROOTFS)-$(1).img
22 endef
23
24 $(eval $(call Image/gzip-ext4-padded-squashfs))
25
26 define Image/Build
27 $(call Image/Build/$(1))
28 $(CP) $(KDIR)/root.$(1) $(BIN_DIR)/$(IMG_ROOTFS)-$(1).img
29 $(call Image/Build/gzip/$(1))
30 endef
31
32 $(eval $(call BuildImage))