-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmake-kernel
More file actions
executable file
·106 lines (90 loc) · 2.3 KB
/
make-kernel
File metadata and controls
executable file
·106 lines (90 loc) · 2.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
#!/bin/sh
## $Id: make-kernel,v 1.1 2002/12/05 17:04:15 yozo Exp $
## make-kernel script
## if you wanna record the output, type
## (make-kernel >& logfile) &
## and see logfile.
## -- yozo. Wed Mar 21 17:34:35 JST 2001
##
## take one argument for the configuration file name.
## (make-kernel conf >& logfile) &
## -- yozo. Thu Mar 29 18:57:51 JST 2001
##
## MACH used to specify machine hardware
## -- yozo. Thu Apr 5 14:47:12 JST 2001
##
## date command added in the first part -- yozo. Tue Apr 10 14:28:32 JST 2001
## starting messages beautified -- yozo. Thu Apr 26 16:28:09 JST 2001
PATH=/usr/bin:/bin:/usr/sbin/:/sbin
if [ $# != 1 ] ; then
echo "specify configuration file name (e.g., GENERIC)." ;
echo "\tusage: $0 configfile"
exit 10
fi
KERNELCONF="$1"
MACH=`uname -m`
LOGDIR=/usr/local/tmp
COMPILEDIR=/usr/src/sys/arch/${MACH}/compile/${KERNELCONF}
CONFDIR=/usr/src/sys/arch/${MACH}/conf
if [ ! -f ${CONFDIR}/${KERNELCONF} ]; then
echo "${CONFDIR}/${KERNELCONF} not found. abort now..."
exit 20
fi
echo -n "$0: "
date
echo -n "$0: "
uname -a
echo
ls -alt "${LOGDIR}"
df -k
echo
if [ -d "${CONFDIR}" ] ; then
echo "$0: ${CONFDIR} exists."
else
echo "$0: ${CONFDIR} does not exist. check it."
exit 10
fi
if [ -d "${COMPILEDIR}/obj" ] ; then
echo "$0: ${COMPILEDIR}/obj exists."
#### move to compile obj directory
cd "${COMPILEDIR}/obj"
echo -n "$0: current dir is "
pwd
echo -n "$0: disk usage(du -sk .) -- "
du -sk .
echo "$0: starting \"make clean\" now..."
date
make clean
date
echo -n "$0: disk usage(du -sk .) -- "
du -sk .
ls -aCFt
else
echo "$0: ${COMPILEDIR}/obj does not exist."
fi
#### move to config directory
cd "${CONFDIR}"
echo -n "$0: current dir is "
pwd
ls -alt
echo "$0: head ${KERNELCONF} vvvv======"
head "${KERNELCONF}"
echo "$0: head ${KERNELCONF} ^^^^======"
## /usr/sbin/config ${KERNELCONF}
#### back to compile directory
cd "${COMPILEDIR}"
echo -n "$0: current dir is "
pwd
echo -n "$0: disk usage(du -sk .) -- "
du -sk .
ls -aCFt
echo "$0: \"make obj\" and \"make config\" and \"make depend\" and \"make\" start..."
date
make obj && make config && make depend && make
date
echo -n "$0: disk usage(du -sk .) -- "
du -sk .
df -k
echo "$0: compilation finished."
echo "$0: please do adjust timezone variable and install bsd as /bsd."
## end_of_file.