- use proper make configuration for the build, using
${BINMAKE} as evaluated by ${VERSION}/src/Makefile
- remove -lmytinfo from crunch.conf
- remove support for login_access in tinyware/login
- remove "machine i386" from the kernel config file
It might actually be interesting to extend the script to do
a cross build for !i386 ...
MFC after: 3 days
them unsigned I made the possible overflows hard to detect,
and it only saved 1 bit which isn't principal, even less now
that the underlying issue with the total of virtual memory has
been fixed. (For the record, it will overflow with >=2T of
VM total, with 32-bit ints used to keep counters in pages.)
- While here, fix printing of other "struct vmtotal" members
such as t_rq, t_dw, t_pw, and t_sw as they are also signed.
Reviewed by: bde
MFC after: 3 days
- Fix overflow bugs in sysctl(8), systat(1), and vmstat(8)
when printing values of "struct vmmeter" in kilobytes as
they don't necessarily fit into 32 bits. (Fix sysctl(8)
reporting of a total virtual memory; it's in pages too.)
- <netipx> headers [1]
- IPX library (libipx)
- IPX support in ifconfig(8)
- IPXrouted(8)
- new MK_NCP option
New MK_NCP build option controls:
- <netncp> and <fs/nwfs> headers
- NCP library (libncp)
- ncplist(1) and ncplogin(1)
- mount_nwfs(8)
- ncp and nwfs kernel modules
User knobs: WITHOUT_IPX, WITHOUT_IPX_SUPPORT, WITHOUT_NCP.
[1] <netsmb/netbios.h> unconditionally uses <netipx> headers
so they are still installed. This needs to be dealt with.
- add -lgeom
- use bsdlabel instead of disklabel
- increase image size to 2.88M (plenty of free space left)
note, this is not really a bridge because the old-style
bridging code is not in 7.0 anymore, so the kernel config
file should be changed.
replacement and has additional features which make it superior.
Discussed on: -arch
Reviewed by: thompsa
X-MFC-after: never (RELENG_6 as transition period)
to PRECIOUSLIB from bsd.lib.mk. The side effect of this
is making installing the world under jail(8) possible by
using another knob, NOFSCHG.
Reviewed by: oliver
with the following changes:
1) Don't make a mime_types.h 'cos we should avoid creating variables
in header files,
2) Use strrchr to find the extension, rather than strchr,
3) Slightly simplify the mime-type matching loop.
any goof are likely to be mine. Note that there are links to more
improvements by Eugene in the PR.
PR: 29725
Submitted by: Eugene Grosbein <eugen@kuzbass.ru>
+ declare some shell variables as 'local'
+ add a missing ';;' in a 'case' statement
+ centralize newfs options
+ properly override GID and UID when installing include files and libraries
+ add a missing '-r' in disklabel commands (maybe not necessary, but it
does not harm and it was used in the RELENG_4 version)
+ no more require 'perl' when installing the secondary loader
+ use '-t rsa1' when invoking ssh-keygen
These files had tags after the copyright notice,
inside the comment block (incorrect, removed),
and outside the comment block (correct).
Approved by: rwatson (mentor)
and does not fit into a floppy anymore (1403kb available).
There is not much you can do now except bumping up the image size
(by uncommenting the "fd_size=2880" line in ./config),
at which point you can uncomment sshd, the associated library,
and all the good stuff such as tcpdump and natd and ppp that
you might want on such a box.
A similar change should be applied to other picobsd image types.
1) Make fetch_mode a pointer 'cos we can just use the optarg.
2) Constness.
3) Add/complete prototypes.
4) Change an int to a socklen_t.
5) Don't use C++ style comments.
6) Check return values from read and fork a little more carefully.
7) Avoid closing an uninitialised int.
8) Get rid of unneeded extern declarations.
Following a suggestion by Ruslan, the initial creation of the
includes and libraries (and build tools) is now done by
invoking "make buildworld" (with -DPICOBSD which eventually will
limit the amount of stuff built with a 2-line change in Makefile.inc1).
The correct environment is then used for subsequent builds.
Also remove write_mfs_in_kernel.c in favour of using dd
All the above is conditional on __FreeBSD_version, as the previous
method still worked for versions earlier than 500035, and I am
unsure on how the "new" method works for earlier versions.
Finally, note that the crunch.conf files need some work because
some libraries (e.g. gmd) have gone away from the base installation.
filesystem expands the inode to 256 bytes to make space for 64-bit
block pointers. It also adds a file-creation time field, an ability
to use jumbo blocks per inode to allow extent like pointer density,
and space for extended attributes (up to twice the filesystem block
size worth of attributes, e.g., on a 16K filesystem, there is space
for 32K of attributes). UFS2 fully supports and runs existing UFS1
filesystems. New filesystems built using newfs can be built in either
UFS1 or UFS2 format using the -O option. In this commit UFS1 is
the default format, so if you want to build UFS2 format filesystems,
you must specify -O 2. This default will be changed to UFS2 when
UFS2 proves itself to be stable. In this commit the boot code for
reading UFS2 filesystems is not compiled (see /sys/boot/common/ufsread.c)
as there is insufficient space in the boot block. Once the size of the
boot block is increased, this code can be defined.
Things to note: the definition of SBSIZE has changed to SBLOCKSIZE.
The header file <ufs/ufs/dinode.h> must be included before
<ufs/ffs/fs.h> so as to get the definitions of ufs2_daddr_t and
ufs_lbn_t.
Still TODO:
Verify that the first level bootstraps work for all the architectures.
Convert the utility ffsinfo to understand UFS2 and test growfs.
Add support for the extended attribute storage. Update soft updates
to ensure integrity of extended attribute storage. Switch the
current extended attribute interfaces to use the extended attribute
storage. Add the extent like functionality (framework is there,
but is currently never used).
Sponsored by: DARPA & NAI Labs.
Reviewed by: Poul-Henning Kamp <phk@freebsd.org>
the author obviously meant a void since he doesn't return any values.
One caveat, http_request has three return()'s, but doesn't do anything
with it. Either the code needs to be rewritten to take care of proper
error handling on that point, or the returns ripped out. I made it void
for now.
We had to give up DDB and grep this time...
Add a hint in "config" on how to increase the image size so
we can stuff more things in the image (mostly for use on a CDROM).
directories when writing to disk.
Use the (yet to be committed) sysctl variable kern.bootdevname
to derive the device name, fallback to /dev/fd0 if kern.bootdevname
is unset or not available.
closer to doing "the right thing".
The structure is now the following:
* /etc/rc (from MFS) loads the rest of /etc and /root from
/fd and then from floppy (if present), then transfers control
to /etc/rc1
* /etc/rc1 loads defaults from /etc/rc.conf.defaults, tries to
set the hostname basing on the MAC address of the first ethernet
interface, and then sources /etc/rc.conf and /etc/rc.conf.local
for local configurations
* The rest of the startup process is then performed (rc.network and so on).
Everything except the initial /etc/rc (from MFS) can be overridden with
a local version loaded from floppy. But in most cases, you should only need
to customize the following files in /etc:
rc.conf rc.firewall hosts
Previously there were a number of inconsistencies in the calling
between files, and also a lot of clutter in rc.conf and rc.firewall.
Also, "rc1" was called "rc" and would overwrite the initial /etc/rc
from MFS, making it really hard to figure out what was going on in
case of bugs.
+ fix some dialog entries to correctly modify variables instead of working
in a subshell
+ add a logverbose function for debugging purposes
+ force 512/4096 blocks on filesystems
+ use 'auto' for disklabel so it works irrespective of the floppy size.
This is useful for larger images than 1720k
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.
"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.
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...
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).
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.
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).
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.
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).
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).
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).
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.
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.
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...)