1
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-06-29 12:24:11 +02:00
openwrt/target/linux/armvirt/image/Makefile
Adrian Schmutzler 598b29585e target: use SPDX license identifiers on Makefiles
Use SPDX license tags to allow machines to check licenses.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-02-10 15:47:18 +01:00

33 lines
769 B
Makefile

# SPDX-License-Identifier: GPL-2.0-only
#
# Copyright (C) 2016-2017 Yousong Zhou <yszhou4tech@gmail.com>
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/image.mk
define Image/BuildKernel
$(foreach k,$(filter zImage Image,$(KERNELNAME)), \
cp $(KDIR)/$(KERNELNAME) $(BIN_DIR)/$(IMG_PREFIX)-$(k) \
)
endef
define Image/Build/Initramfs
$(foreach k,$(filter zImage Image,$(KERNELNAME)), \
cp $(KDIR)/$(k)-initramfs $(BIN_DIR)/$(IMG_PREFIX)-$(k)-initramfs \
)
endef
define Image/Build/gzip
gzip -f9n $(BIN_DIR)/$(IMG_ROOTFS)-$(1).img
endef
$(eval $(call Image/gzip-ext4-padded-squashfs))
define Image/Build
$(call Image/Build/$(1))
$(CP) $(KDIR)/root.$(1) $(BIN_DIR)/$(IMG_ROOTFS)-$(1).img
$(call Image/Build/gzip/$(1))
endef
$(eval $(call BuildImage))