Commit Graph

1058 Commits

Author SHA1 Message Date
obrien
a6606f515d 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
f54014e7c3 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
38864d15d9 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
4da0d55eaa Reconnect boot2. I'm sure I'll regret this though. :-) 2002-05-11 21:41:03 +00:00
peter
73b309fd5f 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
a1b64a4737 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
obrien
8d5c888c32 NOPIC, NOPROFILE, NOMAN, and INTERNALSTATICLIB are redundant when using
INTERNALLIB now.
2002-05-11 18:02:33 +00:00
obrien
39cf9a8976 -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
jhb
a11990e850 - 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
obrien
20e51b70ff We don't need bootinfo any more, and sparc64 doesn't have it anyways. 2002-05-10 01:20:37 +00:00
obrien
5b456f8e1a Don't be redundant. 2002-05-10 01:06:52 +00:00
obrien
2b17593e04 -ffreestanding is the word for /sys. 2002-05-10 00:53:45 +00:00
obrien
d2af9a9d82 Turn off boot2 -- it gained over 96 bytes dieting on the in-tree Gcc 3.1. 2002-05-10 00:52:00 +00:00
obrien
a21d6c6c98 Ficl doesn't build on sparc64. 2002-05-09 20:33:22 +00:00
obrien
9b0b9784b2 Partical style cleanup. 2002-05-09 17:47:25 +00:00
joe
5d6d64b108 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
675489844a 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
dcs
5e6be20377 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
2db3e04183 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
nyan
9ea9202582 MFi386: revision 1.56 2002-04-25 13:31:27 +00:00
nyan
38459444e0 MFi386: revision 1.8 2002-04-25 13:28:10 +00:00
jake
72293f814d 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
62a9d7c2a6 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
86d656d4fb Add an exit function. 2002-04-24 02:50:59 +00:00
jake
e3a00ca111 Add -Wno-unused. 2002-04-24 02:50:36 +00:00
jake
6ca3e0a62f memcpy, memset -> bcopy, bzero. 2002-04-24 02:24:32 +00:00
jake
764280c1c7 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
9b46f9391d Remove xfsread. Just call fsread directly. 2002-04-24 01:47:05 +00:00
jake
d7133066f0 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
615d64e376 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
obrien
1c623074d6 o Use our own elf2aout now.
o Generalize a little.
2002-04-21 02:37:55 +00:00
marcel
0fdd58edf6 Allocate sufficient pages to hold the bootinfo block and stop
hardwiring the location.
2002-04-19 06:43:09 +00:00
ru
4da8e556f7 Install files via FILES, there's no reason to compare them before installing. 2002-04-17 16:56:36 +00:00
ru
9000f22529 Really unbreak it this time (clean and install were still broken). 2002-04-17 15:33:40 +00:00
nyan
b993a663e3 MFi386: revision 1.7. 2002-04-15 13:44:00 +00:00
ru
da177b72c4 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
96b818e57b 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
369ab8e7f2 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
pb
de9530a7e8 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
dcs
4dbf12b92d Upgrade FICL to 3.02. Forgot this one, sorry.
PR:		36308
Submitted by:	dcs
2002-04-09 20:59:34 +00:00
dcs
e0cd7655ee 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
53ee5eb3d9 Fix another unsigned long used to index the symbol table which should be
Elf_Hashelt.
2002-04-09 00:05:46 +00:00
peter
f0e2362cb4 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
6cff997ea1 Set BINDIR 2002-04-07 04:26:42 +00:00
peter
da212191a2 Add loader bootforth infrastructure and install it. 2002-04-07 04:25:45 +00:00
peter
37abfd0f43 Make it a bit closer to the EFI build and tie up some loose ends. 2002-04-06 04:33:53 +00:00
peter
9e58864005 Try and tidy up some very loose ends with paths to various libraries etc. 2002-04-06 04:29:36 +00:00
peter
4e72461ad3 Do not add the ficl/alpha subdir to the ia64 include path. Try ficl/ia64
instead.
2002-04-06 04:16:58 +00:00
peter
a4db7b2f18 Do not assume that ${OBJCOPY} variable exists. It was hidden by the
fact that the 'ia64-make' wrapper explicitly set it.
2002-04-06 04:11:46 +00:00
peter
280bcbf216 Use the correct elf hash table entry type. This matches a similar fix
in the kernel side of things some time ago.  The hash table entries are
always 32 bits wide, even on 64 bit machines.
2002-04-06 04:09:42 +00:00