73d9145e0eb714fa4afdaeb0ce9e6061fc685d56
2 # Copyright (C) 2016-2017 Yousong Zhou <yszhou4tech@gmail.com>
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
7 include $(TOPDIR
)/rules.mk
8 include $(INCLUDE_DIR
)/image.mk
10 define Image
/BuildKernel
11 $(foreach k
,$(filter zImage Image
,$(KERNELNAME
)), \
12 cp
$(KDIR
)/$(KERNELNAME
) $(BIN_DIR
)/$(IMG_PREFIX
)-$(k
) \
16 define Image
/Build
/Initramfs
17 $(foreach k
,$(filter zImage Image
,$(KERNELNAME
)), \
18 cp
$(KDIR
)/$(k
)-initramfs
$(BIN_DIR
)/$(IMG_PREFIX
)-$(k
)-initramfs \
23 $(call Image
/Build
/$(1))
24 dd if
=$(KDIR
)/root.
$(1) bs
=128k conv
=sync | \
25 gzip
-9n
>$(BIN_DIR
)/$(IMG_PREFIX
)-root.
$(1).gz
28 $(eval
$(call BuildImage
))