mkimage-profiles/distro.mk
Michael Shigorin 3f012958dc server-ovz; KDEFAULT; syslinux features reworked
Renamed server-light.iso into server-ovz.iso to avoid brand dilution
and confusion (rider@'s server-light rather favours kvm, anyways).

Introduced KDEFAULT: a reliable default kernel chooser knob
since apt's regex ordering proved pretty unreliable.
Spelling things explicitly is better anyways.

SYSLINUX related features undergone pretty major rewrite
(that includes syslinux, hdt and memtest).

The problem to tackle was features.in/syslinux/generate.mk
assuming syslinux and pciids available in build *host* system;
this well might not be the case (or worse yet, those can be
just different).  So now we're a bit less elegant and a bit
more enterprise, stuffing things into chroot and working there.

Bunch of other fixes along the road, including ; to name a few:
- fixed memtest entry (overlooked while renaming SYSLINUX_ITEMS)
- new and shiny doc/CodingStyle
- gfxboot, stage1 target chain, hdt tweaks
- distro.mk rehashed
- README++
- TODO: dropped (integer overflow anyways)
  + actually moved off-tree to reduce commit spam
- s,\.config\.mk,distcfg.mk,g
- doc/profiles.mk.sample: sample ~/.mkimage/profiles.mk
- ...and assorted fixups/additions

Sorry for convoluted commit, this would have been pretty hard to
rework into some really readable shape (and you might be interested
in the original repo's history horrors then, anyways).
2011-11-04 16:15:29 +02:00

66 lines
2.3 KiB
Makefile

# this makefile is designed to be included in toplevel one
ifdef BUILDDIR
# step 2: build up distribution's configuration
# NB: distro/ targets should be defined in this file,
# see toplevel Makefile's $(DISTROS) assignment
CONFIG = $(BUILDDIR)/distcfg.mk
# collect use/% (source initial feature snippets)
-include features.in/*/config.mk
# put(), add(), set(), try(), tags():
# package list names are considered relative to pkg/lists/;
# tags can do boolean expressions: (tag1 && !(tag2 || tag3))
include functions.mk
# distro/.%, sub/.%, boot/%
include libdistro.mk
# bootloader test target; requires recent mkimage to build
distro/syslinux: distro/.init distro/.branding sub/stage1 \
use/syslinux use/syslinux/localboot.cfg \
use/syslinux/ui-gfxboot use/hdt use/memtest
# $(VAR) will be substituted before writing them to $(CONFIG);
# $$(VAR) will remain unsubstituted util $(CONFIG) is included
# and their value requested (so the variable referenced
# can change its value during configuration _before_
# it's actually used); just peek inside $(CONFIG) ;-)
# something actually useful (as a network-only installer)
distro/installer: distro/.base use/installer
@$(call set,INSTALLER,server-light)
# BASE_LISTS, DISK_LISTS, MAIN_PACKAGES: see sub.in/main/
distro/server-base: distro/installer sub/main use/syslinux/ui-menu use/memtest
@$(call add,BASE_LISTS,server-base)
# STAGE1_KFLAVOUR is the one for installer
# KDEFAULT is for the installed system
# both of these default to the last KFLAVOURS item if not set
distro/server-ovz: distro/server-base use/hdt
@$(call set,STAGE1_KFLAVOUR,std-def)
@$(call set,KFLAVOURS,std-def ovz-el)
@$(call set,KDEFAULT,ovz-el)
@$(call set,STAGE1_KMODULES_REGEXP,drm.*)
@$(call add,KMODULES,igb ipset kvm ndiswrapper pf_ring rtl8192 xtables-addons)
@$(call add,DISK_LISTS,kernel-wifi)
@$(call add,BASE_LISTS,ovz-server)
@$(call add,BASE_LISTS,$(call tags,base server))
@$(call add,GROUPS,dns-server http-server ftp-server kvm-server)
@$(call add,GROUPS,ipmi mysql-server dhcp-server mail-server)
@$(call add,GROUPS,monitoring diag-tools)
distro/minicd: distro/server-base
@$(call set,KFLAVOURS,un-def) # we might need the most recent drivers
@$(call add,MAIN_PACKAGES,etcnet-full)
# if there are too many screens above, it might make sense to distro.d/
else
$(error BUILDDIR not defined)
endif