Commit ee5dd31a authored by Michael Shigorin's avatar Michael Shigorin

build-{ve,vm}: handle THE_* and DOT_BASE too

Classic VEs don't carry any kernel since these are running under a single OpenVZ (or potentially LXC) kernel image; ARM Multiboot (TWRP in this particular case) allows to boot off a chroot via kexec, and we need a kernel in it for that, obviously. No bootloader required inside such VE though.
parent 67adab49
Эта фича конфигурирует создание образа виртуального окружения (VE). Эта фича конфигурирует создание образа виртуального окружения (VE),
что используется для сборки шаблонов OpenVZ и ARM-чрутов для TWRP.
Дополняет финальную стадию сборки (lib/, image-scripts.d/) Дополняет финальную стадию сборки (lib/, image-scripts.d/)
и тесно с ней связана. и тесно с ней связана.
...@@ -8,10 +8,14 @@ ifeq (cpio,$(IMAGE_PACKTYPE)) ...@@ -8,10 +8,14 @@ ifeq (cpio,$(IMAGE_PACKTYPE))
MKI_CPIO_COMPRESS = $(IMAGE_COMPRESS) MKI_CPIO_COMPRESS = $(IMAGE_COMPRESS)
endif endif
IMAGE_PACKAGES = $(call list,$(BASE_LISTS)) \ # some VEs _can_ contain kernels (think ARM multiboot
# but this can also help VE/VM hybrid images)
IMAGE_PACKAGES = $(DOT_BASE) \
$(SYSTEM_PACKAGES) \ $(SYSTEM_PACKAGES) \
$(COMMON_PACKAGES) \ $(COMMON_PACKAGES) \
$(BASE_PACKAGES) $(BASE_PACKAGES) \
$(THE_PACKAGES) \
$(call list,$(BASE_LISTS) $(THE_LISTS))
all: $(GLOBAL_DEBUG) build-image copy-tree run-image-scripts pack-image \ all: $(GLOBAL_DEBUG) build-image copy-tree run-image-scripts pack-image \
postprocess $(GLOBAL_CLEAN_WORKDIR) postprocess $(GLOBAL_CLEAN_WORKDIR)
# hooked from ../../lib/sugar.mk # hooked from ../../lib/sugar.mk
use/build-vm: sub/rootfs@/ use/build-vm: sub/rootfs@/ use/kernel
@$(call add_feature) @$(call add_feature)
@$(call xport,ROOTPW) @$(call xport,ROOTPW)
# step 4: build the virtual machine image # step 4: build the virtual machine image
IMAGE_PACKAGES = $(SYSTEM_PACKAGES) \ IMAGE_PACKAGES = $(DOT_BASE) \
$(SYSTEM_PACKAGES) \
$(COMMON_PACKAGES) \ $(COMMON_PACKAGES) \
$(BASE_PACKAGES) \ $(BASE_PACKAGES) \
$(THE_PACKAGES) \ $(THE_PACKAGES) \
$(call list,$(BASE_LISTS) $(THE_LISTS)) \ $(call list,$(BASE_LISTS) $(THE_LISTS))
$(call kpackages,$(THE_KMODULES) $(BASE_KMODULES),$(KFLAVOURS))
# intermediate chroot archive # intermediate chroot archive
VM_TARBALL := $(IMAGE_OUTDIR)/$(IMAGE_NAME).tar VM_TARBALL := $(IMAGE_OUTDIR)/$(IMAGE_NAME).tar
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment