aboutsummaryrefslogtreecommitdiff
path: root/release/picobsd/build/stage2
blob: 9354aadb1e83a753e44233026e51cbfcb33005ee (plain) (blame)
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
#! /bin/sh -

#
#	$Id: stage2,v 1.2 1998/09/07 06:46:25 abial Exp $
#
set -e

if [ ! -f kernel ]; then
	echo "-> ERROR: you must build PICOBSD${suffix}.${SIZE} kernel first"
	exit 1
fi

echo "-> Preparing kernel with MFS filesystem inside..."
df -ik /mnt
umount /mnt 2>&1 >/dev/null
fsck -p /dev/rvn0c
vnconfig -u /dev/rvn0 2>&1 >/dev/null

if [ ! -f ../tools/write_mfs_in_kernel/wmik ]; then
	(cd ../tools/write_mfs_in_kernel; make)
fi

../tools/write_mfs_in_kernel/wmik kernel fs.PICOBSD
strip kernel
strip --remove-section=.note --remove-section=.comment kernel
gzip -9 -n kernel
rm fs.PICOBSD