d5a5941f96
This is quite a large-scale change since mkimage-profiles got used to baking distributions over the last year, and virtual environments are quite different, so e.g. image.in/Makefile had to be split in two with the main part of it moved into features.in/iso/lib/. Short overview: - features.in/Makefile: lib/ support (supporting VE images requires dynamic modifications to image.in/Makefile before starting the build; the most natural way to achieve that seems to use features mechanism along with makefile include dir) - packaging format related part moved into features.in/pack (should be better prepared for diversity either) - features.in/iso renamed to features.in/build-distro - features.in/ve renamed to features.in/build-ve + NB: these could not be merged as e.g. features.in/build due to completely different script hooks - lib/image.mk renamed to lib/build.mk - image, config, log postprocessing moved downstream - added a sort of a topping in the form of lib/sugar.mk - assorted style fixups (like ifeq usage) - clean.mk: reliability fix (the problem was observed by Oleg Ivanov and me too but finally it did get the attention quantum) - reviewed, updated and extended docs + QUICKSTART: should be[come] a step-by-step guide (thanks Leo-sp50 for prodiving feedback)
47 lines
1.3 KiB
Makefile
47 lines
1.3 KiB
Makefile
# step 4: build a stage2 subprofile (custom livecd)
|
|
|
|
# NB: stage2 is not standalone but rather a common base
|
|
# for all livecd images (installer, live, rescue)
|
|
|
|
ifndef GLOBAL_BUILDDIR
|
|
$(error GLOBAL_BUILDDIR not defined)
|
|
endif
|
|
|
|
default: all
|
|
|
|
include $(GLOBAL_BUILDDIR)/distcfg.mk
|
|
include $(GLOBAL_BUILDDIR)/functions.mk
|
|
include $(MKIMAGE_PREFIX)/config.mk
|
|
|
|
# this might have been prepared by ../stage1/scripts.d/03-test-kernel
|
|
-include $(GLOBAL_BUILDDIR)/squashcfg.mk
|
|
|
|
# this should be brought in by corresponding specific stage2 feature
|
|
include stage2cfg.mk
|
|
|
|
# requisite stuff
|
|
IMAGE_PACKAGES += $(SYSTEM_PACKAGES)
|
|
|
|
# here we also try and come up with the stage1 kernel/modules, if any;
|
|
# no kernel flavour specified will result in no modules for stage1 vmlinuz
|
|
STAGE1_KFLAVOUR ?= $(lastword $(KFLAVOURS))
|
|
|
|
ifeq (,$(STAGE1_KFLAVOUR))
|
|
$(error STAGE1_KFLAVOUR is utterly empty; cannot guess either)
|
|
endif
|
|
|
|
# need kernel modules only (which require corresponding kernel-image);
|
|
# these go into work chroot; NB: no vmlinuz there
|
|
IMAGE_PACKAGES_REGEXP = $(call kpackages,$(STAGE1_KMODULES),$(STAGE1_KFLAVOUR))
|
|
|
|
include $(MKIMAGE_PREFIX)/targets.mk
|
|
|
|
# NB: it's a collector variable, add()ing to a GLOBAL_ results in lost hair
|
|
GLOBAL_CLEANUP_PACKAGES := $(CLEANUP_PACKAGES)
|
|
|
|
all: | $(GLOBAL_DEBUG) build-image run-image-scripts pack-image \
|
|
$(GLOBAL_CLEAN_WORKDIR)
|
|
|
|
# dummy
|
|
debug: ;
|