Commit Graph

1054 Commits

Author SHA1 Message Date
Ruslan Ermilov
475ab3cda6 Align CLEANFILES with revision 1.25 changes. 2002-05-13 16:16:00 +00:00
Ruslan Ermilov
26aace39ab Fixed CLEANFILES after bsd.lib.mk sweep. 2002-05-13 15:48:05 +00:00
Ruslan Ermilov
46f8fdc34e Removed now unused INTERNALSTATICLIB.
INTERNALLIB now implies NOPIC and NOPROFILE.
Removed gratuitous NOMAN.
2002-05-13 11:09:07 +00:00
Ruslan Ermilov
2a53f3fb35 Major cleanup of bsd.lib.mk.
Get rid of the INTERNALSTATICLIB knob and just use plain INTERNALLIB.
INTERNALLIB now means to build static library only and don't install
anything.  Added a NOINSTALLLIB knob for libpam/modules.  To not
build any library at all, just do not set LIB.
2002-05-13 10:53:24 +00:00
David E. O'Brien
21ab21338d Match the default newfs UFS block size. 2002-05-13 05:09:34 +00:00
Bruce Evans
e754a32842 Saved 176 bytes by compiling with -fno-guess-branch-probability. The
default of -fguess-branch-probablility causes time optimizations (?)
like rewriting `if (foo) x++;' as
`if (!foo) goto forth; back: ; ...; forth: x++; goto back;".  This is
pessimizes space especially well on i386's because one short branch
gets converted to 2 long ones.

Removed -fno-align-foo since it is implied by -Os.  Previous commit
messages seem to have overstated the new alignment bugs in gcc.  The
only case that affects boot2 is that -fno-align-functions (or
equivalently -falign-functions=1) actually gives -falign-functions=2.
This is caused by FUNCTION_BOUNDARY being 2 (bytes) instead of 1.
The default case where the optimization level is 1 and no alignment
options are given is more broken.  All alignments are minimal, modulo
the bug in FUNCTION_BOUNDARY.  This is caused by toplev.c setting
defaults too early.

Some hacks in previous commits ar not needed now, but may as well be
kept until gcc is fixed.  The previous on in the Makefile saved 96
bytes of text due to the wrong FUNCTION_BOUNDARY and 32 bytes of data
due to unrelated bloat in the alignment of large objects.  There aren't
even any options to control alignment of data.
2002-05-12 15:45:28 +00:00
David E. O'Brien
95cfc25d0d Back out last commit. I expect our bsd.*.mk gods to remove the need for
defining so many extra things in addition to INTERNALLIB.  We don't like
repetitive C code and we shouldn't for make code either.
2002-05-12 13:54:42 +00:00
Jake Burkholder
6cc8d3ac6b Attempt to not crash and burn on UltraSPARC III machines; the cpuid property
is named differently.
2002-05-11 22:05:22 +00:00
Peter Wemm
92948f4701 Save about 60 bytes by #define memcpy __builtin_memcpy and removing
the function we provided.  Restore the Keyboard: yes/no  printf for the
probe diagnostics.  We end up with 40 bytes free.
2002-05-11 21:49:39 +00:00
Peter Wemm
1333378a61 Reconnect boot2. I'm sure I'll regret this though. :-) 2002-05-11 21:41:03 +00:00
Peter Wemm
7a163a83da Use a crowbar and duct-tape to make boot2 fit again. This gets it down
to 4 bytes free.  I removed a printf (the Keyboard yes/no) since it is of
marginal value and sed'ed the generated asm output to remove the unwanted
aligns.  There's probably a better way to gain a few extra bytes than
losing the printf.  Shortening strings is probably a better option but this
should get us over the hurdle.
2002-05-11 21:39:59 +00:00
Jake Burkholder
d07160f401 Change the disk probing so that it will actually find disks other
than the first one on a controller, and work for secondary
controllers.
Due to the prom not having nodes for each disk, but a catch-all one,
we have to iterate over each device, trying to open it to determine
whether it is actually present.
Since probing this way takese some time (and spews some spurious
warnings), it should maybe be short-circuited if we use the
device we were booted from.
Implement lazy device probing, and correct slice/partiniton
handling in the ofwd_open() code. With this, I can now actually boot
a kernel from disk, and the loader does not create unnecessary
delays.

