cgd
5549a89389
Moved to sys/arch/alpha/stand/installboot.old/cd9660.c,v
1999-04-05 03:02:03 +00:00
cgd
2e3c73533f
Moved from sys/arch/alpha/stand/installboot/cd9660.c,v
1999-04-05 03:02:02 +00:00
cgd
84d60a245d
Moved to sys/arch/alpha/stand/installboot.old/Makefile,v
1999-04-05 03:02:01 +00:00
cgd
5863b697a0
Moved from sys/arch/alpha/stand/installboot/Makefile,v
1999-04-05 03:02:00 +00:00
cgd
6ab8a12347
clean up, use disklabel.h boot block checksum macro, exit with
...
EXIT_SUCCESS and EXIT_FAILURE rather than 0 and 1.
1999-04-05 02:56:33 +00:00
cgd
eb5c725722
clean up for compiler warning flags
1999-04-05 02:55:38 +00:00
cgd
4cbbc316f2
add ustarboot, a ustar-capable unified bootstrap intended to be
...
mkbootimage'd and slapped on the front of a tar file.
1999-04-02 09:13:27 +00:00
cgd
e16ad7a3e4
this should have been gc'd with the disk->blkdev changes
1999-04-02 08:50:45 +00:00
cgd
b676fcfeca
add mkbootimage, a program to make a bootable image (i.e. prepend a boot
...
block, pad to a block boundary) from a console program (i.e. a boot
block, firmware upgrade executable, etc.)
1999-04-02 08:40:23 +00:00
ross
8969ff9e1e
Fix typo in FILE_FORMAT_CPPFLAGS.
1999-04-02 07:55:06 +00:00
cgd
bfa2f241f4
use 'struct boot_block' from disklabel.h
1999-04-02 07:34:49 +00:00
cgd
bfd7402544
use booted_dev_fd() and booted_dev_close()
1999-04-02 03:50:47 +00:00
cgd
bacc33029f
build the filesystem-specific primaries
1999-04-02 03:45:12 +00:00
cgd
60fb889b92
makefiles for some filesystem-using primary boot blocks. much as
...
i hate to say it, these still contain bugs that can't easily be
addressed yet.
1999-04-02 03:38:20 +00:00
cgd
6db093b04a
puts -> putstr
1999-04-02 03:35:54 +00:00
cgd
3b5c2ed522
a makefile template for filesystem-using primary boot blocks
1999-04-02 03:34:09 +00:00
cgd
47acf988d7
add a template for a filesystem-using primary boot block, just like
...
'boot' is a template for secondary and unified boot blocks.
1999-04-02 03:24:53 +00:00
cgd
1fe5f90d85
add a common putstr() function which just puts()'s the chars in
...
its argument string. implement a broken version of panic() in terms
of it, for cases where we need panic() but can't affort printf().
1999-04-02 03:23:49 +00:00
cgd
e1b1b6b39b
update for booted_dev and disk->blkdev changes.
1999-04-02 03:20:00 +00:00
cgd
f0bdf50326
abstract the prom device open/close into a separate module, which
...
provides the correct functions for primary, secondary, and unified
boot blocks. actually behave correctly (e.g. expect correct arguments,
perform correct operations) depending on which you are. also
some minor cleanup.
1999-04-02 03:19:08 +00:00
cgd
39ea91226c
move the boot/disk.* code to common/blkdev.*, and gut it. The previous
...
guts were actually functionally equivalent to the current guts, but were
much larger, filled with bugs, and indeed poked around at the disklabel
when some of those bugs prevented them from ever using the disklabel!
1999-04-02 03:17:28 +00:00
cgd
7c4cd2bb56
unrevert the changes made last night, now that 'installboot' has
...
had a few bugs fixed that let the problem slip in, and since bootxx's
Makefile now goes out of its way to satisfy installboot's undocumented
and totally unreasonable assumptions about the bootxx file it's operating
on. No point in fixing the assumptions, because sooner rather than later
this incarnation of installboot is going to die.
1999-04-02 03:11:57 +00:00
cgd
701c007366
correctly calculate the space left for block addresses, and avoid
...
assuming that there's always going to be space for the whole boot
block info struct. (the assumption would cause a malloc'd region
to be overrun, if it proved false.)
1999-04-02 02:47:45 +00:00
ross
9c323a2d8b
Revert recent changes, which either don't work, or can't be built
...
successfully by ordinary mortals.
1999-04-01 11:08:39 +00:00
cgd
bd44d9c286
as pointed out by simonb, since we've moved to ELF __main() calls
...
aren't emittid anymore.
1999-03-31 16:12:51 +00:00
cgd
801906b363
GC; unused
1999-03-31 06:37:13 +00:00
cgd
be6a1d529a
separate defns for primary and unified boot blocks
1999-03-31 06:28:41 +00:00
cgd
77a9cb81ff
implement NO_GETCHAR, to remove getchar(), and NO_PUTCHAR_HALT to remove
...
the check in putchar() for character input (specifically control-c, which
causes a halt).
1999-03-31 03:34:21 +00:00
cgd
c5fa912232
no point in passing &ret to test_getchar(); nobody cares! also, no
...
point in doing the check-for-abort functionality twice in putchar()
(once with a call to test_getchar(), once open coded).
1999-03-31 03:22:57 +00:00
cgd
98f67b8238
In putchar(), don't open-code two calls to the prom puts routine. Instead,
...
call a helper function (putonechar()). Savings: 64 bytes. Cha-ching!
1999-03-31 03:10:00 +00:00
cgd
3665d82d1a
GC cpu_number() and turn alpha_pal_imb() into inline assembler.
1999-03-31 03:04:21 +00:00
cgd
51a85dabbb
rename the C main() function to main_(). this avoids gcc's implicit
...
call to __main(), and therefore saves the size of the call and the
size of a stub implementation of __main().
in the primary boot block, don't bother saving/restoring the argument
passed in from the caller. There is no such argument (that we care
about, at least) to the primary. (for secondary, it's the firmware
FD being used.)
1999-03-31 03:03:01 +00:00
cgd
4a209e30f8
Compile with -Os (optimize for size).
...
Clean up the "Region 1" related definitions, and define load addresses,
max load size, and max total size for as many boot block types as we can.
(types = unified, primary, secondary). We can't always define all
values for all boot blocks, though.
Make CPP flags selection less gross.
Use objcopy rather than headersize (yay, evil gets a stake to the heart!).
Use a little shell script to verify that the sizes of the boot blocks are OK.
Do not compile too much more of libsa than we actually have to.
1999-03-31 02:52:11 +00:00
ross
5bc91073ce
Bug fix for the bug fix. Be sure to prom_close() in bootxx and boot, but not
...
in netboot, and not in diskclose(), but after trying all kernelnames[].
1999-03-27 09:01:27 +00:00
ross
6ee909b24f
Fix bug found by Bernd "Veego" Ernesti: close the console disk channel.
1999-03-26 20:53:12 +00:00
lukem
dcab0210a0
convert from NOxxx= to MKxxx=no.
...
include <bsd.own.mk> if testing a MKxxx variable.
1999-02-13 02:54:17 +00:00
ross
509315b9e0
We don't call prom_open() here anymore, so don't call prom_close() either!
1998-12-28 09:12:52 +00:00
ross
33038ca087
Tweak this so it will build and run on ILP32 hosts, anyway, 0x...LL constants
...
are blessed by the C9X draft.
1998-12-03 04:16:18 +00:00
ross
8bc9c17338
Disable sanity checks and unnecessary setup for conblock (-b) mode.
1998-11-25 21:19:35 +00:00
ross
b0f44850f5
Don't insist on an FFS if we are in contiguous block (-b) mode.
1998-11-19 02:44:40 +00:00
ross
3e35915bc3
Don't use big 16K blocks for the -b contiguous secondary boot installation.
...
It leads to confusion about where the end of the image is on tape boots.
1998-10-15 01:05:20 +00:00
ross
16bf3552bb
Save a0 during bss clear.
1998-10-15 01:02:55 +00:00
ross
9f7ca48f3b
Delete prom_open() wrapper routine. Other clients of prom_open
...
can use the prom.h dispatch macros instead, especially since they
all presently expect the raw return bits.
1998-10-15 01:02:15 +00:00
ross
c84b7f501e
Delete bogus prom_open() prototype.
1998-10-15 01:00:56 +00:00
ross
412f6ae85b
Grab booted_dev_fd parameter from bootxx. It won't be there for netboot
...
but there should be no harm done.
1998-10-15 01:00:07 +00:00
ross
6336abe01a
const'ify
1998-10-15 00:56:56 +00:00
ross
df51a43618
Rototill the primary boot for...
...
1. much faster speed
2. support of more media types
1998-10-15 00:55:48 +00:00
ross
c33589db84
Consult osrelease.sh and pass down NETBSD_VERS
1998-10-15 00:52:38 +00:00
ross
74f36b2497
Try the ustarfs open first...it's the only one that can't necessarily
...
seek. We might be reading a tape and the extra superblock reads will
eat up tape records.
1998-10-15 00:51:22 +00:00
ross
9c29657a67
Extern def for raw prom disk file descriptor.
1998-10-15 00:49:34 +00:00
ross
b0367fb980
Don't actually do the raw prom open here.
1998-10-15 00:48:55 +00:00
thorpej
34a8ac8484
Set the primary CPU's PAL revision to the OSF/1 PAL revision after switching
...
to it, per the Green Book (pointed out by Chris Demetriou).
1998-09-28 21:21:55 +00:00
thorpej
5caecb6ae0
Fix for some EGCS warnings.
1998-09-28 21:18:55 +00:00
ross
ec4de2679b
Track tfs -> ustarfs change.
1998-09-24 05:23:58 +00:00
ross
5b01d45ac4
Add a `-b #' option and logic for locating the secondary boot image via
...
an absolute block address. It's cheating, as the motivation is support for
the libsa ustar tfs `filesystem' and the solution symmetrical to ufs and
cd9660 would have been to teach installboot about tfs. However, it still
would have been different as you can't mount a tfs with the kernel, and
this option gets possibly useful support for any contiguous format, even
completely raw boot images.
1998-09-22 05:03:36 +00:00
ross
5fb9c16f05
While we are here in alpha/stand, bail out on ^C during boot.
1998-09-22 00:41:13 +00:00
ross
10da0cf1c3
Add fs_ops to file_system[] for the ustar-format `tfs'.
1998-09-22 00:39:31 +00:00
pk
8adc8da66b
Assign my copyright to TNF.
1998-09-05 13:40:35 +00:00
tv
6baebf57c6
Nuke egcs warns: void main(), implicit int
1998-08-27 12:20:51 +00:00
thorpej
d5df55112a
vm_offset_t -> {paddr_t,vaddr_t}, vm_size_t -> vsize_t
1998-08-14 16:50:00 +00:00
drochner
dabc8eb436
Implement the 'i' flag which makes the bootloader ask for the file to
...
load (as in OSF/1).
Useful for netboot where "-file" doesn't work as needed.
1998-08-07 10:38:37 +00:00
ross
de27f1befc
Don't bother reading the ELF string table out of a stripped /netbsd[.gz].
...
In this case, all it has in it are the never-referenced printable names
for the ELF sections themselves. It's located at the end of the (ramdisk)
netbsd.gz file, so it is a very expensive seek and read for only 85 bytes.
Boot floppy load time:
before: 5 minutes
now: 3 minutes
1998-06-25 06:45:46 +00:00
ross
6c1e8f5b20
Use the new LOCATE_PCS() macro.
1998-06-24 01:33:19 +00:00
cgd
c0ac8bae67
GC alpha's ECOFF_TOOLCHAIN make variable, and related bits. Nobody
...
should be using an ECOFF toolchain on NetBSD/alpha any more.
1998-03-28 00:50:41 +00:00
thorpej
4893f22399
Much more sane boot block builds, from Chris Demetriou.
1998-03-28 00:21:35 +00:00
cgd
09dbd9234d
fix typo in last commit (noticed on inspection)
1998-03-02 21:36:55 +00:00
cgd
7ff7b02fac
allow LDSTATIC definition to be overridden by bsd.own.mk/mk.conf
1998-03-02 20:01:05 +00:00
cgd
9da165424c
allow LDSTATIC definition to be overridden by bsd.own.mk/mk.conf
1998-03-02 19:57:00 +00:00
ross
2170c2a46d
Force elf symbol sections to an addressable boundary.
1998-02-28 10:38:55 +00:00
cgd
92d17b5b50
clean up the way bootinfo information is passed and used: move the version
...
number passed by the boot block into a register, change the kernel's
bootinfo handing so that it always uses bootinfo to get bootinfo-ish values
(filling them in if the boot blocks didn't pass them), and make versioning
a small bit more sane.
1998-02-12 01:53:18 +00:00
thorpej
8e69ee392a
Fixup includes.
1998-02-04 23:41:45 +00:00
thorpej
cfa47dfc11
Add support for installing boot blocks into ISO-9660 file system images.
1998-02-01 06:59:30 +00:00
ross
43a3471986
While here in alpha/stand, add a technically required imb coherency op
...
just before transferring to the kernel entry point.
1998-01-29 22:13:25 +00:00
ross
c1972a428c
Avoid VMS palcode ops by using a different technique for cpu_number(),
...
and don't execute the VMS->OSF palcode switch if the OSF palcode
is already running...which will be the case if the console is not
the venerable SRM.
1998-01-29 22:09:37 +00:00
thorpej
cacd48c0d6
Print the correct error number if nfs_mount() fails. From Chris Demetriou.
1998-01-23 19:13:28 +00:00
perry
015e898c02
RCSID Police.
1998-01-05 07:02:46 +00:00
mjacob
940f8fcfd1
remove unneeded and conflicting prototype
1997-11-13 18:06:01 +00:00
lukem
3e8e744696
getopt returns -1 not EOF
1997-11-01 06:49:14 +00:00
cjs
bcced1d9be
Check return values from lseek; use SEEK_SET instead of 0.
1997-10-18 22:27:46 +00:00
drochner
969e506de4
Oops, last change made "make depend" work incompletely. Don't define
...
a "depend" rule here.
1997-09-06 14:26:47 +00:00
drochner
281398581a
-Wall fixes
1997-09-06 14:08:27 +00:00
drochner
3b191b29c0
enable -Wall
1997-09-06 14:07:57 +00:00
drochner
be8a78e9b5
-use DHCP extensions in bootp()
...
-enable -Wall
1997-09-06 14:06:53 +00:00
drochner
80d9738db8
-Wall fixes
1997-09-06 14:03:55 +00:00
drochner
d99aa8efc0
Collect prototypes here.
1997-09-06 14:02:51 +00:00
drochner
7546d66094
Make sure the <machine/*.h> includes come from current kernel sources,
...
not from installed userland.
1997-09-06 14:02:13 +00:00
thorpej
7df7a43ce7
When loading a symbol section, make sure it is aligned.
1997-09-05 21:50:34 +00:00
thorpej
ba8becebfc
installbood_cd9660 no longer exists.
1997-09-05 20:20:17 +00:00
cgd
9d532f482c
don't forget to set hwrpbsize to zero explicitly
1997-08-13 20:49:56 +00:00
cgd
d86134ca68
fill in the new pointers in the bootinfo_v1 structure.
1997-07-25 07:00:42 +00:00
thorpej
8e341ad358
If loading an Elf kernel, load the symbol table immediately after
...
the kernel image.
1997-07-25 00:09:01 +00:00
thorpej
f65454b2a6
Set up a version 1 bootinfo for the kernel.
1997-07-25 00:07:56 +00:00
drochner
bdb232d2b6
Don't use <lib/libsa/if_ether.h> anymore. This was a copy of the
...
old (before ARP changes) <netinet/if_ether.h>, intended for
temporary use.
1997-07-22 17:41:01 +00:00
mrg
f66658c8e0
move man pages into share/man.
1997-06-22 05:05:17 +00:00
cjs
ecada6375b
bzero() wants pointers, not ints, for its first arg.
1997-06-20 07:06:43 +00:00
mycroft
ad19544997
Remove bogus .PATHs.
1997-05-18 12:14:55 +00:00
mycroft
cc4a1553a1
Eliminate bogus redefinitions of standard targets.
1997-05-09 07:50:03 +00:00
thorpej
6a2fc99857
STRIP -> STRIPFLAG
1997-04-17 07:27:46 +00:00
cgd
ad61973f36
add installboot_cd9660, which is installboot(8) modified to place a boot
...
block (and faked-up disklabel) into an ISO-9660 file system image.
1997-04-10 23:03:38 +00:00
cgd
562fa9b97d
clean up NetBSD RCS ID strings
1997-04-06 08:39:37 +00:00