2011-10-06 12:46:31 +04:00
# stage 4: dive into mkimage
2010-12-03 17:53:02 +03:00
2011-10-06 12:46:31 +04:00
GLOBAL_BUILDDIR ?= $( shell pwd )
2011-10-21 20:17:57 +04:00
LINKPREFIX := mkimage-profiles
2011-06-12 19:06:36 +04:00
2011-10-06 12:46:31 +04:00
i n c l u d e d i s t c f g . m k
2010-08-28 20:28:42 +04:00
i n c l u d e f u n c t i o n s . m k
2010-09-27 23:02:57 +04:00
i n c l u d e $( MKIMAGE_PREFIX ) / c o n f i g . m k
2010-08-28 20:28:42 +04:00
2011-10-06 12:46:31 +04:00
# reconstruct instead of passing yet another variable
IMAGE_FILE := $( IMAGE_NAME) .$( IMAGE_TYPE)
IMAGE_OUTFILE := $( IMAGE_NAME) -$( DATE) -$( ARCH) .$( IMAGE_TYPE)
MKI_PACK_RESULTS = $( IMAGE_PACKTYPE) :$( IMAGE_OUTFILE)
2010-08-28 20:28:42 +04:00
2011-10-06 12:46:31 +04:00
# these get opied over as is
2010-09-09 13:50:29 +04:00
COPY_TREE = ./files
2010-08-28 20:28:42 +04:00
2011-05-11 23:40:47 +04:00
# outdir shouldn't be wiped clean before use
2011-06-14 18:25:55 +04:00
CLEANUP_OUTDIR ?=
2011-05-11 23:40:47 +04:00
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-05-31 02:05:33 +04:00
APTCONF := $( wildcard $( APTCONF) )
2011-10-06 12:46:31 +04:00
i f e q ( , $( APTCONF ) )
2010-09-27 23:02:57 +04:00
GLOBAL_HSH_APT_CONFIG = /etc/apt/apt.conf
e l s e
GLOBAL_HSH_APT_CONFIG = $( APTCONF)
e n d i f
2011-10-06 12:46:31 +04:00
# the lib/build-*.mk comes from features.in/build-*/lib
i n c l u d e l i b / * . m k
2010-09-08 16:47:06 +04:00
i n c l u d e $( MKIMAGE_PREFIX ) / t a r g e t s . m k
2010-08-28 20:28:42 +04:00
2011-10-06 12:46:31 +04:00
# specified only for the final image (target-specific)
pack-image : OUTDIR = $( IMAGEDIR )
pack-image : $( IMAGEDIR )
2011-07-15 01:00:46 +04:00
2011-05-11 23:40:47 +04:00
$(IMAGEDIR) :
2011-09-03 13:34:53 +04:00
@mkdir -p " $( IMAGEDIR) "
2011-05-11 23:40:47 +04:00
2011-10-06 12:46:31 +04:00
postprocess :
@OUTPATH= " $( IMAGEDIR) / $( IMAGE_OUTFILE) " ; \
echo " ** image: $( IMAGE_OUTFILE) " && \
ln -sf " $( IMAGE_OUTFILE) " " $( IMAGEDIR) / $( IMAGE_FILE) " && \
2011-10-21 20:17:57 +04:00
ln -sf " $( IMAGE_FILE) " " $( IMAGEDIR) / $( LINKPREFIX) . $( IMAGE_TYPE) " ; \
ln -sf " $$ OUTPATH " " $( IMAGE_FILE) " ; \
2011-10-06 12:46:31 +04:00
if [ -n " $( GLOBAL_DEBUG) " ] ; then \
cp -a build.log " $$ OUTPATH.log " ; \
cp -a distcfg.mk " $$ OUTPATH.cfg " ; \
fi
2010-09-27 23:02:57 +04:00
debug :
2011-06-14 18:25:55 +04:00
@echo " TOPDIR= $( TOPDIR) "
@echo " ARCH= $( ARCH) "
@echo " GLOBAL_HSH_APT_CONFIG= $( GLOBAL_HSH_APT_CONFIG) "