Commit Graph

1375 Commits

Author SHA1 Message Date
ru
33e9fd9b16 Get rid of unnecessary use of m4(1) by using cpp(1) instead.
(John tells me there were problems when trying this before,
but it appears to be safe these day.)

OK'ed by:	jhb
Repocopied by:	joe
2004-02-11 08:42:38 +00:00
ru
e96509b7a9 Since loader(8) on SPARC64 is a pure ELF executable (as opposed
to other architectures), there is no reason not to strip(1) it.

Tested by:	kensmith
2004-02-10 22:11:36 +00:00
grehan
d1793ee09c Loader makefile cleanup.
Submitted by:  ru
2004-02-09 21:54:54 +00:00
nyan
046cd65463 MFi386: Factor out -nostdlib and use PROG. 2004-02-09 16:01:45 +00:00
ru
8efe90a34f MFi386.
- Factor out common settings and put them in an upper level Makefile.inc.
- Properly use PROG for real programs, not their products.
- Further reduce diffs to i386 versions.

Tested on:	sparc64 (panther)
2004-02-09 14:17:02 +00:00
ru
2e8c68a86d - Factor out -nostdlib to an upper level Makefile.inc.
- Now that bsd.prog.mk deals with programs linked with -nostdlib
  better, and has a notion of an "internal" program, use PROG
  where possible.  This has a good impact on the contents of
  .depend files and causes programs to be linked with cc(1).

XXX: boot2 couldn't be converted as it's actually two programs.

Tested on:	i386, amd64
2004-02-09 14:11:58 +00:00
ru
82db57343f Argh, unbreak "make depend" for AMD64.
Reported by:	kris
2004-02-07 23:30:45 +00:00
ru
4e8453939a MFi386: Removed -elf and duplicate -ffreestanding. 2004-02-07 14:35:33 +00:00
ru
f72b868e4b - Removed -elf which is not a valid gcc(1) option anymore.
- Removed -ffreestanding; it's enforced by ../Makefile.inc.
2004-02-07 14:32:06 +00:00
ru
cd27bb419a Generate .depend file. 2004-02-07 13:38:47 +00:00
nyan
161275f577 MFi386: Cleanups to sys/boot makefiles. 2004-02-07 12:19:44 +00:00
ru
e4e26d832b Style: use the defined() expression explicitly. 2004-02-07 11:05:10 +00:00
ru
ec3d9cf4c1 Untangle building of AMD64 boot code.
Tested on:	amd64 (sledge)
2004-02-07 08:10:07 +00:00
ru
3b79affac4 First round of cleanups to sys/boot/ makefiles:
- do not use PROG for what's not a real C program,
- use sys.mk transformation rules where possible,
- only create the "machine" symlink on AMD64,
- removed MAINTAINER lines in individual makefiles,
- added the LIBSTAND defitinion to <bsd.libnames.mk>,
- somewhat better contents in .depend files.

Tested on:	i386, amd64
Prodded by:	bde
2004-02-06 21:58:32 +00:00
ru
32ebedf6ce Inherit BINDIR from a parent Makefile.inc. 2004-02-06 12:58:32 +00:00
ru
1cb0435d20 Only include ../Makefile.inc once in loader/Makefile. 2004-02-06 12:45:27 +00:00
nyan
48e665a355 MFi386: revision 1.33
PR:	kern/62005
2004-01-28 04:15:31 +00:00
schweikh
623c323d6f Sync with Oxford Dictionary. Style (add missing full stops) while I'm here. 2004-01-27 22:15:03 +00:00
des
dff7f5a96a Rename the kern.vm.kmem.size tunable to the more logical vm.kmem_size. To
assure backward compatibility (conditional on !BURN_BRIDGES), look it up
by its old name first, and log a warning (but accept the setting) if it
was found.  If both the old and new name are defined, the new name takes
precedence.

Also export vm.kmem_size as a read-only sysctl variable; I find it hard to
tune a parameter when I don't know its default value, especially when that
default value is computed at boot time.
2004-01-27 15:59:38 +00:00
jhb
3ba56a401e If a transfer to or from a floppy disk crosses a 64k boundary, we have to
use a bounce buffer for the actual transfer to avoid crossing a 64k
boundary.  To do this, we malloc a buffer twice as big as we need and then
find an aligned block within that buffer to do the transfer.  The check
to see which part of the block we use used the wrong variable for part of
the condition meaning that in certain edge cases we would ask the BIOS to
cross a 64k boundary.  The BIOS request would then fail resulting in file
transfers that just magically fail in the middle without any apparent
reason.  Specifically, my tests for the splitfs boot floppies managed to
trigger this edge case.

