Commit Graph

320 Commits

Author SHA1 Message Date
nakayama
8276d7c522 Make ofwboot can handle over 4GB physical memory by using OpenFirmware
calls properly, and some cosmetic changes.  Idea from OpenBSD.
2009-05-18 11:39:30 +00:00
roy
b49ed2c029 Make 3 attempts at bootp before trying bootparams which allows slow
bridges a chance to work.
Clear variables when changing bootp/bootparams.
Displayed variables are cleaned up so they don't overflow the right of
the screen.

ok: martin
2009-05-07 00:01:31 +00:00
tsutsui
0f492f906e assym.fth.h also requires sparc symlink. Fix build without DESTDIR. 2009-04-06 12:43:26 +00:00
tsutsui
e6bb0dedbf Use <bsd.klinks.mk> to create machine and ${MACHINE_ARCH} symlinks. 2009-03-29 07:19:40 +00:00
tsutsui
2a6ed85992 - use -Os to shrink bianries
- remove local shrinked memcpy() from bootxx.c bacause
  now it's identical with __OPTIMIZE_SIZE__ libsa one
  derived from src/common/lib/libc/string/bcopy.c.

Tested netboot from le0 and bootxx + boot from sd0 on SS1+.
2009-03-23 13:47:32 +00:00
he
009f7e26ee Now that the stand/ code was converted to use memcpy(), the private
implementation of bcopy() needs to become memcpy() as well.  The
simpler local implementation is needed so that the boot code doesn't
overflow the available space.
2009-03-19 14:05:24 +00:00
cegger
e2cb85904d bcopy -> memcpy 2009-03-18 17:06:41 +00:00
cegger
c363a9cb62 bzero -> memset 2009-03-18 16:00:08 +00:00
dsl
454af1c0e8 Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
2009-03-14 15:35:58 +00:00
abs
515e52158b Convert more MACHINE tests to MACHINE_ARCH 2009-02-14 13:50:50 +00:00
tsutsui
69cf32a782 Replace time_t values in libsa sources with the following two types
to avoid unnecessary 64 bit ops which would make binaries larger:

satime_t (currently unsigned int):
 numbers in seconds returned by the machine dependent getsecs() function
 which are used to measure relative time

saseconds_t (currently int):
 numbers in seconds used to specify timeout to network drivers

Per discussion on current-users.
2009-01-12 11:32:43 +00:00
apb
96230fab84 Use ${TOOL_AWK} instead of ${AWK} or plain "awk" in make commands.
Pass AWK=${TOOL_AWK:Q} to shell scripts that use awk.
2008-10-19 22:05:19 +00:00
martin
6d59516d22 Deal with kernels that have a combined text/data segment. Output a big
warning when booting them.
2008-08-25 22:31:12 +00:00
jdc
50c50f930f Instead of bailing out with "Inode not directory", assume that the disk is
a RAIDframe mirror, apply the RAID boot offset, and try to boot again.

Fixes the problem where disks would be unbootable if partitioned normally
and then converted to RAID 1 without being zeroed first.
2008-06-29 14:13:23 +00:00
mlelstv
1ea289c164 put back NetBSD tag 2008-05-18 13:18:19 +00:00
mlelstv
17740d28a4 add support for booting a kernel by tftp. Syntax is similar
to other systems, e.g.: boot net tftp:netbsd
2008-05-12 11:16:31 +00:00
mlelstv
85de90b807 return the length without padding. 2008-05-07 17:56:09 +00:00
martin
cd22f25e6f Move TNF licenses to 2 clause form 2008-05-02 18:11:04 +00:00
martin
ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
tsutsui
abb05145d7 Add support booting from UFS2 partition for sparc.
Tested on tme emulating SS2.

