``build.sh -m xen-i386 release'' now builds a release for NetBSD/xen

for i386.  The resulting release consists of:
- NetBSD/xen for i386 kernel, loader and docuemntation
- NetBSD/i386 userland sets
This commit is contained in:
cl 2004-05-12 16:56:41 +00:00
parent b174c24825
commit 885c0b6fc9
25 changed files with 208 additions and 49 deletions

View File

@ -1,5 +1,5 @@
#! /usr/bin/env sh #! /usr/bin/env sh
# $NetBSD: build.sh,v 1.127 2004/02/06 23:19:30 lukem Exp $ # $NetBSD: build.sh,v 1.128 2004/05/12 16:56:41 cl Exp $
# #
# Copyright (c) 2001-2004 The NetBSD Foundation, Inc. # Copyright (c) 2001-2004 The NetBSD Foundation, Inc.
# All rights reserved. # All rights reserved.
@ -212,6 +212,19 @@ getarch()
MACHINE_ARCH=x86_64 MACHINE_ARCH=x86_64
;; ;;
xen-*)
setmakeenv XEN_BUILD "${MACHINE##*-}"
setmakeenv KERNARCHDIR "arch/xen"
setmakeenv RELEASEMACHINE "xen"
setmakeenv RELEASEMACHINEDIR "${MACHINE}"
makewrappermachine=${MACHINE}
MACHINE=${MACHINE##*-}
getarch
;;
xen) # no default MACHINE_ARCH
;;
alpha|i386|sparc|sparc64|vax) alpha|i386|sparc|sparc64|vax)
MACHINE_ARCH=${MACHINE} MACHINE_ARCH=${MACHINE}
;; ;;
@ -842,7 +855,7 @@ createmakewrapper()
eval cat <<EOF ${makewrapout} eval cat <<EOF ${makewrapout}
#! /bin/sh #! /bin/sh
# Set proper variables to allow easy "make" building of a NetBSD subtree. # Set proper variables to allow easy "make" building of a NetBSD subtree.
# Generated from: \$NetBSD: build.sh,v 1.127 2004/02/06 23:19:30 lukem Exp $ # Generated from: \$NetBSD: build.sh,v 1.128 2004/05/12 16:56:41 cl Exp $
# #
EOF EOF

View File

@ -1,4 +1,6 @@
# $NetBSD: Makefile,v 1.12 2004/04/25 06:19:49 christos Exp $ # $NetBSD: Makefile,v 1.13 2004/05/12 16:56:41 cl Exp $
.include <bsd.own.mk>
SUBDIR= notes .WAIT SUBDIR= notes .WAIT
@ -6,8 +8,8 @@ SUBDIR= notes .WAIT
SUBDIR+= miniroot .WAIT SUBDIR+= miniroot .WAIT
.endif .endif
.if exists(${MACHINE}/Makefile) .if exists(${RELEASEMACHINE}/Makefile)
SUBDIR+= ${MACHINE} SUBDIR+= ${RELEASEMACHINE}
.endif .endif
.if make(obj) .if make(obj)

View File

@ -1,11 +1,13 @@
# $NetBSD: Makefile,v 1.32 2003/10/10 23:51:46 mbw Exp $ # $NetBSD: Makefile,v 1.33 2004/05/12 16:56:41 cl Exp $
# #
.include <bsd.own.mk>
TARGETS+= release TARGETS+= release
.ifndef ALLNOTES .ifndef ALLNOTES
.if exists(${MACHINE}/Makefile) .if exists(${RELEASEMACHINE}/Makefile)
SUBDIR= ${MACHINE} SUBDIR= ${RELEASEMACHINE}
.endif .endif
.else .else
SUBDIR+= acorn26 SUBDIR+= acorn26
@ -41,6 +43,7 @@ SUBDIR+= sun2
SUBDIR+= sun3 SUBDIR+= sun3
SUBDIR+= vax SUBDIR+= vax
SUBDIR+= x68k SUBDIR+= x68k
SUBDIR+= xen
.endif .endif
.include <bsd.subdir.mk> .include <bsd.subdir.mk>