MFC after:	1 week
X-MFC-info:	along with fixes to libstand filesystems
2004-01-21 23:22:29 +00:00
nyan
27d1312c0c PC98 uses the different frame code. 2004-01-18 04:13:27 +00:00
nyan
689b60477a Fix to support KANA and graphics characters which code are over 0x80. 2004-01-18 04:10:45 +00:00
jhb
c9ad44fcb6 - Use constant for shift when converting file length in bytes to a sector
count.
- Fix the twiddle output so that it actually spins.
- Save %cx around BIOS calls to read in sectors from the disc as at least
  one BIOS trashes %cx when called to read off of a USB CD-ROM drive.

Submitted by:	Martin Nilsson <martin@gneto.com>
MFC after:	1 week
2004-01-12 20:34:42 +00:00
scottl
cc5af51c26 Disable the APIC when selecting the 'Safe Mode' option of the loader. This
will disable both APIC interrupt routing and SMP.
2004-01-09 19:20:47 +00:00
obrien
bb294ef325 Allow one to specify the com port settings for boot0sio. 2004-01-06 18:46:35 +00:00
obrien
62e7beb6ed Convert to __FBSDID. 2004-01-04 23:30:47 +00:00
obrien
418a552ea3 Convert to __FBSDID. 2004-01-04 23:21:18 +00:00
grehan
97c52522b2 - Add ':' as a separator between the OpenFirmware device space and
the file path. Commonly used on Macs e.g. "hd:9".
- Update the ofw_setcurrdev routine to match libstand setenv prototype

Not objected to by: sparc64
2003-12-21 12:38:25 +00:00
grehan
2504e68699 Make __elfN(ofw_loadfile) match parameter declaration for file_format
in boot/common/bootstrap.h. Having a 32-bit size when a 64-bit param
is declared wreaks havoc on PPC.

Not objected to by: sparc64
2003-12-21 12:27:01 +00:00
grehan
a787f1c4da Only print out an error if returned data size is < 0. A value of 0
happens almost every time at the end of a file when using NFS.

No objection by: sparc64
2003-12-21 12:19:38 +00:00
grehan
849ffb38ee Use daddr_t instead of u_long for byte offset in strategy
routine to avoid >4G truncation on 32-bit systems.

no objection by: sparc64
2003-12-21 12:16:58 +00:00
grehan
931e64e9c5 - use correct pointer arithmetic in heapsize calculation
- handle multiple Ofw memory regions when determining mem size
- allow currdev to be set as a loader command-line option.
  parse() is used to allow future options to be processed.
2003-12-21 12:11:31 +00:00
jhb
37113d0b2c - Change the lookup() function to report success or failure using the carry
flag rather than explicitly halting if a lookup failed.
- Add a loop around the call to lookup() to traverse an array of
  nul-terminated strings for possible paths to the boot loader.  A double
  nul character denotes the end of the list.
- Add a new message to say that the boot failed if all of the path lookups
  for a boot loader file failed.
- Add '/boot/loader' as a second boot path.  If you build an ISO using
  risky options to mkisofs such as -U then the loader will be called
  '/boot/loader' rather than '/BOOT/LOADER;0'.  This allows cdboot to work
  with such risky ISO images.
- Bump version to 1.2 to denote added functionality.

The basic idea as well as some of the code were provided by the submitter,
but I added some extra code to use a loop rather than hard-code just 2
possible paths.

PR:		misc/43543
Submitted by:	kientzle
MFC after:	1 week
2003-12-11 22:42:50 +00:00
jhb
0fbcd5a526 Properly fix a typo that the previous revision made even worse. 2003-12-11 20:40:12 +00:00
jhb
4e7f643387 Fix typo in comment. 2003-12-10 19:08:09 +00:00
grehan
4b7769376f Enable FICL build on powerpc 2003-12-10 09:18:42 +00:00
grehan
6861d1e873 Update libstand filesystems to be in-line with tier-1 platforms. 2003-12-10 09:17:01 +00:00
grehan
5e2c5f4d83 - Bring Makefile up to rev with sparc64 in terms of config options and rules
- Move loader relocation up to 0x1C00000. This is in line with OSX bootx,
  and allows more space for boot-time modules/ramdisks without conflicting
  with OpenFirmware's use of RAM
