diff options
Diffstat (limited to 'release/Makefile')
-rw-r--r-- | release/Makefile | 39 |
1 files changed, 29 insertions, 10 deletions
diff --git a/release/Makefile b/release/Makefile index 1b9b506..56de4fe 100644 --- a/release/Makefile +++ b/release/Makefile @@ -173,6 +173,16 @@ ARCH_DISTS?= lib32 .endif DISTRIBUTIONS?= ${BASE_DISTS} ${OTHER_DISTS} +# +# Build and package both GENERIC and SMP kernels if the target +# has both configuration files. Otherwise only GENERIC is done. +# +.if !exists(${.CURDIR}/../sys/${TARGET}/conf/SMP) +KERNELS?= GENERIC +.else +KERNELS?= GENERIC SMP +.endif + # mountpoint for filesystems. MNT= /mnt @@ -567,7 +577,6 @@ release.1: mkdir ${RD}/floppies .endif mkdir ${RD}/trees - mkdir ${RD}/kernels for i in ${DISTRIBUTIONS}; do \ mkdir ${RD}/trees/$$i && \ mtree -deU -f ${MTREEFILES}/BSD.root.dist \ @@ -579,6 +588,10 @@ release.1: mtree -deU -f ${MTREEFILES}/BSD.var.dist \ -p ${RD}/trees/$$i/var > /dev/null ; \ done + mkdir ${RD}/kernels + for i in ${KERNELS}; do \ + mkdir ${RD}/kernels/$${i}; \ + done touch ${.TARGET} # Install the system into the various distributions. @@ -592,15 +605,10 @@ release.2: release.3: .for kernel in ${KERNELS} cd ${.CURDIR}/..; \ - ${CROSSMAKE} ${KERNEL_FLAGS} -DNO_MODULES \ - KERNCONF=${kernel} INSTKERNNAME=${kernel} kernel \ - DESTDIR=${RD}/trees/base -.endfor - # Install a standard boot kernel+modules. - cd ${.CURDIR}/..; \ ${CROSSMAKE} ${KERNEL_FLAGS} \ - kernel \ - DESTDIR=${RD}/trees/base + KERNCONF=${kernel} kernel \ + DESTDIR=${RD}/kernels KODIR=/${kernel} +.endfor touch ${.TARGET} # Make and install the three crunched binaries which live on the floppies. @@ -658,6 +666,15 @@ release.6: echo "$${i} distribution is finished."; \ fi ; \ done + @for i in ${KERNELS} ; \ + do \ + if [ -d ${RD}/kernels/$${i} ] ; then \ + cd ${.CURDIR} && $(MAKE) doTARBALL \ + SD=${RD}/kernels \ + TN=$$i TD=kernels ARG="$$i" && \ + echo "$${i} distribution is finished."; \ + fi ; \ + done .if !defined(NOPORTS) # XXX: Inline stripped version of doTARBALL @rm -rf ${RD}/dists/ports/ports* @@ -789,7 +806,7 @@ SMALLMFSROOTFLOPPYSET= ${RD}/floppyset/mfsroot-small/mfsroot.gz # Build boot and install floppies. floppies.1: - @gzip -9nc ${RD}/trees/base/boot/kernel/kernel > ${RD}/kernels/kernel.gz + @gzip -9nc ${RD}/kernels/GENERIC/kernel > ${RD}/kernels/kernel.gz @echo "Making the kernel boot floppies..." @cd ${.CURDIR} && ${MAKE} makeFloppySet FLOPPYBASE=kern \ FLOPPYDESC="Kernel" SPLITFILE=${RD}/kernels/kernel.gz @@ -919,6 +936,8 @@ cdrom.1: find . -depth -print | cpio -dumpl ${CD_LIVEFS} ) ; \ fi \ done + @echo "Copy GENERIC kernel to boot area" + @cp -Rp ${RD}/kernels/GENERIC/ ${CD_LIVEFS}/boot/kernel @rm -f ${CD_LIVEFS}/.profile @cp ${.CURDIR}/fixit.profile ${CD_LIVEFS}/.profile @ln -sf /rescue ${CD_LIVEFS}/stand |