Commit a36d0236 authored by Michael Shigorin's avatar Michael Shigorin

stage1, stage2: initial modlists support

stage1's got prepare-modules target collecting modules file snippets all over stage1/modules.d/ subdirectories within individual features. stage2 now adds names of all the features going into a particular image as snippet file suffix list so that individual features don't have to register themselves twice (as a feature and as a propagator modules.d snippet carrier). This is going to allow both "uncommon" modules getting included with no problem (sin@ has wanted cifs ones for quite some time, for example, and some want e.g. infiniband modules) *and* to reduce the actual list below the common mark as well (which is the case with live-privacy image, for one). And stage1 memory consumption does matter in some cases as it's highly critical with no chance to use swap yet.
parent a2fbe511
......@@ -2,6 +2,7 @@
use/stage2: sub/stage1
@$(call add_feature)
@$(call add,STAGE1_PACKAGES,file make-initrd make-initrd-propagator propagator)
@$(call add,STAGE1_MODLISTS,$$(FEATURES))
@$(call xport,STAGE1_KCONFIG)
use/stage2/kms:
......
......@@ -33,7 +33,7 @@ ifneq "$(findstring stage2,$(SUBPROFILES))" "" ### assumes stage2 ~ propagator
PROPAGATOR_VERSION = ALT Linux
PROPAGATOR_MAR_MODULES = ./modules
PROPAGATOR_INITFS = ./initfs
BUILD_PROPAGATOR = build-propagator
BUILD_PROPAGATOR = prepare-modules build-propagator
endif
endif
......@@ -45,6 +45,10 @@ GLOBAL_SQUASHFS := $(SQUASHFS)
-include $(sort $(wildcard lib/*.mk))
prepare-modules:
@echo $(foreach V,$(STAGE1_MODLISTS),$(wildcard modules.d/??-$(V))) \
| xargs -r -- cat >> $(PROPAGATOR_MAR_MODULES)
# scripts prepare bootloader configuration, too
# NB: we pass tested squashfs options for sub.in/stage2/Makefile to include
all: | debug prepare-workdir copy-tree run-scripts $(BUILD_PROPAGATOR) \
......
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