2003-12-10 09:16:22 +00:00
grehan
4586eb88d4 Disable floating point on PowerPC for the ficl library. 2003-12-10 09:10:54 +00:00
grehan
ea73bb881c Define 'arch-powerpc' 2003-12-10 09:09:38 +00:00
grehan
f2833e26c2 FICL system-dependent files for powerpc. Taken from the i386 versions,
which were the most relevant.
2003-12-10 09:05:08 +00:00
marcel
ff65708b59 Fix the build of libski now that we use the "official" MADT table
definitions. Those are slightly different than the ones we used
before ACPI-CA 20031203 got imported. No structural or functional
change.
2003-12-09 08:35:17 +00:00
obrien
e9fceb8858 Sync these two files. 2003-12-09 05:40:06 +00:00
obrien
cbd974c8b6 Hook boot0sio to the build. Use 'boot0cfg -b /boot/boot0sio' to use. 2003-12-08 19:02:06 +00:00
bms
91f8e38d0e Add a serial console capable version of the FreeBSD boot manager. This has
been lying around my tree(s) for the past year or so. It could do with TLC.

Requested by:	obrien
Sponsored by:	Weyland-Yutani Corporation
2003-12-08 17:51:39 +00:00
dcs
e49b828f3c With the beastie menu a problem was introduced in which selecting a
different kernel to boot with kernel="NAME" would load the kernel and
loader.conf-selected modules from /boot/NAME, but it would not change
module_path. So, for instance, the automatically loaded acpi.ko would come
from /boot/kernel/acpi.ko, *always*.

Mind you, this happened for unassisted boot. If you interrupted, typed
"unload" and then "boot NAME", it would Do The Right Thing.

The source of the problem is the double initialization with beastie's
loader.rc. One would happen inside "start", and would load the kernel. The
next one would happen later in the loader.rc script, resetting module_path.

Because module_path is set to the Right Value by the functions in support.4th
that actually load the kernel, when beastie.4th proceeded to boot
module_path would remain wrong, as the kernel was already loaded.

This can be corrected by removing either initialization, and also by changing
the command used by beastie.4th from "boot" to "boot-conf", which makes sure
you use the right kernel and modules.

I chose to remove the second initialization, since this let you interrupt
(or confirm) boot before beastie even comes up. I avoid also doing the
boot-conf change because that would simply cause the kernel and modules to
be loaded twice (in fact, that was my original patch, until, in writing this
very commit message, I saw the error of my ways).

This commit changes the semantics of module loading when using the beastie
menu. Now it does what one would expect it to, but not what it was actually
doing, so something may break for unusual setups depending on broken
behavior. As our japanese friends so nicely put it, shikata ga nakatta. :-)

Approved by:	re (scottl)
2003-11-21 19:01:02 +00:00
jhb
270abadccb Update the size of the OS string table that wasn't updated in the previous
commit that removed the UNIX entry.

Submitted by:	Rudolf Cejka <cejkar@fit.vutbr.cz>
Approved by:	re (rwatson)
2003-11-20 20:28:18 +00:00
phk
182003c916 When rebooting the machine jump to 0xf000:0xfff0 instead of 0xffff:0x0.
While we end up the same place, we end up with two different CS register
values after the jump and 0xf000 is compatible with the hardware reset
value.

This makes a difference if the BIOS does a near jump before a far jump.

Detective work and patch by:	 Adrian Steinmann <ast@marabu.ch>
2003-11-16 18:24:23 +00:00
nyan
03f8ec31a5 MFi386: revision 1.13. 2003-11-15 12:25:47 +00:00
bde
8d33193f2d Changed the RB_PAUSE flag from 0x40000 to 0x100000 and marked the old
value as reserved for internal use in boot blocks, because RB_PAUSE
broke binary compatibility by usurping the RB_DUAL flag.  Probably no
one except me has boot blocks for which this matters, since most boot
blocks based on biosboot including pc98's boot2 can't boot elf kernels,
and /boot/loader doesn't properly pass flags set by the previous stage.

reboot.h:
Also mark the historical RB_PROBEKBD flag (0x80000) as reserved for
internal use in boot blocks.

boot2.c:
Added comments to inhibit usurping of other flags.

Approved by:	guido, imp
MFC after: 	1 week
2003-11-15 10:04:06 +00:00