Closes PR port-sparc/36068.
2008-04-05 06:39:08 +00:00
garbled
d974db0ada Merge the ppcoea-renovation branch to HEAD.
This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree.  Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches.  The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
2007-10-17 19:52:51 +00:00
martin
cc47bef689 Enable booting from news Solaris ufs partitions. 2007-09-29 21:43:52 +00:00
martin
14f6e2c044 Bump version 2007-09-20 11:14:56 +00:00
martin
6997cea0cd Make the device name include the partition, if filename returned one. 2007-09-20 09:25:00 +00:00
martin
42c234cfe2 Make filename() only return a partition if it actually found one in
the path.
2007-09-20 09:23:54 +00:00
martin
3f99501d0c Some aliases (like "cdrom") expand to a path that includes a partition -
deal with them.
2007-09-19 17:26:02 +00:00
martin
4355df580c If we can not find a filepath when splitting a single argument, the whole
thing certainly has to be a device name.
2007-09-19 13:52:02 +00:00
martin
e3218c4391 Change "Boot:" prompt option parsing to be more in line with the default
(no prompt) behaviour - it is now possible to "boot net:dhcp -a" and then
say "disk" at the "Boot:" prompt - result should be equivalent to "boot disk",
but the ofwboot was loaded from the network.
While there fix a few minor errors, and one significant: if the "a" partition
should not start at the beginning of the disk, the previous code failed
to read a disklabel. Use the "c" partition now to find the disklabel now
always.
2007-09-16 23:12:31 +00:00
martin
c068dc64a3 Rename the option to enable ISO 9660 file system support from ..._HSFS
to ..._CD9660.
2007-09-14 09:26:45 +00:00
martin
6bcd1bdf6f Make sure the buffer used to read from disk is properly aligned to cast
it into a struct disklabel pointer w/o alignement problems.
(Bug did not hit by pure luck with our default optimization settings)
2007-09-14 09:19:39 +00:00
martin
3ab04256ac Use the new loadfile() marker MARK_DATA to optimize the loaded kernel
mappings before calling the entry point - change text mappings to read
only and only insert those into the iTLB.
While there remove a few magic constants by information queried from
the firmware.
2007-06-05 08:52:20 +00:00
he
3aeb570fd3 Make the loadboot() declaration consistent, use char* because it
does pointer arithmetic on the argument.
2007-03-08 17:14:16 +00:00
christos
53524e44ef Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
tsutsui
25b6b97dcd Add src/common/include to include header search path since
<sys/device.h> includes <prop/proplib.h>.
2006-08-28 13:38:43 +00:00
uwe
4c3c91e691 De-__P. ANSIify.
Same object code is generated (except in prf.c, where putchar argument
type was changed to int to match the prototype and one instrcution
changes accordingly).

strategy() in ofdev.c was not ANSIified in this sweep, b/c that
changes code generated at call sites!
2006-07-13 20:03:34 +00:00
he
7a66dda031 Omit specifying the secondary bootloader on the installboot command line
for sparc64 systems.  This should fix PR#33987.

Also adapt to the way sparc64 32-bit kernels now report its CPU
architecture -- these still need the sparc64 boot loader, but now
report hw.machine = sparc.  Adapt by testing machdep.cpu_arch
instead.

Hints from martin and mrg.
2006-07-12 21:34:45 +00:00
jdc
4e27372d03 Add support to the 2nd stage boot loader for booting from RAID
partitions.  We do this by checking the NetBSD label to see if the
boot partition is of type RAID.  If so, we offset reads from the
disk so that the kernel image can be read.

Note that with this code, sun4 machines (with PROM monitor) will only
boot from RAID if the RAID partition is the first one on the disk.

Tested on a SPARCstation 20, a SPARCstation 2 and a 4/330.
2006-06-20 05:41:59 +00:00
uwe
414eb19c42 Nothing in this file needs <sys/time.h> 2006-06-14 19:56:49 +00:00
uwe
7132388a3f Get strcpy prototype from libkern.h, not string.h 2006-06-14 19:46:46 +00:00
mrg
433f408f95 struct filesystem is now struct fs_ops, since i don't know when. 2006-05-20 07:07:40 +00:00
mrg
cec5302033 don't shadow the kernel's devsw unnecessarily. 2006-05-11 00:48:44 +00:00
uwe
5ed1df536e s/u_intN_t/uintN_t/ 2006-03-04 03:03:31 +00:00
uwe
6e4f5eb548 s/u_intN_t/uintN_t/ 2006-03-04 02:56:21 +00:00
cdi
97aa1417ff Alter sparc64 bootstrap:
- Map kernel with permanent 4MB pages to ease kernel's life
 - Pass mappings down to the kernel as part of bootinfo structure
 - Try to detect whether kernel is aware of the new boot scheme or not and
   in the former case map the kernel using OpenFirmware and do not pass
   bootinfo structure
 - Provide -C switch to force compatibility mode if autodetection fails
 - While on this, fix PR #25763: If load of default kernel fails, try one by
   one those specified in compiled-in list

Much inspired by the bootloader of FreeBSD, with some imported code from there.
2006-01-27 18:31:11 +00:00
uwe
00323232f7 Sync clean up changes with other copies of ofwboot/alloc.c.
Expand copyright/license by Jason R. Thorpe as in others too.
2006-01-27 04:40:50 +00:00
uwe
cfaf325346 Constify kernel names. 2006-01-27 04:34:38 +00:00
uwe
8499e252a7 Use the same code to create machine, sparc and sparc64 symlinks that
../Makefile.buildboot uses.
2006-01-27 04:29:02 +00:00
uwe
6f95f80c91 It's free -> dealloc, not free -> size_t (hi, Christos :). 2006-01-25 22:42:16 +00:00
christos
606bb2caed free -> dealloc
unsigned -> size_t for alloc/dealloc
2006-01-25 18:28:25 +00:00
dsl
37bad86d4f Add an explicit -I for sys/lib/libsa so that we find the <iodesc.h>
requested inside sys/lib/libsa/net.h
This used to be "iodesc.h" but another build needs to override it with
a local copy.
2006-01-22 09:17:14 +00:00