Commit Graph

344 Commits

Author SHA1 Message Date
Luigi Rizzo
a4e8fcc136 Put a more reasonable path for "more" sources in crunch.conf,
and disable telnet and friends in favour of ssh/sshd/scp.

Pull out a few NIC drivers from the config file to make the
image fit into a 1.44 image again. I have left "lnc" in as that is
emulated by vmware so this can be booted there.
2002-02-14 19:43:40 +00:00
Luigi Rizzo
99d1dbfdb0 Use { } instead of ( ) for grouping shell commands so that
variable assignments are retained ( () creates a subshell)

Reported-by: Michael Bretterklieber <mbretter@inode.at>
2002-02-14 19:21:50 +00:00
Luigi Rizzo
8de7d83bc0 Add a '-l' flag to show CPU load for the various states, similar to what
"top" does (thinking of it, i could have as well used the same format line!)

This only makes sense when "-w" option is also specified, because the
load is computed as the difference between subsequent samples.

I think this (and the "-d" feature which shows differences in the
network statistics counts) would also make sense in the standard
vmstat and netstat.
2001-12-14 01:10:50 +00:00
Luigi Rizzo
b8be92123e Implement a more efficient way to assign addresses: read /etc/hosts
only once into an array of shell variables, and then scan the array
to find entries matching the MAC address.
Associative arrays would really be handy here...
2001-11-29 03:16:23 +00:00
Luigi Rizzo
e96781579c Whoops... left some junk in previous commit. 2001-11-24 20:24:36 +00:00
Luigi Rizzo
11bc3e5610 Let "make" use the .mk files from the correct source tree instead
of the default ones (which could be incorrect when doing cross builds).

Also, try to be backward compatible when compiling wmk (the goal being
able to use the most recent "picobsd" script on a wide range of
source trees).
2001-11-24 20:22:20 +00:00
Josef Karthauser
0dec49d17a Use a local write_mfs_in_kernel.c instead of the one in ncvs/src/release
which is likely to be removed shortly, after repo-copying it from
there.
2001-11-20 01:00:52 +00:00
Josef Karthauser
37787fbcce Cull picobsd/custom. It's bit rotted beyond all recognition.
Approved by:	freebsd-small
2001-11-19 18:04:04 +00:00
Luigi Rizzo
72fb1b86f9 Add entries for "dumb" and "dialup" terminals, as the shell in HEAD
refuses to start if it does not find a matching entry for the terminal
type.

My impression is that this is a problem in the shell, because
at least on PicoBSD images, the shell itself coredumps.
Anyways, this is the quickest fix i can come up with.
2001-11-01 16:52:34 +00:00
Luigi Rizzo
3c560efb1a Provide a new picobsd option, "--modules", to also build modules
(modload and friends are sufficiently small to consider their inclusion
in PicoBSD images).
2001-11-01 16:17:37 +00:00
Luigi Rizzo
6297e47a34 Better code to scan the ethertable. 2001-10-25 17:40:03 +00:00
Luigi Rizzo
f36f7f8005 Use the correct sysctl names for intrcnt and intrnames. 2001-10-25 01:29:21 +00:00
Luigi Rizzo
ce28e3e9fe Add a -d flag to show deltas as opposed to cumulative counters
in interface statistics.  Most useful when used with the -w flag e.g.

	ns -i -w 1 -d
2001-10-10 17:52:04 +00:00
Luigi Rizzo
9bbeaf002b Use host keys from the config directory if they exist, instead of
regenerating them.