Submitted by:	tmm
2002-05-11 21:30:46 +00:00
David E. O'Brien
3bf8b9cee3 NOPIC, NOPROFILE, NOMAN, and INTERNALSTATICLIB are redundant when using
INTERNALLIB now.
2002-05-11 18:02:33 +00:00
David E. O'Brien
d1bdfb40fd -ffreestanding is the word.
(also resort some CFLAGS such that the more "important" value are first so
they are easier to see)
2002-05-10 09:26:35 +00:00
John Baldwin
88f0d73da4 - Axe -mpreferred-stack-boundary=2 as -Os turns this on by default.
- Axe -fdata-sections as turning it on or off makes no difference.  If
  it did make a difference it would serve to bloat boot2 even further with
  extra padding.
- Axe -fforce-addr.  This gets us 32 bytes so we are down to only being
  64-bytes over.

We still can't compile this with gcc 3.1.  The problem seems to be that
the -fno-align-foo options don't actually work.  Comparing the new and
old output it turns out that gcc is 4-byte padding all the functions and
labels and what not despite the passed in arguments thus adding the
unfortunate bloat to boot2.
2002-05-10 04:05:42 +00:00
David E. O'Brien
54fd053e6c We don't need bootinfo any more, and sparc64 doesn't have it anyways. 2002-05-10 01:20:37 +00:00
David E. O'Brien
07776d8fb2 Don't be redundant. 2002-05-10 01:06:52 +00:00
David E. O'Brien
7571ef5ae3 -ffreestanding is the word for /sys. 2002-05-10 00:53:45 +00:00
David E. O'Brien
708a23c342 Turn off boot2 -- it gained over 96 bytes dieting on the in-tree Gcc 3.1. 2002-05-10 00:52:00 +00:00
David E. O'Brien
f21450f69f Ficl doesn't build on sparc64. 2002-05-09 20:33:22 +00:00
David E. O'Brien
a89dc896b5 Partical style cleanup. 2002-05-09 17:47:25 +00:00
Josef Karthauser
1063e12617 Replace /kernel with /boot/kernel/kernel.
PR:		docs/37757
Submitted by:	Hiten Pandya <hiten@uk.FreeBSD.org>
2002-05-09 11:47:42 +00:00
Wes Peters
8373917257 Rename the file used to specify the nextboot to make it clear that this
is a loader configuration file and can be used for more than just a
kernel name.

Submitted by:	Gordon Tetlow <gordont@gnf.org>
2002-04-26 22:32:15 +00:00
Daniel C. Sobral
1a923a14f4 A long, long time ago, msmith introduced vfs.root.mountfrom
loader variable, which let users specify the root mount point
the exact way one does after booting the kernel.

Let's take this opportunity to document it...
2002-04-26 20:52:59 +00:00
Wes Peters
1de372dcd4 Add a -k option to reboot to specify the kernel to boot next time
around.  If the kernel boots successfully, the record of this kernel
is erased, it is intended to be a one-shot option for testing
kernels.

This could be improved by having the loader remove the record of
the next kernel to boot, it is currently removed in /etc/rc immediately
after disks are mounted r/w.

I'd like to MFC this before the 4.6 freeze unless there is violent
objection.

Reviewed by:	Several on IRC
MFC after:	4 days
2002-04-26 07:31:04 +00:00
Yoshihiro Takahashi
27ecba3177 MFi386: revision 1.56 2002-04-25 13:31:27 +00:00
Yoshihiro Takahashi
f9ef610bd0 MFi386: revision 1.8 2002-04-25 13:28:10 +00:00
Jake Burkholder
127e8646b8 Split file system setup code out into a function called mount.
Implement vsnprintf.  Implement panic in terms of it.
2002-04-24 05:54:10 +00:00
Jake Burkholder
0d0c927680 Add support for loading files other than /boot/loader. Useful if you're
loader is screwed and you want loader.old.
Rewrite the scaled down printf so it actually works right, and add support
for more formats.
2002-04-24 04:27:49 +00:00
Jake Burkholder
3ff6556567 Add an exit function. 2002-04-24 02:50:59 +00:00
Jake Burkholder
083d8c5bab Add -Wno-unused. 2002-04-24 02:50:36 +00:00
Jake Burkholder
8c2f8986a6 memcpy, memset -> bcopy, bzero. 2002-04-24 02:24:32 +00:00
Jake Burkholder
4b487ad2ec Clean up elf loading to not make assumptions about the ordering of sections.
Don't load the symbol table; this is only needed for loading kernels and we
load the loader.
2002-04-24 02:10:35 +00:00
Jake Burkholder
e2b255fdea Remove xfsread. Just call fsread directly. 2002-04-24 01:47:05 +00:00
Jake Burkholder
912ceb7f18 Remove a bunch of unused variables, functions and macros. Allocate storage
statically instead of using a faked up malloc.
2002-04-24 01:40:54 +00:00
Marcel Moolenaar
77de753f65 Improve self-relocation:
o  We don't expect the PLT relocations to follow the .rela section
   anymore. We still assume that PLT relocations are long formed,
