2011-08-20 13:55:05 +04:00
# 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)
2011-08-18 23:56:12 +04:00
i f n d e f G L O B A L _ B U I L D D I R
$( error GLOBAL_BUILDDIR not defined )
e n d i f
default : all
i n c l u d e $( GLOBAL_BUILDDIR ) / d i s t c f g . m k
i n c l u d e $( GLOBAL_BUILDDIR ) / f u n c t i o n s . m k
i n c l u d e $( MKIMAGE_PREFIX ) / c o n f i g . m k
2014-03-05 18:09:56 +04:00
# this might have been prepared
# by features.in/stage2/stage1/scripts.d/03-test-kernel
2011-08-18 23:56:12 +04:00
- i n c l u d e $( GLOBAL_BUILDDIR ) / s q u a s h c f g . m k
2011-08-20 13:55:05 +04:00
# this should be brought in by corresponding specific stage2 feature
i n c l u d e s t a g e 2 c f g . m k
2011-09-03 13:34:53 +04:00
# requisite stuff
2012-06-13 23:07:10 +04:00
IMAGE_PACKAGES += $( SYSTEM_PACKAGES) $( STAGE2_PACKAGES)
2011-09-03 13:34:53 +04:00
2011-08-18 23:56:12 +04:00
# 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) )
2011-10-06 12:46:31 +04:00
i f e q ( , $( STAGE 1_KFLAVOUR ) )
2011-08-18 23:56:12 +04:00
$( error STAGE 1_KFLAVOUR is utterly empty ; cannot guess either )
e n d i f
# need kernel modules only (which require corresponding kernel-image);
2012-04-06 23:26:54 +04:00
# these go into work chroot; NB: no vmlinuz there (unless live-install)
2012-04-10 19:14:01 +04:00
IMAGE_PACKAGES_REGEXP += $( call kpackages, \
2014-09-18 20:08:08 +04:00
$( STAGE1_KFLAVOUR) , \
2012-06-13 23:07:10 +04:00
$( STAGE1_KMODULES) $( STAGE1_KMODULES_REGEXP) \
2014-09-18 20:08:08 +04:00
$( STAGE2_KMODULES) $( STAGE2_KMODULES_REGEXP) )
2011-08-18 23:56:12 +04:00
2012-10-10 17:18:32 +04:00
- i n c l u d e $( sort $ ( wildcard lib /*.mk ) )
2012-04-25 15:08:36 +04:00
2014-03-05 18:09:56 +04:00
# see also ./scripts.d/99-elf-stats
2012-04-06 23:26:54 +04:00
i f d e f G L O B A L _ S Q U A S H F S _ S O R T
i f e q ( t i g h t , $( SQUASHFS ) )
CHROOT_PACKAGES += file
pack-image : PACK_SQUASHFS_OPTS += -sort /.our /elf .lst
pack-image : CLEANUP_OUTDIR =
e n d i f
e n d i f
GLOBAL_SQUASHFS := $( SQUASHFS)
2011-08-18 23:56:12 +04:00
i n c l u d e $( MKIMAGE_PREFIX ) / t a r g e t s . m k
2011-09-13 20:39:31 +04:00
# NB: it's a collector variable, add()ing to a GLOBAL_ results in lost hair
GLOBAL_CLEANUP_PACKAGES := $( CLEANUP_PACKAGES)
2012-04-06 23:26:54 +04:00
all : | $( GLOBAL_DEBUG ) \
build-image run-image-scripts run-scripts pack-image \
2011-08-18 23:56:12 +04:00
$( GLOBAL_CLEAN_WORKDIR)
2011-09-13 20:39:31 +04:00
# dummy
2011-10-23 00:02:22 +04:00
debug :: ;