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 <bergwolf@gmail.com>
This commit is contained in:
Peng Tao 2018-03-22 23:20:53 +08:00
parent 56ab8c99fe
commit 6e1f2e063d

View File

@ -10,14 +10,19 @@ DISTRO_ROOTFS := "$(PWD)/$(DISTRO)_rootfs"
IMG_SIZE=500 IMG_SIZE=500
AGENT_INIT ?= no AGENT_INIT ?= no
all: rootfs image initrd
rootfs: rootfs:
@echo Creating rootfs based on "$(DISTRO)" @echo Creating rootfs based on "$(DISTRO)"
"$(MK_DIR)/rootfs-builder/rootfs.sh" -r "$(DISTRO_ROOTFS)" "$(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)" @echo Creating image based on "$(DISTRO_ROOTFS)"
"$(MK_DIR)/image-builder/image_builder.sh" -s "$(IMG_SIZE)" "$(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)" @echo Creating initrd image based on "$(DISTRO_ROOTFS)"
"$(MK_DIR)/initrd-builder/initrd_builder.sh" "$(DISTRO_ROOTFS)" "$(MK_DIR)/initrd-builder/initrd_builder.sh" "$(DISTRO_ROOTFS)"