Check-in [8f8bbe5cbb]
Logged in as anonymous
Overview
Comment:80 columns, error handling, microcode
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 8f8bbe5cbbe8d6b92b10f25d36da0d249a7127f114594250037dd5836a950dfe
User & Date: arcade on 2019-10-25 10:49:27.132
Other Links: manifest | tags
Context
2019-10-25
13:44
silence up microcode a little check-in: 35e11e77a2 user: arcade tags: trunk
10:49
80 columns, error handling, microcode check-in: 8f8bbe5cbb user: arcade tags: trunk
2019-10-24
10:31
add default empty start target when it's absent, add flags to control background/foreground mode check-in: bc20f9df9f user: arcade tags: trunk
Changes
Modified init.mk from [21f19fd804] to [dd8ca89fae].
1
2
3



4
5
6
7
8
9
10
# Meta targets

TARGETS+=adjkerntz bootfs cleanvar cleartmp cloned devfs dmesg dumpon fsck hostname ifconfig kld ldconfig mixer mount mountlate msgs newsyslog nextboot nfsclient pwcheck random root rpc_umntall runshm savecore swap sysctl sysdb wlans




DAEMON: pwcheck sysctl sysdb NETWORK SERVERS ldconfig nfsclient cleartmp

LOGIN: DAEMON dntpd msgs powerd

NETWORK: ifconfig devd hostname



|
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
# Meta targets

TARGETS+=adjkerntz bootfs cleanvar cleartmp cloned devfs dmesg dumpon fsck \
	hostname ifconfig kld ldconfig microcode mixer mount mountlate msgs \
	newsyslog nextboot nfsclient pwcheck random root rpc_umntall runshm \
	savecore swap sysctl sysdb wlans

DAEMON: pwcheck sysctl sysdb NETWORK SERVERS ldconfig nfsclient cleartmp

LOGIN: DAEMON dntpd msgs powerd

NETWORK: ifconfig devd hostname

132
133
134
135
136
137
138











139
140
141
142
143
144

145
146
147
148
149
150
151
152
ldc+=${:!find ${dir} -type f!}
.endif
.endfor

ldconfig: mountlate
	echo "MRC:$@> Initializing shared libraries: ${ldc}"; \
	ldconfig -elf ${ldc}












