From 6e1f2e063d2f9371b839a4f9d82844e8d75f67be Mon Sep 17 00:00:00 2001 From: Peng Tao Date: Thu, 22 Mar 2018 23:20:53 +0800 Subject: [PATCH] Makefile: allow to build image and initrd based on existing rootfs Just so that we do not have to re-build rootfs every time for local build/testing. Fixes: #69 Signed-off-by: Peng Tao --- Makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 6f3aaa5963..ccc2ea53e0 100644 --- a/Makefile +++ b/Makefile @@ -10,14 +10,19 @@ DISTRO_ROOTFS := "$(PWD)/$(DISTRO)_rootfs" IMG_SIZE=500 AGENT_INIT ?= no +all: rootfs image initrd rootfs: @echo Creating rootfs based on "$(DISTRO)" "$(MK_DIR)/rootfs-builder/rootfs.sh" -r "$(DISTRO_ROOTFS)" "$(DISTRO)" -image: rootfs +image: rootfs image-only + +image-only: @echo Creating image based on "$(DISTRO_ROOTFS)" "$(MK_DIR)/image-builder/image_builder.sh" -s "$(IMG_SIZE)" "$(DISTRO_ROOTFS)" -initrd: rootfs +initrd: rootfs initrd-only + +initrd-only: @echo Creating initrd image based on "$(DISTRO_ROOTFS)" "$(MK_DIR)/initrd-builder/initrd_builder.sh" "$(DISTRO_ROOTFS)"