prepare for multiple live images

s,INSTALLER_KFLAVOUR,STAGE1_KFLAVOUR,g
s,INSTALLER_KMODULES,STAGE1_KMODULES,g

install2 isn't the only livecd around;
so far all of these share the same kernel
in m-p-d, and we'd rather need two+ kernels
with dual-arch media or so; let's not complicate
things too much at this point
This commit is contained in:
Michael Shigorin 2011-08-18 18:18:46 +03:00
parent 878abab5ce
commit 5569b4fce1
6 changed files with 18 additions and 18 deletions

View File

@ -35,7 +35,7 @@ distro/syslinux: distro/.init distro/.branding sub/stage1 \
# something actually useful (as a network-only installer)
distro/installer: distro/.base use/installer
@$(call set,INSTALLER,altlinux-generic)
@$(call set,INSTALLER_KMODULES_REGEXP,drm.*) # for KMS
@$(call set,STAGE1_KMODULES_REGEXP,drm.*) # for KMS
# server distributions
@ -43,7 +43,7 @@ distro/server-base: distro/installer sub/main use/syslinux/ui-menu use/memtest
@$(call add,BASE_LISTS,server-base)
distro/server-ovz: distro/server-base use/hdt use/firmware/server
@$(call set,INSTALLER_KFLAVOUR,std-def)
@$(call set,STAGE1_KFLAVOUR,std-def)
@$(call set,KFLAVOURS,std-def ovz-el)
@$(call add,KMODULES,bcmwl e1000e igb ndiswrapper rtl8168 rtl8192)
@$(call add,KMODULES,ipset ipt-netflow opendpi pf_ring xtables-addons)

View File

@ -1,9 +1,9 @@
#!/bin/sh
# symlink default kernel iff requested but not yet done
INSTALLER_KFLAVOUR="$INFO_INSTALLER_KFLAVOUR"
STAGE1_KFLAVOUR="$INFO_STAGE1_KFLAVOUR"
if [ -n "$GLOBAL_VERBOSE" ]; then
echo "** INSTALLER_KFLAVOUR: $INSTALLER_KFLAVOUR"
echo "** STAGE1_KFLAVOUR: $STAGE1_KFLAVOUR"
fi
# kernel-image in instrumental chroot
@ -16,8 +16,8 @@ if [ -L "$VMLINK" ]; then
echo "** $VMLINK -> $(readlink "$VMLINK")"
fi
if [ -n "$INSTALLER_KFLAVOUR" ]; then
VMLINUZ="$(cd /boot; echo vmlinuz-*-$INSTALLER_KFLAVOUR-*)"
if [ -n "$STAGE1_KFLAVOUR" ]; then
VMLINUZ="$(cd /boot; echo vmlinuz-*-$STAGE1_KFLAVOUR-*)"
if [ -n "$VMLINUZ" ]; then
ln -sf "$VMLINUZ" "$VMLINK"
echo "** overriding $VMLINK with $VMLINUZ"

View File

@ -36,7 +36,7 @@ all: $(GLOBAL_DEBUG) prep copy-subdirs copy-tree run-scripts pack-image \
$(GLOBAL_CLEAN_WORKDIR)
# Metadata/ needed only for installer (and not for e.g. syslinux.iso)
ifeq "$(INSTALLER_KFLAVOUR)$(KFLAVOURS)" ""
ifeq "$(STAGE1_KFLAVOUR)$(KFLAVOURS)" ""
metadata:
@echo "** skipping metadata target, no stage1 kernel installed"
else

View File

@ -15,15 +15,15 @@ include $(MKIMAGE_PREFIX)/config.mk
# here we also try and come up with the installer kernel/modules, if any;
# no kernel flavour specified will result in no modules for stage1 vmlinuz
INSTALLER_KFLAVOUR ?= $(lastword $(KFLAVOURS))
STAGE1_KFLAVOUR ?= $(lastword $(KFLAVOURS))
ifeq "$(INSTALLER_KFLAVOUR)" ""
$(error INSTALLER_KFLAVOUR is utterly empty; cannot guess either)
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,$(INSTALLER_KMODULES),$(INSTALLER_KFLAVOUR))
IMAGE_PACKAGES_REGEXP = $(call kpackages,$(STAGE1_KMODULES),$(STAGE1_KFLAVOUR))
IMAGE_PACKAGES = $(COMMON_PACKAGES) \
$(INSTALL2_PACKAGES) \
./packages

View File

@ -21,18 +21,18 @@ COPY_TREE = ./files
include $(MKIMAGE_PREFIX)/targets.mk
# here we try and come up with the installer kernel/modules, if any;
# only a single kernel might be needed (INSTALLER_KFLAVOUR sets explicitly);
# only a single kernel might be needed (STAGE1_KFLAVOUR sets explicitly);
# kernel image copied from instrumental chroot into .work/syslinux/alt0/
INSTALLER_KFLAVOUR ?= $(lastword $(KFLAVOURS))
STAGE1_KFLAVOUR ?= $(lastword $(KFLAVOURS))
# propagator needed iff stage1 kernel installed (not for e.g. syslinux.iso)
ifeq "$(INSTALLER_KFLAVOUR)" ""
ifeq "$(STAGE1_KFLAVOUR)" ""
build-propagator:
@echo "** skipping build-propagator target, no kernel installed"
else
CHROOT_PACKAGES_REGEXP := $(call kpackages,$(INSTALLER_KMODULES_REGEXP),$(INSTALLER_KFLAVOUR))
INFO_INSTALLER_KFLAVOUR := $(INSTALLER_KFLAVOUR)
CHROOT_PACKAGES_REGEXP := $(call kpackages,$(STAGE1_KMODULES_REGEXP),$(STAGE1_KFLAVOUR))
INFO_STAGE1_KFLAVOUR := $(STAGE1_KFLAVOUR)
endif
CHROOT_PACKAGES_REGEXP += $(STAGE1_PACKAGES_REGEXP)

View File

@ -7,10 +7,10 @@
к составу STAGE1_PACKAGES и объёму этой стадии.
Обратите внимание: если не указать явно требуемый вариант
ядра посредством INSTALLER_KFLAVOUR, будет взят последний
ядра посредством STAGE1_KFLAVOUR, будет взят последний
из перечисленных в KFLAVOURS; если не указать явно регэкс,
описывающий требуемые в инсталяторе модули, посредством
INSTALLER_KMODULES_REGEXP -- будет подмножество модулей
STAGE1_KMODULES_REGEXP -- будет подмножество модулей
из kernel-image (упаковываются в syslinux/alt0/full.cz).
Требуется для инсталяционных, live- и rescue-образов.