Make the script handle relative paths for the source directory.
2001-10-07 17:22:46 +00:00
Luigi Rizzo
e46899fcdb Make fetch_mask return ${default_mask} if entry not found.
Add a couple of diagnostic messages.
2001-10-07 17:17:26 +00:00
Luigi Rizzo
2fbfa5f862 Add code to print interrupt statistics when they will be
exported via sysctl.
2001-10-07 02:13:23 +00:00
Luigi Rizzo
3cbee46209 Fix a typo (missing "; at the end of a string) 2001-10-07 00:29:59 +00:00
Luigi Rizzo
56d75155a6 Fix a typo and sync a comment with the version in RELENG_4 2001-10-07 00:21:13 +00:00
Luigi Rizzo
19323fdd72 Add functions to lookup in /etc/networks and set interface
addresses, invoke them from /etc/rc
2001-10-04 00:46:44 +00:00
Luigi Rizzo
f03ad5f550 Add "networks" file used to lookup netmasks 2001-10-04 00:46:03 +00:00
Luigi Rizzo
c1a4244819 Use @__CWD__@ as the magic string meaning "this directory"
in crunch.conf -- the previous choice, CWD, was too subject to false
matches (this string will be replaced by the absolute pathname
during the build process).
2001-10-04 00:42:20 +00:00
Luigi Rizzo
4cd80eaaaf A somewhat large change of this script.
From the user's perspective:
 * everything is now built outside the source tree (more precisely,
   in `pwd`/builddir-${name}/ ) except for the kernel config file(s)
   which still need to be copied into src/sys/i386/conf because of
   "config" limitations. I am not sure if there is an easy way
   to get away from this without changing "config" or replicating
   some part of the source tree.
   This is really the only change that most users should worry about,
   but it is a good one.

 * if you do cross-compiles (using "picobsd --src somedir/src [--init] ... ")
   then the libraries and include directories etc.  are searched/created
   in "somedir/usr" ;

 * you can do most things (basically build the kernel and the crunched
   binary and the filesystem trees) without root privileges. You need
   privileges to use mdconfig/vnconfig to create the actual MFS and
   floppy image, unfortunately.

 * the -v option now prints some diagnostic but does not stop for
   user input at each step. You need to specify -v -v to have the
   old behaviour.

Internally, the script has been reshuffled quite a bit to support
the above features. Many shell variables have been renamed or
made local in an effort to avoid undesired side effects. There is
a somewhat better error handling in case something goes wrong.
2001-10-02 17:06:51 +00:00
Luigi Rizzo
d8e39ff94b Compile the kernel under ${BUILDDIR} instead of polluting the source
tree. Unfortunately the latter cannot be completely readonly, because
"config" still depends on the kernel config file being in sys/${ARCH}/conf
(it seems to derive other pathnames from that one).
2001-10-02 16:53:50 +00:00
Luigi Rizzo
7bdc285403 Remove some entries to make the image fit into a floppy again. 2001-10-01 17:32:43 +00:00
Luigi Rizzo
de9c5aeaaf Whoops, I whould have removed the old entry... 2001-10-01 17:22:25 +00:00
Luigi Rizzo
150dba7952 Move up the tinyware entry so things are looked up there first. 2001-10-01 17:21:33 +00:00
Luigi Rizzo
a61f7148ba Add customised version of login for picobsd images on -CURRENT.
This version is basically the same one as login.c 1.67, and does
not require the use of PAM.
2001-10-01 16:58:28 +00:00
Luigi Rizzo
ed301014c5 Add "ln" entries for ssh, ssh1 and scp 2001-09-30 17:38:42 +00:00
Luigi Rizzo
dd23a435e6 Modify wildcard for vmware interfaces. I am not sure how
MAC addresses are generated for those interfaces, but as long
as the entry is next to the bottom of the list the chance of
conflicts is low.
2001-09-30 17:37:03 +00:00
Luigi Rizzo
d38e229ac3 Move a bunch of initialization into a function which must be run
before parsing the command line.
Move code to build include and libraries in a separate function,
so we can use the verbose flag for that.
Chang ownership of some directories so more of the build process
(namely, builds of include and libs) can be run without root
permission (we still depend on root permission to mount a memory
filesystem).
2001-09-28 21:02:15 +00:00
Luigi Rizzo
04d4d7cf05 Add entries for vmware interfaces. 2001-09-27 16:48:13 +00:00
Luigi Rizzo
e8b19bc63e Enable the use of wildcards in the #ethertable section of
/etc/hosts to map MAC addresses to hostnames.

Main use is to get addresses for vmware interfaces.
2001-09-27 16:47:45 +00:00
Josef Karthauser
8b7c2294ba On -current with devfs there is no MAKEDEV in /dev anymore, so use
it from ${SRC}/etc/MAKEDEV instead.

We may want to do this on -stable as well, but for now -stable still
uses /dev/MAKEDEV.
2001-09-20 13:34:16 +00:00
Josef Karthauser
1a77e80042 Relocate the memory disk selection code to the same place the other
variables are set.
2001-09-20 13:09:01 +00:00
Josef Karthauser
d845f3651a Remove options INTRO_USERCONFIG, MFS, USERCONFIG and VISUAL_USERCONFIG
from the PicoBSD kernel files as they're not relevant any more to
-current.
2001-09-20 11:30:39 +00:00
Luigi Rizzo
a2f6c865cd Make the script aware of mdconfig, so it can hopefully run on -CURRENT
as well. This works by selecting "md" or "vn" depending on "uname -r"
output, so we can use the same script on -CURRENT and -STABLE.
Also included minor bugfixes and code cleanup.

Testers welcome, as this code has only been tested on -STABLE
(and for this reason I am doing an immediate MFC).
2001-09-20 02:52:02 +00:00
Luigi Rizzo
78734cf9ad Remove "more" from the list, the port has not been committed yet.
Remove "mount_nfs" to reduce image size.
2001-09-05 16:06:40 +00:00
Luigi Rizzo
0e3d2dd788 Add lnc driver, so one can test picobsd images with vmware 2001-09-05 16:05:05 +00:00
Luigi Rizzo
1d199fd358 Move commands to create stripped kernel into Makefile.conf,
so as to make the "picobsd" script less version-specific.

Improve handling of cross-builds (which requires creation of
includes and libraries for the new source tree).

The "picobsd" script will not probably work on -current because it still
uses 'vn' instead of 'md', but i am commiting it anyways to keep it
in sync with the version in -stable.
2001-09-04 02:01:52 +00:00
Luigi Rizzo
93c013c83e use correct "compile" directory, which is ../../compile/<filename>
This does not apply to RELENG_4 for which the compile directory is
../compile/<filename>
2001-09-01 21:19:15 +00:00
Luigi Rizzo
7f61417f8e Supply a default value for the kernel config binary. 2001-09-01 19:16:00 +00:00
Luigi Rizzo
e619430f32 Bugfix: Use the correct variable for picobsd type (same bug is
present in STABLE).  Also add a bit more logging (when enabled).
2001-09-01 18:27:39 +00:00
Luigi Rizzo
5d97a228a8 add a missing -o.
There might be some other bug related to OBJDIR handling, once
fixed these changes can be MFC immediately.
2001-08-30 21:39:14 +00:00
Kris Kennaway
56bded8a29 s/adress/address/
Inspired by:    OpenBSD
MFC After:      1 week
2001-07-23 12:05:27 +00:00
Dima Dorfman
70d51341bf mdoc(7) police: remove extraneous .Pp before and/or after .Sh. 2001-07-09 09:54:33 +00:00
Brian Somers
7bc6d0158f Fix the type of the NULL arg to execl()
Idea from: Theo de Raadt <deraadt@openbsd.org>
2001-07-09 09:24:06 +00:00
Thomas Moestl
df06371f65 Account for the machdep.msgbuf -> kern.msgbuf renaming. 2001-07-03 19:51:53 +00:00
Luigi Rizzo
8b3dd2e8c8 Remove tcpdump from the list of binaries. When cross-compiling
I get a link error on in6addr_<something> and i cannot find the
symbol in any of the libraries. It might be my mistake, but in any
case the crunched binary would overflow the floppy, so...

This applies to -current only.
2001-06-21 08:59:12 +00:00
Luigi Rizzo
2dc4c9a2f2 Remove support of I386_CPU in -current.
Make sure hints are statically compiled into the kernel,
because the bootloader is not available in picobsd and so the
hints file cannot be found at run time.

(This is kind of inconvenient if you have to handle non PnP devices,
but fortunately these days non-PnP ISA cards are disappearing...)
2001-06-21 08:56:59 +00:00
Luigi Rizzo
a177be2c24 Use /dev/fd0 instead of /dev/fd0c for mounting the floppy.
This must have to do with the use of devfs in -CURRENT, but i
have no idea when the devfs is actually mounted (is it a
side effect of mount -t nonfs or what ?) and when /dev/fd0c becomes
available.
For the time being, let's use this hack. Once I understand how devfs
works, this can be reverted back to the previous value, and also the
part of the build script which creates device entries can be nuked.
This is for -current only.
2001-06-21 08:53:21 +00:00