mixers=${:!find /dev -name 'mixer*'!:S/\/dev\///}

mixer: mount cleanvar
	echo "MRC:$@> Restoring levels."
.for mixer in ${mixers}

	-test -f /var/db/${mixer}-state && mixer -f /dev/${mixer} `cat /var/db/${mixer}-state`
.endfor

excludes=${NETFS_TYPES:C/:.*//}

mount: root
	echo "MRC:$@> Mount local FS."
	mount -a -t no${excludes:ts,}







>
>
>
>
>
>
>
>
>
>
>






>
|







135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
ldc+=${:!find ${dir} -type f!}
.endif
.endfor

ldconfig: mountlate
	echo "MRC:$@> Initializing shared libraries: ${ldc}"; \
	ldconfig -elf ${ldc}

microcode: mountlate
.if exists(/usr/local/share/cpucontrol)
	echo "MRC:$@> Updating." ;\
	kldload -n cpuctl || exit 1 ;\
	for cpu in $$(jot "$$(sysctl -n hw.ncpu)" 0); do \
	  cpucontrol -u -d /usr/local/share/cpucontrol /dev/cpuctl$${cpu} || \
	    exit 1 ;\
	  cpucontrol -e /dev/cpuctl$${cpu} || exit 1 ;\
	done
.endif

mixers=${:!find /dev -name 'mixer*'!:S/\/dev\///}

mixer: mount cleanvar
	echo "MRC:$@> Restoring levels."
.for mixer in ${mixers}
	test -f /var/db/${mixer}-state || true && mixer -f /dev/${mixer} \
	  `cat /var/db/${mixer}-state`
.endfor

excludes=${NETFS_TYPES:C/:.*//}

mount: root
	echo "MRC:$@> Mount local FS."
	mount -a -t no${excludes:ts,}
177
178
179
180
181
182
183
184

185
186
187
188
189
190

191
192
193
194
195
196
197

nfsclient: NETWORK rpcbind rpc_umntall
	test -z "$${NFSCLIENT_ENABLE}" || kldload -n nfs

pwcheck: mountlate syslogd
	echo "MRC:$@> Checking password lock file."
.if exists(/etc/ptmp)
	logger -s -p auth.err "password file may be incorrect -- /etc/ptmp exists"

.endif

random: mount devfs
	echo "MRC:$@> Seeding."
	sysctl kern.seedenable=1 > /dev/null
	( ps -fauxww; sysctl -a; date; df -ib; dmesg; ps -fauxww; ) 2>&1 | dd status=none of=/dev/random bs=8k

	cat /bin/ls | dd status=none of=/dev/random bs=8k
.if exists(ENTROPY_DIR) # XXX
.for file in ${:!find ${ENTROPY_DIR} -type f!}
	dd status=none if=${file} of=/dev/random bs=8k
.endfor
.elif exists(ENTROPY_FILE)
	dd status=none if=${ENTROPY_FILE} of=/dev/random bs=8k







|
>





|
>







192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214

nfsclient: NETWORK rpcbind rpc_umntall
	test -z "$${NFSCLIENT_ENABLE}" || kldload -n nfs

pwcheck: mountlate syslogd
	echo "MRC:$@> Checking password lock file."
.if exists(/etc/ptmp)
	logger -s -p auth.err "password file may be incorrect -- /etc/ptmp \
	  exists"
.endif

random: mount devfs
	echo "MRC:$@> Seeding."
	sysctl kern.seedenable=1 > /dev/null
	( ps -fauxww; sysctl -a; date; df -ib; dmesg; ps -fauxww; ) 2>&1 | \
	  dd status=none of=/dev/random bs=8k
	cat /bin/ls | dd status=none of=/dev/random bs=8k
.if exists(ENTROPY_DIR) # XXX
.for file in ${:!find ${ENTROPY_DIR} -type f!}
	dd status=none if=${file} of=/dev/random bs=8k
.endfor
.elif exists(ENTROPY_FILE)
	dd status=none if=${ENTROPY_FILE} of=/dev/random bs=8k
230
231
232
233
234
235
236
237

238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
	echo "MRC:$@> Enabling swap."; \
	swapon -a
.endif

sysctl: kld root
.if exists(/etc/sysctl.conf)
	echo "MRC:$@> Setting sysctl defaults."; \
	awk '$$0~/^[ ]*(#.*)?$$/{next}{print}' < /etc/sysctl.conf | xargs -n1 sysctl

.endif

sysdb: mountlate
	echo "MRC:$@> Building databases."; \
	dev_mkdb; \
	install -c -m 644 -g wheel /dev/null /var/run/utmpx

wlans: kld
	echo "MRC:$@> Configuring wlans."; \
	for dev in `sysctl -n net.wlan.devices`; do \
	  eval all_wlans=\$${WLANS_$${dev}}; \
	  for wlan in $${all_wlans}; do \
	    eval wlan_args=\$${WLANS_$${wlan}_ARGS}; \
	    ifconfig $${wlan} create wlandev $${dev} $${wlan_args}; \
	    ifconfig $${wlan} up; \
	  done; \
	done







|
>









|







247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
	echo "MRC:$@> Enabling swap."; \
	swapon -a
.endif

sysctl: kld root
.if exists(/etc/sysctl.conf)
	echo "MRC:$@> Setting sysctl defaults."; \
	awk '$$0~/^[ ]*(#.*)?$$/{next}{print}' < /etc/sysctl.conf | \
	  xargs -n1 sysctl
.endif

sysdb: mountlate
	echo "MRC:$@> Building databases."; \
	dev_mkdb; \
	install -c -m 644 -g wheel /dev/null /var/run/utmpx

wlans: kld
	echo "MRC:$@> Configuring wlans."; \
	for dev in $$(sysctl -n net.wlan.devices); do \
	  eval all_wlans=\$${WLANS_$${dev}}; \
	  for wlan in $${all_wlans}; do \
	    eval wlan_args=\$${WLANS_$${wlan}_ARGS}; \
	    ifconfig $${wlan} create wlandev $${dev} $${wlan_args}; \
	    ifconfig $${wlan} up; \
	  done; \
	done