o  Document register usage,
o  Improve ILP,
o  Fix the FPTR relocation by creating unique OPDs per function.
   Comparing functions is valid now,
o  The IPLT relocation naturally handles the addend. Deal with it.
   We ignore the addend for FPTR relocations for now. It's not at
   all clear what it means anyway.

Fix ABI misinterpretation:
o  For Elf_Rela relocations, the addend is explicit and should not
   be loaded from the memory address we're relocating. Only do that
   for Elf_Rel relocations (ie the short form).
o  DIR64LSB is not the same as REL64LSB. DIR64LSB applies to a
   symbol (S+A), whereas REL64LSB applies to the base address (BD+A),
2002-04-21 08:49:47 +00:00
David E. O'Brien
34ef85ee3d o Use our own elf2aout now.
o Generalize a little.
2002-04-21 02:37:55 +00:00
Marcel Moolenaar
b226acefc2 Allocate sufficient pages to hold the bootinfo block and stop
hardwiring the location.
2002-04-19 06:43:09 +00:00
Ruslan Ermilov
2ecf206550 Install files via FILES, there's no reason to compare them before installing. 2002-04-17 16:56:36 +00:00
Ruslan Ermilov
092179f985 Really unbreak it this time (clean and install were still broken). 2002-04-17 15:33:40 +00:00
Yoshihiro Takahashi
0f8af5c368 MFi386: revision 1.7. 2002-04-15 13:44:00 +00:00
Ruslan Ermilov
2f42caa5de Unbreak this as well.
At the extra bonus of fixing the contents of the .depend file.

Not really my day.
2002-04-12 15:49:30 +00:00
Peter Wemm
31c41f1b1e Bandaid for a buffer overrun in the module searching code. When breaking
up the module_path string, we would walk one past the end of the buffer.
This hurting ia64 originally, but it was probably also happening on i386
occasionally as well.  The effects were usually harmless, it would add
bogus "binary" search directories to the places it actually looked for
files.
2002-04-11 10:00:44 +00:00
Peter Wemm
2ab188f529 Finally fix loader completely for IA64. efifs_stat() wasn't setting
the S_IFREG bit for regular files.  This caused the path search code to
skip it when it finally did find the kernel (after the common/module.c
buffer overrun bug was fixed)
2002-04-11 09:50:11 +00:00
Pierre Beyssac
2b9592079f Code cleanup, no functional change.
Patch adapted from PR.

PR:		i386/36015
Submitted by:	thomas@cuivre.fr.eu.org
MFC after:	1 week
2002-04-11 09:21:10 +00:00
Daniel C. Sobral
231b8f199f Upgrade FICL to 3.02. Forgot this one, sorry.
PR:		36308
Submitted by:	dcs
2002-04-09 20:59:34 +00:00
Daniel C. Sobral
be88b71603 Upgrade to FICL version 3.02. Anything wrong is my fault, everything right is
due Jon Mini.

PR:		36308
Submitted by:	Jon Mini <mini@haikugeek.com>
MFC after:	4 weeks
2002-04-09 17:45:28 +00:00
Jake Burkholder
bb75d97e13 Fix another unsigned long used to index the symbol table which should be
Elf_Hashelt.
2002-04-09 00:05:46 +00:00
Peter Wemm
c21ab46789 We must not let install(1) strip loader.efi when installing it, or the
resulting binary will be damaged and no longer work.
2002-04-07 04:27:50 +00:00
Peter Wemm
1e7e1ea54d Set BINDIR 2002-04-07 04:26:42 +00:00