version 1.255.2.4, 2014/08/19 23:45:10 |
version 1.256, 2012/09/29 04:02:42 |
Line 263 progname=${0##*/} |
|
Line 263 progname=${0##*/} |
|
toppid=$$ |
toppid=$$ |
results=/dev/null |
results=/dev/null |
tab=' ' |
tab=' ' |
nl=' |
|
' |
|
trap "exit 1" 1 2 3 15 |
trap "exit 1" 1 2 3 15 |
|
|
bomb() |
bomb() |
|
|
exit 1 |
exit 1 |
} |
} |
|
|
# Quote args to make them safe in the shell. |
|
# Usage: quotedlist="$(shell_quote args...)" |
|
# |
|
# After building up a quoted list, use it by evaling it inside |
|
# double quotes, like this: |
|
# eval "set -- $quotedlist" |
|
# or like this: |
|
# eval "\$command $quotedlist \$filename" |
|
# |
|
shell_quote() |
|
{( |
|
local result='' |
|
local arg qarg |
|
LC_COLLATE=C ; export LC_COLLATE # so [a-zA-Z0-9] works in ASCII |
|
for arg in "$@" ; do |
|
case "${arg}" in |
|
'') |
|
qarg="''" |
|
;; |
|
*[!-./a-zA-Z0-9]*) |
|
# Convert each embedded ' to '\'', |
|
# then insert ' at the beginning of the first line, |
|
# and append ' at the end of the last line. |
|
# Finally, elide unnecessary '' pairs at the |
|
# beginning and end of the result and as part of |
|
# '\'''\'' sequences that result from multiple |
|
# adjacent quotes in he input. |
|
qarg="$(printf "%s\n" "$arg" | \ |
|
${SED:-sed} -e "s/'/'\\\\''/g" \ |
|
-e "1s/^/'/" -e "\$s/\$/'/" \ |
|
-e "1s/^''//" -e "\$s/''\$//" \ |
|
-e "s/'''/'/g" |
|
)" |
|
;; |
|
*) |
|
# Arg is not the empty string, and does not contain |
|
# any unsafe characters. Leave it unchanged for |
|
# readability. |
|
qarg="${arg}" |
|
;; |
|
esac |
|
result="${result}${result:+ }${qarg}" |
|
done |
|
printf "%s\n" "$result" |
|
)} |
|
|
|
statusmsg() |
statusmsg() |
{ |
{ |
|
|
unsetmakeenv INFODIR |
unsetmakeenv INFODIR |
unsetmakeenv LESSCHARSET |
unsetmakeenv LESSCHARSET |
unsetmakeenv MAKEFLAGS |
unsetmakeenv MAKEFLAGS |
unsetmakeenv TERMINFO |
|
setmakeenv LC_ALL C |
setmakeenv LC_ALL C |
|
|
# Find information about the build platform. This should be |
# Find information about the build platform. This should be |
|
|
do_iso_image_source=false |
do_iso_image_source=false |
do_live_image=false |
do_live_image=false |
do_install_image=false |
do_install_image=false |
do_disk_image=false |
|
do_params=false |
do_params=false |
do_rump=false |
do_rump=false |
|
|
|
|
|
|
} |
} |
|
|
# valid_MACHINE_ARCH -- A multi-line string, listing all valid |
|
# MACHINE/MACHINE_ARCH pairs. |
|
# |
|
# Each line contains a MACHINE and MACHINE_ARCH value, an optional ALIAS |
|
# which may be used to refer to the MACHINE/MACHINE_ARCH pair, and an |
|
# optional DEFAULT or NO_DEFAULT keyword. |
|
# |
|
# When a MACHINE corresponds to multiple possible values of |
|
# MACHINE_ARCH, then this table should list all allowed combinations. |
|
# If the MACHINE is associated with a default MACHINE_ARCH (to be |
|
# used when the user specifies the MACHINE but fails to specify the |
|
# MACHINE_ARCH), then one of the lines should have the "DEFAULT" |
|
# keyword. If there is no default MACHINE_ARCH for a particular |
|
# MACHINE, then there should be a line with the "NO_DEFAULT" keyword, |
|
# and with a blank MACHINE_ARCH. |
|
# |
|
valid_MACHINE_ARCH=' |
|
MACHINE=acorn26 MACHINE_ARCH=arm |
|
MACHINE=acorn32 MACHINE_ARCH=arm |
|
MACHINE=algor MACHINE_ARCH=mips64el ALIAS=algor64 |
|
MACHINE=algor MACHINE_ARCH=mipsel DEFAULT |
|
MACHINE=alpha MACHINE_ARCH=alpha |
|
MACHINE=amd64 MACHINE_ARCH=x86_64 |
|
MACHINE=amiga MACHINE_ARCH=m68k |
|
MACHINE=amigappc MACHINE_ARCH=powerpc |
|
MACHINE=arc MACHINE_ARCH=mips64el ALIAS=arc64 |
|
MACHINE=arc MACHINE_ARCH=mipsel DEFAULT |
|
MACHINE=atari MACHINE_ARCH=m68k |
|
MACHINE=bebox MACHINE_ARCH=powerpc |
|
MACHINE=cats MACHINE_ARCH=arm ALIAS=ocats |
|
MACHINE=cats MACHINE_ARCH=earmv4 ALIAS=ecats DEFAULT |
|
MACHINE=cesfic MACHINE_ARCH=m68k |
|
MACHINE=cobalt MACHINE_ARCH=mips64el ALIAS=cobalt64 |
|
MACHINE=cobalt MACHINE_ARCH=mipsel DEFAULT |
|
MACHINE=dreamcast MACHINE_ARCH=sh3el |
|
MACHINE=emips MACHINE_ARCH=mipseb |
|
MACHINE=epoc32 MACHINE_ARCH=arm |
|
MACHINE=evbarm MACHINE_ARCH=arm ALIAS=evboarm-el |
|
MACHINE=evbarm MACHINE_ARCH=armeb ALIAS=evboarm-eb |
|
MACHINE=evbarm MACHINE_ARCH=earm ALIAS=evbearm-el DEFAULT |
|
MACHINE=evbarm MACHINE_ARCH=earmeb ALIAS=evbearm-eb |
|
MACHINE=evbarm MACHINE_ARCH=earmhf ALIAS=evbearmhf-el |
|
MACHINE=evbarm MACHINE_ARCH=earmhfeb ALIAS=evbearmhf-eb |
|
MACHINE=evbarm MACHINE_ARCH=earmv4 ALIAS=evbearmv4-el |
|
MACHINE=evbarm MACHINE_ARCH=earmv4eb ALIAS=evbearmv4-eb |
|
MACHINE=evbarm MACHINE_ARCH=earmv5 ALIAS=evbearmv5-el |
|
MACHINE=evbarm MACHINE_ARCH=earmv5eb ALIAS=evbearmv5-eb |
|
MACHINE=evbarm MACHINE_ARCH=earmv6 ALIAS=evbearmv6-el |
|
MACHINE=evbarm MACHINE_ARCH=earmv6hf ALIAS=evbearmv6hf-el |
|
MACHINE=evbarm MACHINE_ARCH=earmv6eb ALIAS=evbearmv6-eb |
|
MACHINE=evbarm MACHINE_ARCH=earmv6hfeb ALIAS=evbearmv6hf-eb |
|
MACHINE=evbarm MACHINE_ARCH=earmv7 ALIAS=evbearmv7-el |
|
MACHINE=evbarm MACHINE_ARCH=earmv7eb ALIAS=evbearmv7-eb |
|
MACHINE=evbarm MACHINE_ARCH=earmv7hf ALIAS=evbearmv7hf-el |
|
MACHINE=evbarm MACHINE_ARCH=earmv7hfeb ALIAS=evbearmv7hf-eb |
|
MACHINE=evbarm64 MACHINE_ARCH=aarch64 ALIAS=evbarm64-el |
|
MACHINE=evbarm64 MACHINE_ARCH=aarch64eb ALIAS=evbarm64-eb |
|
MACHINE=evbcf MACHINE_ARCH=coldfire |
|
MACHINE=evbmips MACHINE_ARCH= NO_DEFAULT |
|
MACHINE=evbmips MACHINE_ARCH=mips64eb ALIAS=evbmips64-eb |
|
MACHINE=evbmips MACHINE_ARCH=mips64el ALIAS=evbmips64-el |
|
MACHINE=evbmips MACHINE_ARCH=mipseb ALIAS=evbmips-eb |
|
MACHINE=evbmips MACHINE_ARCH=mipsel ALIAS=evbmips-el |
|
MACHINE=evbppc MACHINE_ARCH=powerpc DEFAULT |
|
MACHINE=evbppc MACHINE_ARCH=powerpc64 ALIAS=evbppc64 |
|
MACHINE=evbsh3 MACHINE_ARCH= NO_DEFAULT |
|
MACHINE=evbsh3 MACHINE_ARCH=sh3eb ALIAS=evbsh3-eb |
|
MACHINE=evbsh3 MACHINE_ARCH=sh3el ALIAS=evbsh3-el |
|
MACHINE=ews4800mips MACHINE_ARCH=mipseb |
|
MACHINE=hp300 MACHINE_ARCH=m68k |
|
MACHINE=hppa MACHINE_ARCH=hppa |
|
MACHINE=hpcarm MACHINE_ARCH=arm ALIAS=hpcoarm |
|
MACHINE=hpcarm MACHINE_ARCH=earmv4 ALIAS=hpcearm DEFAULT |
|
MACHINE=hpcmips MACHINE_ARCH=mipsel |
|
MACHINE=hpcsh MACHINE_ARCH=sh3el |
|
MACHINE=i386 MACHINE_ARCH=i386 |
|
MACHINE=ia64 MACHINE_ARCH=ia64 |
|
MACHINE=ibmnws MACHINE_ARCH=powerpc |
|
MACHINE=iyonix MACHINE_ARCH=arm ALIAS=oiyonix |
|
MACHINE=iyonix MACHINE_ARCH=earm ALIAS=eiyonix DEFAULT |
|
MACHINE=landisk MACHINE_ARCH=sh3el |
|
MACHINE=luna68k MACHINE_ARCH=m68k |
|
MACHINE=mac68k MACHINE_ARCH=m68k |
|
MACHINE=macppc MACHINE_ARCH=powerpc DEFAULT |
|
MACHINE=macppc MACHINE_ARCH=powerpc64 ALIAS=macppc64 |
|
MACHINE=mipsco MACHINE_ARCH=mipseb |
|
MACHINE=mmeye MACHINE_ARCH=sh3eb |
|
MACHINE=mvme68k MACHINE_ARCH=m68k |
|
MACHINE=mvmeppc MACHINE_ARCH=powerpc |
|
MACHINE=netwinder MACHINE_ARCH=arm ALIAS=onetwinder |
|
MACHINE=netwinder MACHINE_ARCH=earmv4 ALIAS=enetwinder DEFAULT |
|
MACHINE=news68k MACHINE_ARCH=m68k |
|
MACHINE=newsmips MACHINE_ARCH=mipseb |
|
MACHINE=next68k MACHINE_ARCH=m68k |
|
MACHINE=ofppc MACHINE_ARCH=powerpc DEFAULT |
|
MACHINE=ofppc MACHINE_ARCH=powerpc64 ALIAS=ofppc64 |
|
MACHINE=playstation2 MACHINE_ARCH=mipsel |
|
MACHINE=pmax MACHINE_ARCH=mips64el ALIAS=pmax64 |
|
MACHINE=pmax MACHINE_ARCH=mipsel DEFAULT |
|
MACHINE=prep MACHINE_ARCH=powerpc |
|
MACHINE=rs6000 MACHINE_ARCH=powerpc |
|
MACHINE=sandpoint MACHINE_ARCH=powerpc |
|
MACHINE=sbmips MACHINE_ARCH= NO_DEFAULT |
|
MACHINE=sbmips MACHINE_ARCH=mips64eb ALIAS=sbmips64-eb |
|
MACHINE=sbmips MACHINE_ARCH=mips64el ALIAS=sbmips64-el |
|
MACHINE=sbmips MACHINE_ARCH=mipseb ALIAS=sbmips-eb |
|
MACHINE=sbmips MACHINE_ARCH=mipsel ALIAS=sbmips-el |
|
MACHINE=sgimips MACHINE_ARCH=mips64eb ALIAS=sgimips64 |
|
MACHINE=sgimips MACHINE_ARCH=mipseb DEFAULT |
|
MACHINE=shark MACHINE_ARCH=arm ALIAS=oshark |
|
MACHINE=shark MACHINE_ARCH=earmv4 ALIAS=eshark DEFAULT |
|
MACHINE=sparc MACHINE_ARCH=sparc |
|
MACHINE=sparc64 MACHINE_ARCH=sparc64 |
|
MACHINE=sun2 MACHINE_ARCH=m68000 |
|
MACHINE=sun3 MACHINE_ARCH=m68k |
|
MACHINE=vax MACHINE_ARCH=vax |
|
MACHINE=x68k MACHINE_ARCH=m68k |
|
MACHINE=zaurus MACHINE_ARCH=arm ALIAS=ozaurus |
|
MACHINE=zaurus MACHINE_ARCH=earm ALIAS=ezaurus DEFAULT |
|
' |
|
|
|
# getarch -- find the default MACHINE_ARCH for a MACHINE, |
|
# or convert an alias to a MACHINE/MACHINE_ARCH pair. |
|
# |
|
# Saves the original value of MACHINE in makewrappermachine before |
|
# alias processing. |
|
# |
|
# Sets MACHINE and MACHINE_ARCH if the input MACHINE value is |
|
# recognised as an alias, or recognised as a machine that has a default |
|
# MACHINE_ARCH (or that has only one possible MACHINE_ARCH). |
|
# |
|
# Leaves MACHINE and MACHINE_ARCH unchanged if MACHINE is recognised |
|
# as being associated with multiple MACHINE_ARCH values with no default. |
|
# |
|
# Bombs if MACHINE is not recognised. |
|
# |
|
getarch() |
getarch() |
{ |
{ |
local IFS |
# Translate some MACHINE name aliases (known only to build.sh) |
local found="" |
# into proper MACHINE and MACHINE_ARCH names. Save the alias |
local line |
# name in makewrappermachine. |
|
# |
IFS="${nl}" |
case "${MACHINE}" in |
makewrappermachine="${MACHINE}" |
|
for line in ${valid_MACHINE_ARCH}; do |
|
line="${line%%#*}" # ignore comments |
|
line="$( IFS=" ${tab}" ; echo $line )" # normalise white space |
|
case "${line} " in |
|
" ") |
|
# skip blank lines or comment lines |
|
continue |
|
;; |
|
*" ALIAS=${MACHINE} "*) |
|
# Found a line with a matching ALIAS=<alias>. |
|
found="$line" |
|
break |
|
;; |
|
"MACHINE=${MACHINE} "*" NO_DEFAULT"*) |
|
# Found an explicit "NO_DEFAULT" for this MACHINE. |
|
found="$line" |
|
break |
|
;; |
|
"MACHINE=${MACHINE} "*" DEFAULT"*) |
|
# Found an explicit "DEFAULT" for this MACHINE. |
|
found="$line" |
|
break |
|
;; |
|
"MACHINE=${MACHINE} "*) |
|
# Found a line for this MACHINE. If it's the |
|
# first such line, then tentatively accept it. |
|
# If it's not the first matching line, then |
|
# remember that there was more than one match. |
|
case "$found" in |
|
'') found="$line" ;; |
|
*) found="MULTIPLE_MATCHES" ;; |
|
esac |
|
;; |
|
esac |
|
done |
|
|
|
case "$found" in |
evbearm-e[bl]) |
*NO_DEFAULT*|*MULTIPLE_MATCHES*) |
makewrappermachine=${MACHINE} |
# MACHINE is OK, but MACHINE_ARCH is still unknown |
# MACHINE_ARCH is "arm" or "armeb", not "armel" |
return |
MACHINE_ARCH=earm${MACHINE##*-} |
;; |
MACHINE_ARCH=${MACHINE_ARCH%el} |
"MACHINE="*" MACHINE_ARCH="*) |
MACHINE=evbarm |
# Obey the MACHINE= and MACHINE_ARCH= parts of the line. |
;; |
IFS=" " |
|
for frag in ${found}; do |
evbarm-e[bl]) |
case "$frag" in |
makewrappermachine=${MACHINE} |
MACHINE=*|MACHINE_ARCH=*) |
# MACHINE_ARCH is "arm" or "armeb", not "armel" |
eval "$frag" |
MACHINE_ARCH=arm${MACHINE##*-} |
;; |
MACHINE_ARCH=${MACHINE_ARCH%el} |
esac |
MACHINE=${MACHINE%-e[bl]} |
done |
;; |
|
|
|
evbmips-e[bl]|sbmips-e[bl]) |
|
makewrappermachine=${MACHINE} |
|
MACHINE_ARCH=mips${MACHINE##*-} |
|
MACHINE=${MACHINE%-e[bl]} |
|
;; |
|
|
|
evbmips64-e[bl]|sbmips64-e[bl]) |
|
makewrappermachine=${MACHINE} |
|
MACHINE_ARCH=mips64${MACHINE##*-} |
|
MACHINE=${MACHINE%64-e[bl]} |
|
;; |
|
|
|
evbsh3-e[bl]) |
|
makewrappermachine=${MACHINE} |
|
MACHINE_ARCH=sh3${MACHINE##*-} |
|
MACHINE=${MACHINE%-e[bl]} |
|
;; |
|
|
|
esac |
|
|
|
# Translate a MACHINE into a default MACHINE_ARCH. |
|
# |
|
case "${MACHINE}" in |
|
|
|
acorn26|acorn32|cats|hpcarm|iyonix|netwinder|shark|zaurus) |
|
MACHINE_ARCH=arm |
|
;; |
|
|
|
evbarm) # unspecified MACHINE_ARCH gets LE |
|
MACHINE_ARCH=${MACHINE_ARCH:=arm} |
|
;; |
|
|
|
hp700) |
|
MACHINE_ARCH=hppa |
;; |
;; |
|
|
|
sun2) |
|
MACHINE_ARCH=m68000 |
|
;; |
|
|
|
amiga|atari|cesfic|hp300|luna68k|mac68k|mvme68k|news68k|next68k|sun3|x68k) |
|
MACHINE_ARCH=m68k |
|
;; |
|
|
|
evbmips|sbmips) # no default MACHINE_ARCH |
|
;; |
|
|
|
sgimips64) |
|
makewrappermachine=${MACHINE} |
|
MACHINE=${MACHINE%64} |
|
MACHINE_ARCH=mips64eb |
|
;; |
|
|
|
ews4800mips|mipsco|newsmips|sgimips|emips) |
|
MACHINE_ARCH=mipseb |
|
;; |
|
|
|
algor64|arc64|cobalt64|pmax64) |
|
makewrappermachine=${MACHINE} |
|
MACHINE=${MACHINE%64} |
|
MACHINE_ARCH=mips64el |
|
;; |
|
|
|
algor|arc|cobalt|hpcmips|pmax) |
|
MACHINE_ARCH=mipsel |
|
;; |
|
|
|
evbppc64|macppc64|ofppc64) |
|
makewrappermachine=${MACHINE} |
|
MACHINE=${MACHINE%64} |
|
MACHINE_ARCH=powerpc64 |
|
;; |
|
|
|
amigappc|bebox|evbppc|ibmnws|macppc|mvmeppc|ofppc|prep|rs6000|sandpoint) |
|
MACHINE_ARCH=powerpc |
|
;; |
|
|
|
evbsh3) # no default MACHINE_ARCH |
|
;; |
|
|
|
mmeye) |
|
MACHINE_ARCH=sh3eb |
|
;; |
|
|
|
dreamcast|hpcsh|landisk) |
|
MACHINE_ARCH=sh3el |
|
;; |
|
|
|
amd64) |
|
MACHINE_ARCH=x86_64 |
|
;; |
|
|
|
alpha|i386|sparc|sparc64|vax|ia64) |
|
MACHINE_ARCH=${MACHINE} |
|
;; |
|
|
*) |
*) |
bomb "Unknown target MACHINE: ${MACHINE}" |
bomb "Unknown target MACHINE: ${MACHINE}" |
;; |
;; |
|
|
esac |
esac |
} |
} |
|
|
# validatearch -- check that the MACHINE/MACHINE_ARCH pair is supported. |
|
# |
|
# Bombs if the pair is not supported. |
|
# |
|
validatearch() |
validatearch() |
{ |
{ |
local IFS |
# Ensure that the MACHINE_ARCH exists (and is supported by build.sh). |
local line |
# |
local foundpair=false foundmachine=false foundarch=false |
|
|
|
case "${MACHINE_ARCH}" in |
case "${MACHINE_ARCH}" in |
|
|
|
alpha|arm|armeb|earm|earmeb|hppa|i386|m68000|m68k|mipse[bl]|mips64e[bl]|powerpc|powerpc64|sh3e[bl]|sparc|sparc64|vax|x86_64|ia64) |
|
;; |
|
|
"") |
"") |
bomb "No MACHINE_ARCH provided" |
bomb "No MACHINE_ARCH provided" |
;; |
;; |
|
|
|
*) |
|
bomb "Unknown target MACHINE_ARCH: ${MACHINE_ARCH}" |
|
;; |
|
|
esac |
esac |
|
|
IFS="${nl}" |
# Determine valid MACHINE_ARCHs for MACHINE |
for line in ${valid_MACHINE_ARCH}; do |
# |
line="${line%%#*}" # ignore comments |
case "${MACHINE}" in |
line="$( IFS=" ${tab}" ; echo $line )" # normalise white space |
|
case "${line} " in |
|
" ") |
|
# skip blank lines or comment lines |
|
continue |
|
;; |
|
"MACHINE=${MACHINE} MACHINE_ARCH=${MACHINE_ARCH} "*) |
|
foundpair=true |
|
;; |
|
"MACHINE=${MACHINE} "*) |
|
foundmachine=true |
|
;; |
|
*"MACHINE_ARCH=${MACHINE_ARCH} "*) |
|
foundarch=true |
|
;; |
|
esac |
|
done |
|
|
|
case "${foundpair}:${foundmachine}:${foundarch}" in |
evbarm) |
true:*) |
arches="arm armeb earm earmeb" |
: OK |
|
;; |
;; |
*:false:*) |
|
bomb "Unknown target MACHINE: ${MACHINE}" |
cats|iyonix|netwinder|shark|zaurus) |
|
arches="arm earm" |
;; |
;; |
*:*:false) |
|
bomb "Unknown target MACHINE_ARCH: ${MACHINE_ARCH}" |
algor|arc|cobalt|pmax) |
|
arches="mipsel mips64el" |
|
;; |
|
|
|
evbmips|sbmips) |
|
arches="mipseb mipsel mips64eb mips64el" |
|
;; |
|
|
|
sgimips) |
|
arches="mipseb mips64eb" |
|
;; |
|
|
|
evbsh3) |
|
arches="sh3eb sh3el" |
|
;; |
|
|
|
macppc|evbppc|ofppc) |
|
arches="powerpc powerpc64" |
;; |
;; |
*) |
*) |
bomb "MACHINE_ARCH '${MACHINE_ARCH}' does not support MACHINE '${MACHINE}'" |
oma="${MACHINE_ARCH}" |
|
getarch |
|
arches="${MACHINE_ARCH}" |
|
MACHINE_ARCH="${oma}" |
;; |
;; |
esac |
|
} |
|
|
|
# listarch -- list valid MACHINE/MACHINE_ARCH/ALIAS values, |
esac |
# optionally restricted to those where the MACHINE and/or MACHINE_ARCH |
|
# match specifed glob patterns. |
|
# |
|
listarch() |
|
{ |
|
local machglob="$1" archglob="$2" |
|
local IFS |
|
local wildcard="*" |
|
local line xline frag |
|
local line_matches_machine line_matches_arch |
|
local found=false |
|
|
|
# Empty machglob or archglob should match anything |
|
: "${machglob:=${wildcard}}" |
|
: "${archglob:=${wildcard}}" |
|
|
|
IFS="${nl}" |
|
for line in ${valid_MACHINE_ARCH}; do |
|
line="${line%%#*}" # ignore comments |
|
xline="$( IFS=" ${tab}" ; echo $line )" # normalise white space |
|
[ -z "${xline}" ] && continue # skip blank or comment lines |
|
|
|
line_matches_machine=false |
|
line_matches_arch=false |
|
|
|
IFS=" " |
|
for frag in ${xline}; do |
|
case "${frag}" in |
|
MACHINE=${machglob}) |
|
line_matches_machine=true ;; |
|
ALIAS=${machglob}) |
|
line_matches_machine=true ;; |
|
MACHINE_ARCH=${archglob}) |
|
line_matches_arch=true ;; |
|
esac |
|
done |
|
|
|
if $line_matches_machine && $line_matches_arch; then |
# Ensure that MACHINE_ARCH supports MACHINE |
found=true |
# |
echo "$line" |
archok=false |
|
for a in ${arches}; do |
|
if [ "${a}" = "${MACHINE_ARCH}" ]; then |
|
archok=true |
|
break |
fi |
fi |
done |
done |
if ! $found; then |
${archok} || |
echo >&2 "No match for" \ |
bomb "MACHINE_ARCH '${MACHINE_ARCH}' does not support MACHINE '${MACHINE}'" |
"MACHINE=${machglob} MACHINE_ARCH=${archglob}" |
|
return 1 |
|
fi |
|
return 0 |
|
} |
} |
|
|
# nobomb_getmakevar -- |
# nobomb_getmakevar -- |
Line 1021 Usage: ${progname} [-EhnorUuxy] [-a arch |
|
Line 865 Usage: ${progname} [-EhnorUuxy] [-a arch |
|
install=idir Run "make installworld" to \`idir' to install all sets |
install=idir Run "make installworld" to \`idir' to install all sets |
except \`etc'. Useful after "distribution" or "release" |
except \`etc'. Useful after "distribution" or "release" |
kernel=conf Build kernel with config file \`conf' |
kernel=conf Build kernel with config file \`conf' |
kernel.gdb=conf Build kernel (including netbsd.gdb) with config |
|
file \`conf' |
|
releasekernel=conf Install kernel built by kernel=conf to RELEASEDIR. |
releasekernel=conf Install kernel built by kernel=conf to RELEASEDIR. |
installmodules=idir Run "make installmodules" to \`idir' to install all |
installmodules=idir Run "make installmodules" to \`idir' to install all |
kernel modules. |
kernel modules. |
Line 1040 Usage: ${progname} [-EhnorUuxy] [-a arch |
|
Line 882 Usage: ${progname} [-EhnorUuxy] [-a arch |
|
RELEASEDIR/RELEASEMACHINEDIR/installation/liveimage. |
RELEASEDIR/RELEASEMACHINEDIR/installation/liveimage. |
install-image Create bootable installation image in |
install-image Create bootable installation image in |
RELEASEDIR/RELEASEMACHINEDIR/installation/installimage. |
RELEASEDIR/RELEASEMACHINEDIR/installation/installimage. |
disk-image=target Creae bootable disk image in |
|
RELEASEDIR/RELEASEMACHINEDIR/binary/gzimg/target.img.gz. |
|
params Display various make(1) parameters. |
params Display various make(1) parameters. |
list-arch Display a list of valid MACHINE/MACHINE_ARCH values, |
|
and exit. The list may be narrowed by passing glob |
|
patterns or exact values in MACHINE or MACHINE_ARCH. |
|
|
|
Options: |
Options: |
-a arch Set MACHINE_ARCH to arch. [Default: deduced from MACHINE] |
-a arch Set MACHINE_ARCH to arch. [Default: deduced from MACHINE] |
Line 1058 Usage: ${progname} [-EhnorUuxy] [-a arch |
|
Line 895 Usage: ${progname} [-EhnorUuxy] [-a arch |
|
-j njob Run up to njob jobs in parallel; see make(1) -j. |
-j njob Run up to njob jobs in parallel; see make(1) -j. |
-M obj Set obj root directory to obj; sets MAKEOBJDIRPREFIX. |
-M obj Set obj root directory to obj; sets MAKEOBJDIRPREFIX. |
Unsets MAKEOBJDIR. |
Unsets MAKEOBJDIR. |
-m mach Set MACHINE to mach. Some mach values are actually |
-m mach Set MACHINE to mach; not required if NetBSD native. |
aliases that set MACHINE/MACHINE_ARCH pairs. |
|
[Default: deduced from the host system if the host |
|
OS is NetBSD] |
|
-N noisy Set the noisyness (MAKEVERBOSE) level of the build: |
-N noisy Set the noisyness (MAKEVERBOSE) level of the build: |
0 Minimal output ("quiet") |
0 Minimal output ("quiet") |
1 Describe what is occurring |
1 Describe what is occurring |
|
|
parseoptions() |
parseoptions() |
{ |
{ |
opts='a:B:C:D:Ehj:M:m:N:nO:oR:rS:T:UuV:w:X:xY:yZ:' |
opts='a:B:C:D:Ehj:M:m:N:nO:oR:rS:T:UuV:w:X:xY:yZ:' |
opt_a=false |
opt_a=no |
|
|
if type getopts >/dev/null 2>&1; then |
if type getopts >/dev/null 2>&1; then |
# Use POSIX getopts. |
# Use POSIX getopts. |
|
|
-a) |
-a) |
eval ${optargcmd} |
eval ${optargcmd} |
MACHINE_ARCH=${OPTARG} |
MACHINE_ARCH=${OPTARG} |
opt_a=true |
opt_a=yes |
;; |
;; |
|
|
-B) |
-B) |
|
|
-m) |
-m) |
eval ${optargcmd} |
eval ${optargcmd} |
MACHINE="${OPTARG}" |
MACHINE="${OPTARG}" |
|
[ "${opt_a}" != "yes" ] && getarch |
;; |
;; |
|
|
-N) |
-N) |
|
|
usage |
usage |
;; |
;; |
|
|
list-arch) |
|
listarch "${MACHINE}" "${MACHINE_ARCH}" |
|
exit $? |
|
;; |
|
|
|
makewrapper|cleandir|obj|tools|build|distribution|release|sets|sourcesets|syspkgs|params) |
makewrapper|cleandir|obj|tools|build|distribution|release|sets|sourcesets|syspkgs|params) |
;; |
;; |
|
|
|
|
op=install_image # used as part of a variable name |
op=install_image # used as part of a variable name |
;; |
;; |
|
|
kernel=*|releasekernel=*|kernel.gdb=*) |
kernel=*|releasekernel=*) |
arg=${op#*=} |
arg=${op#*=} |
op=${op%%=*} |
op=${op%%=*} |
[ -n "${arg}" ] || |
[ -n "${arg}" ] || |
bomb "Must supply a kernel name with \`${op}=...'" |
bomb "Must supply a kernel name with \`${op}=...'" |
;; |
;; |
|
|
disk-image=*) |
|
arg=${op#*=} |
|
op=disk_image |
|
[ -n "${arg}" ] || |
|
bomb "Must supply a target name with \`${op}=...'" |
|
|
|
;; |
|
|
|
modules) |
modules) |
op=modules |
op=modules |
;; |
;; |
|
|
|
|
# Set up MACHINE*. On a NetBSD host, these are allowed to be unset. |
# Set up MACHINE*. On a NetBSD host, these are allowed to be unset. |
# |
# |
# MACHINE_ARCH from the environment may be overridden by getarch |
|
# (based on the MACHINE), but MACHINE_ARCH from the -a option should |
|
# not be overridden. |
|
# |
|
if [ -z "${MACHINE}" ]; then |
if [ -z "${MACHINE}" ]; then |
[ "${uname_s}" = "NetBSD" ] || |
[ "${uname_s}" = "NetBSD" ] || |
bomb "MACHINE must be set, or -m must be used, for cross builds." |
bomb "MACHINE must be set, or -m must be used, for cross builds." |
MACHINE=${uname_m} |
MACHINE=${uname_m} |
fi |
fi |
$opt_a || getarch |
[ -n "${MACHINE_ARCH}" ] || getarch |
validatearch |
validatearch |
|
|
# Set up default make(1) environment. |
# Set up default make(1) environment. |
# |
# |
makeenv="${makeenv} TOOLDIR MACHINE MACHINE_ARCH MAKEFLAGS" |
makeenv="${makeenv} TOOLDIR MACHINE MACHINE_ARCH MAKEFLAGS" |
[ -z "${BUILDID}" ] || makeenv="${makeenv} BUILDID" |
[ -z "${BUILDID}" ] || makeenv="${makeenv} BUILDID" |
[ -z "${BUILDINFO}" ] || makeenv="${makeenv} BUILDINFO" |
|
MAKEFLAGS="-de -m ${TOP}/share/mk ${MAKEFLAGS}" |
MAKEFLAGS="-de -m ${TOP}/share/mk ${MAKEFLAGS}" |
MAKEFLAGS="${MAKEFLAGS} MKOBJDIRS=${MKOBJDIRS-yes}" |
MAKEFLAGS="${MAKEFLAGS} MKOBJDIRS=${MKOBJDIRS-yes}" |
export MAKEFLAGS MACHINE MACHINE_ARCH |
export MAKEFLAGS MACHINE MACHINE_ARCH |
setmakeenv USETOOLS "yes" |
|
setmakeenv MAKEWRAPPERMACHINE "${makewrappermachine:-${MACHINE}}" |
|
} |
} |
|
|
# sanitycheck -- |
# sanitycheck -- |
|
|
# |
# |
sanitycheck() |
sanitycheck() |
{ |
{ |
# Install as non-root is a bad idea. |
|
# |
|
if ${do_install} && [ "$id_u" -ne 0 ] ; then |
|
if ${do_expertmode}; then |
|
warning "Will install as an unprivileged user." |
|
else |
|
bomb "-E must be set for install as an unprivileged user." |
|
fi |
|
fi |
|
|
|
# If the PATH contains any non-absolute components (including, |
# If the PATH contains any non-absolute components (including, |
# but not limited to, "." or ""), then complain. As an exception, |
# but not limited to, "." or ""), then complain. As an exception, |
# allow "" or "." as the last component of the PATH. This is fatal |
# allow "" or "." as the last component of the PATH. This is fatal |
Line 1560 print_tooldir_make() |
|
Line 1365 print_tooldir_make() |
|
# 1. build a new version of nbmake in a temporary directory; |
# 1. build a new version of nbmake in a temporary directory; |
# 2. use the temporary nbmake to create the top level obj directory; |
# 2. use the temporary nbmake to create the top level obj directory; |
# 3. use $(getmakevar TOOLDIR) with the temporary nbmake to |
# 3. use $(getmakevar TOOLDIR) with the temporary nbmake to |
# get the correct value of TOOLDIR; |
# get the corect value of TOOLDIR; |
# 4. move the temporary nbmake to ${TOOLDIR}/bin/nbmake. |
# 4. move the temporary nbmake to ${TOOLDIR}/bin/nbmake. |
# |
# |
# However, people don't like building nbmake unnecessarily if their |
# However, people don't like building nbmake unnecessarily if their |
|
|
${runcmd} env CC="${HOST_CC-cc}" CPPFLAGS="${HOST_CPPFLAGS}" \ |
${runcmd} env CC="${HOST_CC-cc}" CPPFLAGS="${HOST_CPPFLAGS}" \ |
CFLAGS="${HOST_CFLAGS--O}" LDFLAGS="${HOST_LDFLAGS}" \ |
CFLAGS="${HOST_CFLAGS--O}" LDFLAGS="${HOST_LDFLAGS}" \ |
${HOST_SH} "${TOP}/tools/make/configure" || |
${HOST_SH} "${TOP}/tools/make/configure" || |
( cp ${tmpdir}/config.log ${tmpdir}-config.log |
bomb "Configure of ${toolprefix}make failed" |
bomb "Configure of ${toolprefix}make failed, see ${tmpdir}-config.log for details" ) |
|
${runcmd} ${HOST_SH} buildmake.sh || |
${runcmd} ${HOST_SH} buildmake.sh || |
bomb "Build of ${toolprefix}make failed" |
bomb "Build of ${toolprefix}make failed" |
make="${tmpdir}/${toolprefix}make" |
make="${tmpdir}/${toolprefix}make" |
|
|
# Perform some late sanity checks, after rebuildmake, |
# Perform some late sanity checks, after rebuildmake, |
# but before createmakewrapper or any real work. |
# but before createmakewrapper or any real work. |
# |
# |
# Creates the top-level obj directory, because that |
# Also create the top-level obj directory. |
# is needed by some of the sanity checks. |
|
# |
|
# Prints status messages reporting the values of several variables. |
|
# |
# |
validatemakeparams() |
validatemakeparams() |
{ |
{ |
# MAKECONF (which defaults to /etc/mk.conf in share/mk/bsd.own.mk) |
|
# can affect many things, so mention it in an early status message. |
|
# |
|
MAKECONF=$(getmakevar MAKECONF) |
|
if [ -e "${MAKECONF}" ]; then |
|
statusmsg2 "MAKECONF file:" "${MAKECONF}" |
|
else |
|
statusmsg2 "MAKECONF file:" "${MAKECONF} (File not found)" |
|
fi |
|
|
|
# Normalise MKOBJDIRS, MKUNPRIVED, and MKUPDATE. |
|
# These may be set as build.sh options or in "mk.conf". |
|
# Don't export them as they're only used for tests in build.sh. |
|
# |
|
MKOBJDIRS=$(getmakevar MKOBJDIRS) |
|
MKUNPRIVED=$(getmakevar MKUNPRIVED) |
|
MKUPDATE=$(getmakevar MKUPDATE) |
|
|
|
# Non-root should always use either the -U or -E flag. |
|
# |
|
if ! ${do_expertmode} && \ |
|
[ "$id_u" -ne 0 ] && \ |
|
[ "${MKUNPRIVED}" = "no" ] ; then |
|
bomb "-U or -E must be set for build as an unprivileged user." |
|
fi |
|
|
|
if [ "${runcmd}" = "echo" ]; then |
if [ "${runcmd}" = "echo" ]; then |
TOOLCHAIN_MISSING=no |
TOOLCHAIN_MISSING=no |
EXTERNAL_TOOLCHAIN="" |
EXTERNAL_TOOLCHAIN="" |
Line 1663 validatemakeparams() |
|
Line 1438 validatemakeparams() |
|
exit 1 |
exit 1 |
fi |
fi |
|
|
|
# Normalise MKOBJDIRS, MKUNPRIVED, and MKUPDATE |
|
# These may be set as build.sh options or in "mk.conf". |
|
# Don't export them as they're only used for tests in build.sh. |
|
# |
|
MKOBJDIRS=$(getmakevar MKOBJDIRS) |
|
MKUNPRIVED=$(getmakevar MKUNPRIVED) |
|
MKUPDATE=$(getmakevar MKUPDATE) |
|
|
if [ "${MKOBJDIRS}" != "no" ]; then |
if [ "${MKOBJDIRS}" != "no" ]; then |
# Create the top-level object directory. |
# Create the top-level object directory. |
# |
# |
Line 1747 validatemakeparams() |
|
Line 1530 validatemakeparams() |
|
removedirs="${TOOLDIR}" |
removedirs="${TOOLDIR}" |
|
|
if [ -z "${DESTDIR}" ] || [ "${DESTDIR}" = "/" ]; then |
if [ -z "${DESTDIR}" ] || [ "${DESTDIR}" = "/" ]; then |
if ${do_distribution} || ${do_release} || \ |
if ${do_build} || ${do_distribution} || ${do_release}; then |
[ "${uname_s}" != "NetBSD" ] || \ |
if ! ${do_build} || \ |
[ "${uname_m}" != "${MACHINE}" ]; then |
[ "${uname_s}" != "NetBSD" ] || \ |
bomb "DESTDIR must != / for cross builds, or ${progname} 'distribution' or 'release'." |
[ "${uname_m}" != "${MACHINE}" ]; then |
fi |
bomb "DESTDIR must != / for cross builds, or ${progname} 'distribution' or 'release'." |
if ! ${do_expertmode}; then |
fi |
bomb "DESTDIR must != / for non -E (expert) builds" |
if ! ${do_expertmode}; then |
|
bomb "DESTDIR must != / for non -E (expert) builds" |
|
fi |
|
statusmsg "WARNING: Building to /, in expert mode." |
|
statusmsg " This may cause your system to break! Reasons include:" |
|
statusmsg " - your kernel is not up to date" |
|
statusmsg " - the libraries or toolchain have changed" |
|
statusmsg " YOU HAVE BEEN WARNED!" |
fi |
fi |
statusmsg "WARNING: Building to /, in expert mode." |
|
statusmsg " This may cause your system to break! Reasons include:" |
|
statusmsg " - your kernel is not up to date" |
|
statusmsg " - the libraries or toolchain have changed" |
|
statusmsg " YOU HAVE BEEN WARNED!" |
|
else |
else |
removedirs="${removedirs} ${DESTDIR}" |
removedirs="${removedirs} ${DESTDIR}" |
fi |
fi |
|
if ${do_build} || ${do_distribution} || ${do_release}; then |
|
if ! ${do_expertmode} && \ |
|
[ "$id_u" -ne 0 ] && \ |
|
[ "${MKUNPRIVED}" = "no" ] ; then |
|
bomb "-U or -E must be set for build as an unprivileged user." |
|
fi |
|
fi |
if ${do_releasekernel} && [ -z "${RELEASEDIR}" ]; then |
if ${do_releasekernel} && [ -z "${RELEASEDIR}" ]; then |
bomb "Must set RELEASEDIR with \`releasekernel=...'" |
bomb "Must set RELEASEDIR with \`releasekernel=...'" |
fi |
fi |
|
|
|
# Install as non-root is a bad idea. |
|
# |
|
if ${do_install} && [ "$id_u" -ne 0 ] ; then |
|
if ${do_expertmode}; then |
|
warning "Will install as an unprivileged user." |
|
else |
|
bomb "-E must be set for install as an unprivileged user." |
|
fi |
|
fi |
|
|
# If a previous build.sh run used -U (and therefore created a |
# If a previous build.sh run used -U (and therefore created a |
# METALOG file), then most subsequent build.sh runs must also |
# METALOG file), then most subsequent build.sh runs must also |
# use -U. If DESTDIR is about to be removed, then don't perform |
# use -U. If DESTDIR is about to be removed, then don't perform |
Line 1777 validatemakeparams() |
|
Line 1579 validatemakeparams() |
|
# DESTDIR is about to be removed |
# DESTDIR is about to be removed |
;; |
;; |
*) |
*) |
if [ -e "${DESTDIR}/METALOG" ] && \ |
if ( ${do_build} || ${do_distribution} || ${do_release} || \ |
|
${do_install} ) && \ |
|
[ -e "${DESTDIR}/METALOG" ] && \ |
[ "${MKUNPRIVED}" = "no" ] ; then |
[ "${MKUNPRIVED}" = "no" ] ; then |
if $do_expertmode; then |
if $do_expertmode; then |
warning "A previous build.sh run specified -U." |
warning "A previous build.sh run specified -U." |
Line 1870 createmakewrapper() |
|
Line 1674 createmakewrapper() |
|
|
|
EOF |
EOF |
{ |
{ |
sorted_vars="$(for var in ${makeenv}; do echo "${var}" ; done \ |
for f in ${makeenv}; do |
| sort -u )" |
if eval "[ -z \"\${$f}\" -a \"\${${f}-X}\" = \"X\" ]"; then |
for var in ${sorted_vars}; do |
eval echo "unset ${f}" |
eval val=\"\${${var}}\" |
|
eval is_set=\"\${${var}+set}\" |
|
if [ -z "${is_set}" ]; then |
|
echo "unset ${var}" |
|
else |
else |
qval="$(shell_quote "${val}")" |
eval echo "${f}=\'\$$(echo ${f})\'\;\ export\ ${f}" |
echo "${var}=${qval}; export ${var}" |
|
fi |
fi |
done |
done |
|
|
cat <<EOF |
eval cat <<EOF |
|
MAKEWRAPPERMACHINE=${makewrappermachine:-${MACHINE}}; export MAKEWRAPPERMACHINE |
|
USETOOLS=yes; export USETOOLS |
|
EOF |
|
} | eval sort -u "${makewrapout}" |
|
eval cat <<EOF "${makewrapout}" |
|
|
exec "\${TOOLDIR}/bin/${toolprefix}make" \${1+"\$@"} |
exec "\${TOOLDIR}/bin/${toolprefix}make" \${1+"\$@"} |
EOF |
EOF |
} | eval cat "${makewrapout}" |
|
[ "${runcmd}" = "echo" ] && echo EOF |
[ "${runcmd}" = "echo" ] && echo EOF |
${runcmd} chmod +x "${makewrapper}" |
${runcmd} chmod +x "${makewrapper}" |
statusmsg2 "Updated makewrapper:" "${makewrapper}" |
statusmsg2 "Updated makewrapper:" "${makewrapper}" |
|
|
if [ "${MKUPDATE}" = "no" ]; then |
if [ "${MKUPDATE}" = "no" ]; then |
make_in_dir tools cleandir |
make_in_dir tools cleandir |
fi |
fi |
make_in_dir tools build_install |
make_in_dir tools dependall |
|
make_in_dir tools install |
statusmsg "Tools built to ${TOOLDIR}" |
statusmsg "Tools built to ${TOOLDIR}" |
} |
} |
|
|
Line 1945 getkernelconf() |
|
Line 1749 getkernelconf() |
|
kernelbuildpath="${KERNOBJDIR}/${kernelconfname}" |
kernelbuildpath="${KERNOBJDIR}/${kernelconfname}" |
} |
} |
|
|
diskimage() |
|
{ |
|
ARG="$(echo $1 | tr '[:lower:]' '[:upper:]')" |
|
[ -f "${DESTDIR}/etc/mtree/set.base" ] || |
|
bomb "The release binaries must be built first" |
|
kerneldir="${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/kernel" |
|
kernel="${kerneldir}/netbsd-${ARG}.gz" |
|
[ -f "${kernel}" ] || |
|
bomb "The kernel ${kernel} must be built first" |
|
make_in_dir "${NETBSDSRCDIR}/etc" "smp_${1}" |
|
} |
|
|
|
buildkernel() |
buildkernel() |
{ |
{ |
if ! ${do_tools} && ! ${buildkernelwarned:-false}; then |
if ! ${do_tools} && ! ${buildkernelwarned:-false}; then |
|
|
[ -x "${TOOLDIR}/bin/${toolprefix}config" ] \ |
[ -x "${TOOLDIR}/bin/${toolprefix}config" ] \ |
|| bomb "${TOOLDIR}/bin/${toolprefix}config does not exist. You need to \"$0 tools\" first." |
|| bomb "${TOOLDIR}/bin/${toolprefix}config does not exist. You need to \"$0 tools\" first." |
${runcmd} "${TOOLDIR}/bin/${toolprefix}config" -b "${kernelbuildpath}" \ |
${runcmd} "${TOOLDIR}/bin/${toolprefix}config" -b "${kernelbuildpath}" \ |
${ksymopts} -s "${TOP}/sys" "${kernelconfpath}" || |
-s "${TOP}/sys" "${kernelconfpath}" || |
bomb "${toolprefix}config failed for ${kernelconf}" |
bomb "${toolprefix}config failed for ${kernelconf}" |
make_in_dir "${kernelbuildpath}" depend |
make_in_dir "${kernelbuildpath}" depend |
make_in_dir "${kernelbuildpath}" all |
make_in_dir "${kernelbuildpath}" all |
|
|
[ "${1}" != "rumptest" ] && bomb 'build.sh rump not yet functional. ' \ |
[ "${1}" != "rumptest" ] && bomb 'build.sh rump not yet functional. ' \ |
'did you mean "rumptest"?' |
'did you mean "rumptest"?' |
|
|
export RUMPKERN_ONLY=1 |
|
# create obj and distrib dirs |
# create obj and distrib dirs |
if [ "${MKOBJDIRS}" != "no" ]; then |
if [ "${MKOBJDIRS}" != "no" ]; then |
make_in_dir "${NETBSDSRCDIR}/etc/mtree" obj |
make_in_dir "${NETBSDSRCDIR}/etc/mtree" obj |
|
|
/undefined reference/ && |
/undefined reference/ && |
!/more undefined references.*follow/{ |
!/more undefined references.*follow/{ |
if (match($NF, |
if (match($NF, |
"`(rumpuser_|rumpcomp_|__" quirks ")") == 0) |
"`(rumpuser_|__" quirks ")") == 0) |
fails[NR] = $0 |
fails[NR] = $0 |
} |
} |
/cannot find -l/{fails[NR] = $0} |
/cannot find -l/{fails[NR] = $0} |
|
|
statusmsg2 "MACHINE_ARCH:" "${MACHINE_ARCH}" |
statusmsg2 "MACHINE_ARCH:" "${MACHINE_ARCH}" |
statusmsg2 "Build platform:" "${uname_s} ${uname_r} ${uname_m}" |
statusmsg2 "Build platform:" "${uname_s} ${uname_r} ${uname_m}" |
statusmsg2 "HOST_SH:" "${HOST_SH}" |
statusmsg2 "HOST_SH:" "${HOST_SH}" |
if [ -n "${BUILDID}" ]; then |
|
statusmsg2 "BUILDID:" "${BUILDID}" |
|
fi |
|
if [ -n "${BUILDINFO}" ]; then |
|
printf "%b\n" "${BUILDINFO}" | \ |
|
while read -r line ; do |
|
[ -s "${line}" ] && continue |
|
statusmsg2 "BUILDINFO:" "${line}" |
|
done |
|
fi |
|
|
|
rebuildmake |
rebuildmake |
validatemakeparams |
validatemakeparams |
|
|
arg=${op#*=} |
arg=${op#*=} |
buildkernel "${arg}" |
buildkernel "${arg}" |
;; |
;; |
kernel.gdb=*) |
|
arg=${op#*=} |
|
ksymopts="-D DEBUG=-g" |
|
buildkernel "${arg}" |
|
;; |
|
releasekernel=*) |
releasekernel=*) |
arg=${op#*=} |
arg=${op#*=} |
releasekernel "${arg}" |
releasekernel "${arg}" |
;; |
;; |
|
|
disk-image=*) |
|
arg=${op#*=} |
|
diskimage "${arg}" |
|
;; |
|
|
|
modules) |
modules) |
buildmodules |
buildmodules |
;; |
;; |