View File

@ -0,0 +1,8 @@
# $NetBSD: Makefile,v 1.1 2004/05/12 16:56:41 cl Exp $
MACHINE:= xen-${MACHINE}
M= ${MACHINE}
MERGED_SRCS+= ${COMMON}/xfer
.include <bsd.man.mk>

View File

View File

0
distrib/notes/xen/legal Normal file
View File

0
distrib/notes/xen/prep Normal file
View File

View File

@ -0,0 +1,2 @@
This is the 1st release of
.Nx*M .

0
distrib/notes/xen/whatis Normal file
View File

0
distrib/notes/xen/xfer Normal file
View File

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.45 2004/04/20 06:36:34 lukem Exp $ # $NetBSD: Makefile,v 1.46 2004/05/12 16:56:41 cl Exp $
# The `all' target must appear before bsd.own.mk is pulled in. # The `all' target must appear before bsd.own.mk is pulled in.
all: all:
@ -59,7 +59,7 @@ makeflist: .PHONY .PRECIOUS check_DESTDIR
# SET BUILDING TARGETS # SET BUILDING TARGETS
# #
TARDIR= ${RELEASEDIR}/${MACHINE}/binary/sets TARDIR= ${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/sets
SOURCETARDIR= ${RELEASEDIR}/source/sets SOURCETARDIR= ${RELEASEDIR}/source/sets
.if ${MKUNPRIVED} == "no" .if ${MKUNPRIVED} == "no"

5
distrib/xen/Makefile Normal file
View File

@ -0,0 +1,5 @@
# $NetBSD: Makefile,v 1.1 2004/05/12 16:56:41 cl Exp $
TARGETS+= release
.include <bsd.subdir.mk>

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.285 2004/04/13 12:43:12 lukem Exp $ # $NetBSD: Makefile,v 1.286 2004/05/12 16:56:41 cl Exp $
# from: @(#)Makefile 8.7 (Berkeley) 5/25/95 # from: @(#)Makefile 8.7 (Berkeley) 5/25/95
# Environment variables without default values: # Environment variables without default values:
@ -27,7 +27,7 @@
# distrib-dirs: creates an empty NetBSD directory tree in DESTDIR. # distrib-dirs: creates an empty NetBSD directory tree in DESTDIR.
# Called by distribution. # Called by distribution.
# snapshot: calls distribution, above, and then tars up the files # snapshot: calls distribution, above, and then tars up the files
# into a release(7) format in RELEASEDIR/${MACHINE}. # into a release(7) format in RELEASEDIR/${RELEASEMACHINEDIR}.
# Any port-dependent stuff for this target is found in # Any port-dependent stuff for this target is found in
# etc.${MACHINE}/Makefile.inc. # etc.${MACHINE}/Makefile.inc.
# release: a synonym for `snapshot' # release: a synonym for `snapshot'
@ -61,7 +61,7 @@ MKISOFS_FLAGS+= -J -l \
-r -T -v \ -r -T -v \
-V ${ISO_VOLID} \ -V ${ISO_VOLID} \
-P "The NetBSD Project" \ -P "The NetBSD Project" \
-m "${RELEASEDIR}/${MACHINE}/installation/cdrom" -m "${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/cdrom"
# MD Makefile.inc may append MD targets to BIN[123]. Make sure all # MD Makefile.inc may append MD targets to BIN[123]. Make sure all
# are empty, to preserve the old semantics of setting them below with "=". # are empty, to preserve the old semantics of setting them below with "=".
@ -70,14 +70,14 @@ BIN1=
BIN2= BIN2=
BIN3= BIN3=
# Directories to build in ${RELEASEDIR}/${MACHINE}. # Directories to build in ${RELEASEDIR}/${RELEASEMACHINEDIR}.
# MD Makefile.inc files can add to this. # MD Makefile.inc files can add to this.
# NOTE: Parent directories must be listed before subdirectories. # NOTE: Parent directories must be listed before subdirectories.
# #
INSTALLATION_DIRS= binary binary/sets binary/kernel installation INSTALLATION_DIRS= binary binary/sets binary/kernel installation
.if exists(etc.${MACHINE}/Makefile.inc) .if exists(etc.${RELEASEMACHINE}/Makefile.inc)
.include "etc.${MACHINE}/Makefile.inc" .include "etc.${RELEASEMACHINE}/Makefile.inc"
.endif .endif
# -rw-r--r-- # -rw-r--r--
@ -388,7 +388,7 @@ release snapshot: .PHONY check_DESTDIR check_RELEASEDIR .WAIT \
snap_pre .WAIT snap_kern .WAIT \ snap_pre .WAIT snap_kern .WAIT \
snap_post .WAIT snap_md_post snap_post .WAIT snap_md_post
${MAKEDIRTARGET} ${NETBSDSRCDIR}/distrib/sets sets ${MAKEDIRTARGET} ${NETBSDSRCDIR}/distrib/sets sets
${MAKESUMS} -t ${RELEASEDIR}/${MACHINE}/binary/kernel '*.gz' ${MAKESUMS} -t ${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/kernel '*.gz'
# iso-image -- # iso-image --
@ -397,19 +397,19 @@ release snapshot: .PHONY check_DESTDIR check_RELEASEDIR .WAIT \
# #
# Note: At least mkisofs 2.0 should be used. # Note: At least mkisofs 2.0 should be used.
# #
CDROM.image=${RELEASEDIR}/${MACHINE}/installation/cdrom/netbsd-${MACHINE}.iso CDROM.image=${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/cdrom/netbsd-${MACHINE}.iso
CDROM.dir= cdrom.dir CDROM.dir= cdrom.dir
CDROM.pathlist= cdrom.pathlist CDROM.pathlist= cdrom.pathlist
iso-image: .PHONY check_DESTDIR check_RELEASEDIR .WAIT iso-image-md-post iso-image: .PHONY check_DESTDIR check_RELEASEDIR .WAIT iso-image-md-post
${MAKESUMS} -t ${RELEASEDIR}/${MACHINE}/installation/cdrom '*.iso' ${MAKESUMS} -t ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/cdrom '*.iso'
@echo "iso-image created as: ${CDROM.image}" @echo "iso-image created as: ${CDROM.image}"
iso-image-setup: .PHONY check_RELEASEDIR iso-image-setup: .PHONY check_RELEASEDIR
rm -f ${CDROM.pathlist} rm -f ${CDROM.pathlist}
echo "${MACHINE}=${RELEASEDIR}/${MACHINE}" >> ${CDROM.pathlist} echo "${MACHINE}=${RELEASEDIR}/${RELEASEMACHINEDIR}" >> ${CDROM.pathlist}
mkdir -p ${CDROM.dir} mkdir -p ${CDROM.dir}
mkdir -p ${RELEASEDIR}/${MACHINE}/installation/cdrom mkdir -p ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/cdrom
# iso-image-mi -- # iso-image-mi --
# Create the image after the MD operations have completed. # Create the image after the MD operations have completed.
@ -445,11 +445,11 @@ snap_pre: .PHONY check_DESTDIR check_RELEASEDIR
${INSTALL} -d -m 755 ${RELEASEDIR} ${INSTALL} -d -m 755 ${RELEASEDIR}
.if ${MKUPDATE} == "no" .if ${MKUPDATE} == "no"
# Could be a mount point, ignore the errors # Could be a mount point, ignore the errors
-/bin/rm -rf ${RELEASEDIR}/${MACHINE} -/bin/rm -rf ${RELEASEDIR}/${RELEASEMACHINEDIR}
.endif .endif
${INSTALL} -d -m 755 ${RELEASEDIR}/${MACHINE} ${INSTALL} -d -m 755 ${RELEASEDIR}/${RELEASEMACHINEDIR}
.for dir in ${INSTALLATION_DIRS} .for dir in ${INSTALLATION_DIRS}
${INSTALL} -d -m 755 ${RELEASEDIR}/${MACHINE}/${dir} ${INSTALL} -d -m 755 ${RELEASEDIR}/${RELEASEMACHINEDIR}/${dir}
.endfor .endfor
# snap_post -- # snap_post --
@ -529,7 +529,7 @@ build_kernels: .PHONY ${_KERNELS_TO_BUILD}
# build_kernelsets -- # build_kernelsets --
# Create kernel sets from ${KERNEL_SETS} into # Create kernel sets from ${KERNEL_SETS} into
# ${RELEASEDIR}/${MACHINE}/binary/sets # ${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/sets
# #
.for configfile in ${KERNEL_SETS} # { .for configfile in ${KERNEL_SETS} # {
_KERNELSETS_TO_BUILD+=kernset-${configfile} _KERNELSETS_TO_BUILD+=kernset-${configfile}
@ -537,7 +537,7 @@ kernset-${configfile}: .PHONY
@ kernlist=`${GETKERNELAWK} ${KERNCONFDIR}/${configfile}`; \ @ kernlist=`${GETKERNELAWK} ${KERNCONFDIR}/${configfile}`; \
kerndir=${KERNOBJDIR}/${configfile:C/.*\///}; \ kerndir=${KERNOBJDIR}/${configfile:C/.*\///}; \
kernsuffixes="${KERNEL_SUFFIXES:S/^/./}"; \ kernsuffixes="${KERNEL_SUFFIXES:S/^/./}"; \
kern_tgz=${RELEASEDIR}/${MACHINE}/binary/sets/kern-${configfile}.tgz; \ kern_tgz=${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/sets/kern-${configfile}.tgz; \
pax_cmd="GZIP=-9 ${TOOL_PAX} -O -zw -M -N ${NETBSDSRCDIR}/etc -f $${kern_tgz}"; \ pax_cmd="GZIP=-9 ${TOOL_PAX} -O -zw -M -N ${NETBSDSRCDIR}/etc -f $${kern_tgz}"; \
cd $${kerndir} && { \ cd $${kerndir} && { \
kernels=; newest=; \ kernels=; newest=; \
@ -565,7 +565,7 @@ build_kernelsets: ${_KERNELSETS_TO_BUILD}
# build_releasekernels -- # build_releasekernels --
# Build kernel.gz from ${KERNEL_SETS} ${EXTRA_KERNELS} into # Build kernel.gz from ${KERNEL_SETS} ${EXTRA_KERNELS} into
# ${RELEASEDIR}/${MACHINE}/binary/kernel # ${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/kernel
# #
.for configfile in ${KERNEL_SETS} ${EXTRA_KERNELS} # { .for configfile in ${KERNEL_SETS} ${EXTRA_KERNELS} # {
_RELEASEKERNELS_TO_BUILD+=releasekern-${configfile} _RELEASEKERNELS_TO_BUILD+=releasekern-${configfile}
@ -578,7 +578,7 @@ releasekern-${configfile}: .PHONY
for s in "" $${kernsuffixes}; do \ for s in "" $${kernsuffixes}; do \
ks="$${kernel}$${s}"; \ ks="$${kernel}$${s}"; \
[ ! -f $${ks} ] && continue; \ [ ! -f $${ks} ] && continue; \
knl_gz="${RELEASEDIR}/${MACHINE}/binary/kernel/$${ks}-${configfile:C/.*\///}.gz"; \ knl_gz="${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/kernel/$${ks}-${configfile:C/.*\///}.gz"; \
[ $${knl_gz} -nt $${ks} ] && continue; \ [ $${knl_gz} -nt $${ks} ] && continue; \
echo "gzip -c -9 < $${kerndir}/$${ks} > $${knl_gz}"; \ echo "gzip -c -9 < $${kerndir}/$${ks} > $${knl_gz}"; \
gzip -c -9 < $${ks} > $${knl_gz}; \ gzip -c -9 < $${ks} > $${knl_gz}; \

18
etc/etc.xen/Makefile.inc Normal file
View File

@ -0,0 +1,18 @@
# $NetBSD: Makefile.inc,v 1.1 2004/05/12 16:56:43 cl Exp $
#
# etc.xen/Makefile.inc -- xen-specific etc Makefile targets
#
KERNEL_SETS=
EXTRA_KERNELS= GENERIC XEN
BUILD_KERNELS=
INSTALLATION_DIRS+= installation/xen12load
# xen specific distrib stuff
snap_md_post:
cd ${KERNSRCDIR}/arch/xen/stand/xen12load && ${MAKE} release
${MAKESUMS} -t \
${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/xen12load '*.*'

View File

@ -1,4 +1,4 @@
# $NetBSD: bsd.README,v 1.151 2004/04/18 13:07:00 lukem Exp $ # $NetBSD: bsd.README,v 1.152 2004/05/12 16:56:43 cl Exp $
# @(#)bsd.README 8.2 (Berkeley) 4/2/94 # @(#)bsd.README 8.2 (Berkeley) 4/2/94
This is the README file for the new make "include" files for the BSD This is the README file for the new make "include" files for the BSD
@ -433,6 +433,16 @@ MAKEDIRTARGET dir target [params]
Runs "cd $${dir} && ${MAKE} [params] $${target}", Runs "cd $${dir} && ${MAKE} [params] $${target}",
displaying a "pretty" message whilst doing so. displaying a "pretty" message whilst doing so.
RELEASEMACHINEDIR
Subdirectory used below RELEASEDIR when building
a release. [${MACHINE}]
RELEASEMACHINE Subdirectory or path component used for the following
paths:
distrib/${RELEASEMACHINE}
distrib/notes/${RELEASEMACHINE}
etc/etc.${RELEASEMACHINE}
Used when building a release. [${MACHINE}]
Additionally, the following variables may be set by <bsd.own.mk> or in a Additionally, the following variables may be set by <bsd.own.mk> or in a
make configuration file to modify the behaviour of the system build make configuration file to modify the behaviour of the system build

View File

@ -1,4 +1,4 @@
# $NetBSD: bsd.kmod.mk,v 1.74 2004/01/29 01:48:45 lukem Exp $ # $NetBSD: bsd.kmod.mk,v 1.75 2004/05/12 16:56:43 cl Exp $
.include <bsd.init.mk> .include <bsd.init.mk>
@ -41,6 +41,13 @@ CFLAGS+= -mcmodel=kernel
${MACHINE_CPU} == "arm" ${MACHINE_CPU} == "arm"
CLEANFILES+= ${KMOD}_tramp.o ${KMOD}_tramp.S tmp.S ${KMOD}_tmp.o CLEANFILES+= ${KMOD}_tramp.o ${KMOD}_tramp.S tmp.S ${KMOD}_tmp.o
.endif .endif
.if defined(XEN_BUILD) || ${MACHINE} == "xen"
CLEANFILES+= xen xen-ma/machine # xen-ma
CPPFLAGS+= -I${.OBJDIR}/xen-ma
.if ${MACHINE_CPU} == "i386"
CLEANFILES+= x86
.endif
.endif
OBJS+= ${SRCS:N*.h:N*.sh:R:S/$/.o/g} OBJS+= ${SRCS:N*.h:N*.sh:R:S/$/.o/g}
PROG?= ${KMOD}.o PROG?= ${KMOD}.o
@ -105,6 +112,12 @@ ${PROG}: ${OBJS} ${DPADD}
@rm -f x86 && \ @rm -f x86 && \
ln -s $S/arch/x86/include x86 ln -s $S/arch/x86/include x86
.endif .endif
.if defined(XEN_BUILD) || ${MACHINE} == "xen"
@rm -f xen && \
ln -s $S/arch/xen/include xen
@rm -rf xen-ma && mkdir xen-ma && \
ln -s $S/arch/${XEN_BUILD:U${MACHINE_ARCH}}/include xen-ma/machine
.endif
.endif .endif
##### Install rules ##### Install rules

View File

@ -1,4 +1,4 @@
# $NetBSD: bsd.own.mk,v 1.417 2004/05/12 13:49:01 lukem Exp $ # $NetBSD: bsd.own.mk,v 1.418 2004/05/12 16:56:43 cl Exp $
.if !defined(_BSD_OWN_MK_) .if !defined(_BSD_OWN_MK_)
_BSD_OWN_MK_=1 _BSD_OWN_MK_=1
@ -11,6 +11,20 @@ MAKECONF?= /etc/mk.conf
# #
MACHINE_CPU= ${MACHINE_ARCH:C/mipse[bl]/mips/:C/sh3e[bl]/sh3/:C/sh5e[bl]/sh5/:S/m68000/m68k/:S/armeb/arm/} MACHINE_CPU= ${MACHINE_ARCH:C/mipse[bl]/mips/:C/sh3e[bl]/sh3/:C/sh5e[bl]/sh5/:S/m68000/m68k/:S/armeb/arm/}
#
# Subdirectory used below ${RELEASEDIR} when building a release
#
RELEASEMACHINEDIR?= ${MACHINE}
#
# Subdirectory or path component used for the following paths:
# distrib/${RELEASEMACHINE}
# distrib/notes/${RELEASEMACHINE}
# etc/etc.${RELEASEMACHINE}
# Used when building a release.
#
RELEASEMACHINE?= ${MACHINE}
# #
# NEED_OWN_INSTALL_TARGET is set to "no" by pkgsrc/mk/bsd.pkg.mk to # NEED_OWN_INSTALL_TARGET is set to "no" by pkgsrc/mk/bsd.pkg.mk to
# ensure that things defined by <bsd.own.mk> (default targets, # ensure that things defined by <bsd.own.mk> (default targets,

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.26 2003/11/14 17:44:05 christos Exp $ # $NetBSD: Makefile,v 1.27 2004/05/12 16:56:43 cl Exp $
# For now, we install the machine and arch includes, and symlink 'machine' # For now, we install the machine and arch includes, and symlink 'machine'
# to the location of the machine includes (usually). # to the location of the machine includes (usually).
@ -24,6 +24,9 @@ SUBDIR+= hpc
.if (${MACHINE} == sun2 || ${MACHINE} == sun3) .if (${MACHINE} == sun2 || ${MACHINE} == sun3)
SUBDIR+= sun68k SUBDIR+= sun68k
.endif .endif
.if defined(XEN_BUILD)
SUBDIR+= xen
.endif
#SUBDIR=acorn26 acorn32 algor alpha amiga amigappc arm arc atari \ #SUBDIR=acorn26 acorn32 algor alpha amiga amigappc arm arc atari \
# bebox \ # bebox \

37
sys/arch/xen/Makefile Normal file
View File

@ -0,0 +1,37 @@
# $NetBSD: Makefile,v 1.1 2004/05/12 16:56:43 cl Exp $
# Makefile for xen tags file
.include "../../kern/Make.tags.inc"
.ifmake tags
.include "${SYSDIR}/arch/xen/conf/Makefile.arch.inc"
.endif
TXEN= ${SYSDIR}/arch/xen/tags
SXEN!= awk '($$2 ~ /^arch.*\.[c]$$/) {print "${SYSDIR}/" $$2}' \
${SYSDIR}/arch/xen/conf/files.xen
AXEN!= awk '($$2 ~ /^arch.*\.[sS]$$/) {print "${SYSDIR}/" $$2}' \
${SYSDIR}/arch/xen/conf/files.xen
AXEN+= ${SYSDIR}/arch/xen/${XEN_BUILD}/*.[sS]
# Directories in which to place tags links
DXEN= xen ${XEN_MACHINE_ARCHS} include
tags:
rm -f ${TXEN}
-echo ${SXEN} ${COMM} | xargs ctags -wadtf ${TXEN}
egrep "^ENTRY(.*)|^ALTENTRY(.*)" ${AXEN} | \
sed "s;\([^:]*\):\([^(]*\)(\([^, )]*\)\(.*\);\3 \1 /^\2(\3\4$$/;" \
>> ${TXEN}
sort -o ${TXEN} ${TXEN}
links:
-for i in ${DXEN}; do \
(cd $$i && rm -f tags; ln -s ../tags tags); done
SUBDIR= compile include stand
.include <bsd.subdir.mk>

View File

@ -0,0 +1,13 @@
# $NetBSD: Makefile.arch.inc,v 1.1 2004/05/12 16:56:43 cl Exp $
.if defined(MACHINE) && ${MACHINE} != "xen"
XEN_BUILD?= ${MACHINE}
.else
XEN_BUILD?= ${MACHINE_ARCH:Ui386}
.endif
.if ${XEN_BUILD} == "i386"
XEN_MACHINE_ARCHS= i386 x86
.else
XEN_MACHINE_ARCHS= ${XEN_BUILD}
.endif

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.xen,v 1.1 2004/03/11 21:44:08 cl Exp $ # $NetBSD: Makefile.xen,v 1.2 2004/05/12 16:56:43 cl Exp $
# NetBSD: Makefile.i386,v 1.132 2003/07/05 16:56:10 simonb Exp # NetBSD: Makefile.i386,v 1.132 2003/07/05 16:56:10 simonb Exp
# Makefile for NetBSD # Makefile for NetBSD
@ -18,8 +18,8 @@
# #
# makeoptions DEBUGLIST="uvm* trap if_*" # makeoptions DEBUGLIST="uvm* trap if_*"
.include "$S/arch/xen/conf/Makefile.arch.inc"
MACHINE_ARCH?= i386 MACHINE_ARCH?= i386
MACHINE_ARCH2?= x86
USETOOLS?= no USETOOLS?= no
NEED_OWN_INSTALL_TARGET?=no NEED_OWN_INSTALL_TARGET?=no
.include <bsd.own.mk> .include <bsd.own.mk>
@ -28,14 +28,12 @@ NEED_OWN_INSTALL_TARGET?=no
## (1) port identification ## (1) port identification
## ##
XEN= $S/arch/xen XEN= $S/arch/xen
XEN_MA= $S/arch/${MACHINE_ARCH} GENASSYM= ${XEN}/${XEN_BUILD}/genassym.cf
XEN_MA2= $S/arch/${MACHINE_ARCH2}
GENASSYM= ${XEN}/${MACHINE_ARCH}/genassym.cf
## ##
## (2) compile settings ## (2) compile settings
## ##
CPPFLAGS+= -D${MACHINE_ARCH} CPPFLAGS+= -D${XEN_BUILD}
AFLAGS+= -x assembler-with-cpp -traditional-cpp ${DBG} AFLAGS+= -x assembler-with-cpp -traditional-cpp ${DBG}
EXTRA_INCLUDES= -I${.CURDIR}/xen-ma EXTRA_INCLUDES= -I${.CURDIR}/xen-ma
@ -49,26 +47,27 @@ KERN_AS= obj
## ##
MD_OBJS= locore.o spl.o vector.o MD_OBJS= locore.o spl.o vector.o
MD_CFILES= MD_CFILES=
MD_SFILES= ${XEN}/${MACHINE_ARCH}/locore.S ${XEN}/${MACHINE_ARCH}/spl.S \ MD_SFILES= ${XEN}/${XEN_BUILD}/locore.S ${XEN}/${XEN_BUILD}/spl.S \
${XEN}/${MACHINE_ARCH}/vector.S ${XEN}/${XEN_BUILD}/vector.S
locore.o: ${XEN}/${MACHINE_ARCH}/locore.S assym.h locore.o: ${XEN}/${XEN_BUILD}/locore.S assym.h
${NORMAL_S} ${NORMAL_S}
spl.o: ${XEN}/${MACHINE_ARCH}/spl.S assym.h spl.o: ${XEN}/${XEN_BUILD}/spl.S assym.h
${NORMAL_S} ${NORMAL_S}
vector.o: ${XEN}/${MACHINE_ARCH}/vector.S assym.h vector.o: ${XEN}/${XEN_BUILD}/vector.S assym.h
${NORMAL_S} ${NORMAL_S}
.if !make(obj) && !make(clean) && !make(cleandir) .if !make(obj) && !make(clean) && !make(cleandir)
.BEGIN: .BEGIN:
rm -f ${MACHINE_ARCH} ${MACHINE_ARCH2} .for A in ${XEN_MACHINE_ARCHS}
ln -s ${XEN_MA}/include ${MACHINE_ARCH} rm -f ${A}
ln -s ${XEN_MA2}/include ${MACHINE_ARCH2} ln -s $S/arch/${A}/include ${A}
.endfor
rm -rf xen-ma rm -rf xen-ma
mkdir xen-ma mkdir xen-ma
ln -s ../${MACHINE_ARCH} xen-ma/machine ln -s $S/arch/${XEN_BUILD}/include xen-ma/machine
.endif .endif
## ##
@ -78,7 +77,7 @@ TEXTADDR?= c0100000
LINKFLAGS_NORMAL= -X LINKFLAGS_NORMAL= -X
.if (${OBJECT_FMT} == "ELF") .if (${OBJECT_FMT} == "ELF")
KERN_LDSCRIPT?= kern.ldscript KERN_LDSCRIPT?= kern.ldscript
LINKFORMAT= -T ${XEN_MA}/conf/${KERN_LDSCRIPT} LINKFORMAT= -T $S/arch/${XEN_BUILD}/conf/${KERN_LDSCRIPT}
.else .else
LINKFORMAT= -z LINKFORMAT= -z
.endif .endif

View File

@ -0,0 +1,3 @@
# $NetBSD: Makefile,v 1.1 2004/05/12 16:56:43 cl Exp $
.include <bsd.kinc.mk>

View File

@ -0,0 +1,5 @@
# $NetBSD: Makefile,v 1.1 2004/05/12 16:56:43 cl Exp $
SUBDIR= xen12load
.include <bsd.subdir.mk>

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.1 2004/04/17 23:20:37 cl Exp $ # $NetBSD: Makefile,v 1.2 2004/05/12 16:56:43 cl Exp $
S= ${.CURDIR}/../../../../ S= ${.CURDIR}/../../../../
@ -116,4 +116,15 @@ ${PROG}: ${OBJS} ${LIBLIST}
cat ${PROG}.tmp2 >>${PROG} cat ${PROG}.tmp2 >>${PROG}
rm -f ${PROG}.tmp ${PROG}.tmp2 rm -f ${PROG}.tmp ${PROG}.tmp2
proginstall:
#
XEN12LOAD_DIR= ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/xen12load/
release: check_RELEASEDIR .WAIT ${PROG}
${_MKMSG_INSTALL} ${PROG}.gz
${HOST_INSTALL_FILE} -m ${NONBINMODE} ${PROG} ${XEN12LOAD_DIR}
@rm -f ${XEN12LOAD_DIR}xen12load.gz
gzip -9 ${XEN12LOAD_DIR}xen12load
.include <bsd.prog.mk> .include <bsd.prog.mk>