Commit Graph

807 Commits

Author SHA1 Message Date
sborrill
c7b0526b9b Increase number of menu options to 20.
Add support for switching menu format between numbers and letters. Will
prefer numbers, but will automatically switch to letters if > 9 options
and timeout > 0 (i.e. need a single key press to choose).
Menu format can be explicitly set in boot.cfg file.
Add support for reading numeric choices of more than 1 digit.
2008-08-12 17:56:05 +00:00
simonb
c86b901a9e Don't run off the end of the bootconf.desc[] array when printing out
the boot menu choices.  Fixes problems with funny display when MAXMENU
or more "menu" items are in /boot.cfg.
2008-08-08 07:48:32 +00:00
perry
7549434e22 Add -DM to the newvers_stand.h invocation.
Why is there a "Makefile.boot" used here, and a "Makefile.booters"
used one level up, with redundant stuff between both of them? This all
used to be so clean...
2008-07-16 16:13:38 +00:00
perry
ab1cc5d822 Call newvers_stand.sh with -DM so we don't include the (unused) date
and builder in the data segment.
2008-07-16 12:52:37 +00:00
perry
e2eca0cfb3 make vers.c also depend on the script that builds vers.c 2008-07-16 00:16:17 +00:00
perry
ac6f476b2b Update the version numbers following commit, and make them all identical. 2008-07-15 23:16:26 +00:00
perry
17bba44783 Change the x86 boot blocks so they don't include builder login and date.
For now, we include kernel revision as a way of allowing users to
notice that boot blocks have gotten very old, so the first line of the
printout looks like this (depending on the particular block):

  >> NetBSD/x86 BIOS Boot, Revision 3.4 (from NetBSD 5.0)

This may be changed a bit pending feedback. (Some people think that
the kernel revision shouldn't be there at all, for example.)

Part of the project to assure that bit-identical sources produce
bit-identical release binaries.
2008-07-15 21:29:37 +00:00
chris
52c485503f Fix pxeboot's load tftp:miniroot.i386.kmod to work again.
We now wrapper the open call for a module with module_open.  It first
attempts to open the module_path munged path, if this fails it then tries
to open the original path.

This allows tftp files to be located correctly.
2008-05-25 11:54:33 +00:00
ad
2a64c855d7 Fix build failure. 2008-05-21 13:36:45 +00:00
ad
94b6b18770 - Stop the twiddler going awry.
- Clear screen if on a glass tty (!).
2008-05-21 01:51:34 +00:00
ad
e69aa3297c Take $MACHINE into account when looking for modules. 2008-05-20 16:04:08 +00:00
ad
79df4e6dbd PR kern/38694 module dependencies do not work as expected
If a given module name/path does not start with '/', assume it's a module
name and choose a default path based on the kernel version.
2008-05-20 14:46:54 +00:00
chris
e4ea82cddb Add support to pxeboot to allow the loading of modules. Changes to main.c
are taken from boot/boot2.c.

This allows an install to be started by running:
load tftp:miniroot.kmod
boot tftp:netbsd-GENERIC

Note that the change to dev_net.c to comment out the network shutdown,
suggests we need to hook the network shutdown in the the common exec code.
If the network is shutdown, it fails to reinitialise and so fails to load
the module.
2008-05-11 11:42:02 +00:00
lukem
dab1996c70 Add a missing semicolon.
(mmm, compile before commit :)
2008-05-06 12:52:34 +00:00
apb
1eeed263ba Change the wording of a message, to make it clear that pressing SPACE
will stop the countdown timer.  The message now reads "Choose an option;
RETURN for default; SPACE to stop countdown."  It no longer says what
the default choice actually is, because the message printed on the
following line will do that.
2008-05-06 09:48:00 +00:00
chris
dc970973a2 Increase banner entries from 10 to 12. This allows all 12 lines of the cd
boot.cfg banner to be displayed.
2008-05-05 08:36:55 +00:00
jmcneill
729313d52c Use 2-clause license. 2008-05-05 00:12:49 +00:00
martin
c21f953fcb Remove my personal license, the TNF one is good enough for me. 2008-05-04 11:00:09 +00:00
ad
72c795e7a2 Handle compressed modules. 2008-05-03 18:49:13 +00:00
ad
4ae6459449 i386 -> x86 2008-05-03 13:07:31 +00:00
sborrill
dac9aa49ba Add support for multiple commands separated by semi-colons on menu lines
in boot.cfg.
e.g.
menu=Boot with module foo:load=/foo.kmod;boot
2008-05-03 09:46:40 +00:00
ad
31d4b62867 - Give x86 BIOS boot the ability to load new style modules and pass them
into the kernel. Based on a patch by jmcneill@, with many fixes and
  improvements by me.
2008-05-02 15:29:18 +00:00
ad
bfc5732320 - Give x86 BIOS boot the ability to load new style modules and pass them
into the kernel. Based on a patch by jmcneill@, with many fixes and
  improvements by me.

- Put MEMORY_DISK_DYNAMIC and MODULAR into the GENERIC kernels, so that
  you can load miniroot.kmod from the boot blocks and boot into the
  installer!
2008-05-02 15:26:38 +00:00
ad
83cf21a0ba Tidy up console output slightly. 2008-04-30 16:18:26 +00:00
ad
4325f51a67 Adjust the help string for new options. 2008-04-29 21:35:47 +00:00
martin
3028e483e4 Convert to new 2 clause license 2008-04-29 06:53:00 +00:00
martin
ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
tsutsui
052ab0354c Add commented out ext2fs definitions. 2008-04-05 18:21:34 +00:00
dsl
467fb43e11 Add -momit-leaf-frame-pointer, saves a few bytes. 2008-03-15 18:00:32 +00:00
sborrill
2463fb7b22 Only attempt to output up to MAXBANNER banner lines 2008-02-23 17:49:29 +00:00
joerg
4d4af868ab Garbage collect the remaining parts of COMPAT_OLDBOOT. The boot loader
support has been removed at least 4 years ago and NetBSD 1.3 is ancient.
2008-02-12 18:22:39 +00:00
mlelstv
7d949cc4cd Can't do math on void * 2008-02-11 13:51:35 +00:00
dsl
adc04d4847 Load 'default keycode' into correct byte so that 'boot on timeout' works.
Fixes PR/37960.
While here save another byte.
2008-02-06 21:17:55 +00:00
sborrill
00eb6ae835 Add EPIA_HACK so that boot loaders work on EDEN 5000 processors.
This worked in NetBSD 3, but broke by NetBSD 4.

My offer of a development machine to fix this one and for all is still open!
2008-01-31 11:11:09 +00:00
dsl
671c873837 Somehow this file won some extra tab characters, nuke them to align the code. 2008-01-25 21:40:58 +00:00
dsl
3305a48bee Add two new versions of the mbr code that directly access a serial port.
'mbr_com0' assumes the BIOS has initialised the baud rate (etc)
'mbr_com0_9600' initialises the rate to 9600
Both have the functionality from 'mbr_ext' (ie they can boot from an
  extended partition).
As compiled, the io_address for the serial port is taken from BIOS data.
(this should keep tls@ happy!)
2008-01-19 21:01:34 +00:00
dsl
7d4e4f0e9a The test for the 0xaa55 at the end of an extended partition pbr has always
been incorrect (and checked the end of the mbr - which always suceeds).
Rather than fixing the text, just delete it (saving 8 bytes from mbr_ext).
2008-01-08 18:31:56 +00:00
apb
4ee202cfe2 If a menu line in boot.cfg has an empty description, then re-use the
command as the description.  For example,

	menu=:boot netbsd -s

now works like

	menu=boot netbsd -s:boot netbsd -s
2008-01-05 19:29:16 +00:00
dsl
8d35d4af30 Remove #define DISK_DEBUG left in by mistake 2008-01-05 15:28:43 +00:00
dsl
e3c05d1c5d Allow the boot code to use the disklabel 'faked up' from the mbr.
Should allow bootxx_fat16 (and bootxx_msdos etc) to boot from drives that
don't contain a netbsd disklabel.
2008-01-04 20:05:46 +00:00
sborrill
37c7a4d0f3 Configuration file is boot.cfg, not boot.cnf, so fix comments 2008-01-02 10:39:39 +00:00
jmcneill
aed987feb1 Add -z to usage strings. 2007-12-29 16:28:40 +00:00
jmcneill
dab73a34c7 Mention -x in command_help 2007-12-29 16:02:46 +00:00
dogcow
453afff1c4 ding dong, the witch is __dead. Not sure why it was even bothered with here. 2007-12-26 10:19:41 +00:00
perry
b6a2ef7569 Convert many of the uses of __attribute__ to equivalent
__packed, __unused and __dead macros from cdefs.h
2007-12-25 18:33:32 +00:00
sborrill
df6e82e8f8 Check whether we are loading from ustarfs and if so, do not attempt to
read boot.cfg.

Fixes PR install/37521. Heavily based on patch by Izumi Tsutsui.
2007-12-13 11:52:17 +00:00
dyoung
0ecaa37d9b Use IFADDR_FIRST(), IFADDR_NEXT(), IFNET_NEXT(). 2007-12-05 22:50:00 +00:00
dyoung
3f6c5b6545 Don't open-code queue(3) macros (x = ifnet.tqh_first; y =
x.if_list.tqe_next).  Instead, use the macros themselves.
2007-12-05 01:02:15 +00:00
sborrill
e39e1e7810 Print a newline above the menu, but not below the custom banner.
This means that there is a consistent empty line above the menu both with
and without a custom banner.
2007-11-23 13:47:03 +00:00
sborrill
d849e6b356 Add support for /boot.cfg configuration file in x86 boot loader.
This allows easy configuration of banner text, console device and timeout
as well as allowing menus of commands to be displayed. If /boot.cfg
is not present, then the existing behaviour does not change.

The sections in the boot loader source are surrounded by #ifdef SMALL
allowing this functionality to be removed if space is at a premium.
2007-11-20 15:37:36 +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
ad
04e7f7c43b Remove -DBOOT_ELF64 to make build on amd64. 2007-09-27 01:57:23 +00:00
ad
e82393efae - Make i386 bootblocks boot amd64 kernels, and change to say "NetBSD/x86..."
- Don't bother booting a.out kernels any more.
2007-09-27 00:13:16 +00:00
ad
b43233552c - Make it compile again.
- Don't use (very dodgy) inline assembly.
2007-09-26 23:47:43 +00:00
dyoung
5204966a96 Constify: LLADDR -> CLLADDR. I'm aiming here to make it easier to
identify sockaddr_dl abuse that remains in the kernel, especially
the potential for overwriting memory past the end of a sockaddr_dl
with, e.g., memcpy(LLADDR(), ...).

Use sockaddr_dl_setaddr() in a few places.
2007-08-26 22:59:08 +00:00
ws
a3d6358dce Fix "Fix a garbage in previous commit." in 1.10.
Hi, junyoung!
2007-07-08 11:44:08 +00:00
dsl
74df11d186 Save a byte from the mbr code (by using lret not ljmp). 2007-04-10 16:54:34 +00:00
dsl
e38a76cc13 Change the default 'oemname' from NetBSD20 to NetBSD40 2007-04-10 16:50:25 +00:00
thorpej
f00c540051 TRUE -> true, FALSE -> false 2007-03-07 21:43:43 +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
he
5f00d6d5a0 Install pxeboot_ia32.bin as part of a "make release" on i386 and amd64. 2007-02-27 18:17:28 +00:00
cbiere
5bc2b7285f Don't define UNALIGNED_ACCESS, it's not used anymore. 2007-01-27 07:21:32 +00:00
dsl
728a5d8095 Descend into fatboot, regroup slightly 2007-01-06 20:48:59 +00:00
dsl
693454d602 Change build to allow a fat32 bootstrap to be built from the same sources
(the relevant changes haven't been done though).
Call built binary bootxx_fat16 for consistency.
Use 'push %cs' to push a zero value in places where we had relied on %bx
being zero from much higher up the code.
2007-01-06 20:47:15 +00:00
dsl
fb47ef3c1d Add a sub-512 byte piece of code that can be written (by a modified installboot)
into the first sector of a FAT16 filesystem and will load 'boot' (and hence)
the netbsd kernel from it.
Unlike bootxx_msdosfs this doesn't need the filesystem to have 8k of 'reserved'
sectors, and may well work on non-512 byte media (as yet untested).
2007-01-01 22:11:09 +00:00
yamt
ce9d4b0004 remove nqnfs from comments. from Arnaud Lacombe.
(no functional changes.)
2006-12-29 13:05:48 +00:00
dsl
66a1a1560d Add -DUNALIGNED_ACCESS here, libsa/dosfs.c seems to need it.
Probably it ought to come from some generic .h file, but I've no idea
which - nor if any existing define has the same effect.
In any case this saves oodles of bytes in bootxx_msdos.
2006-12-03 19:14:08 +00:00
wiz
5c056f6785 s/apparant/apparent/, from Zafer. 2006-11-24 22:54:47 +00:00
wiz
09cb1d6f1c s/existance/existence/, from Zafer. 2006-11-24 22:52:16 +00:00
erh
061923aa84 Add casts so this works with DISK_DEBUG defined. 2006-11-18 19:58:56 +00:00
drochner
ff2890767a use "=" instead of ":=" where .OBJDIR is used because it might change
later in <bsd.obj.mk>, thanks to Alan Barrett for the hint
2006-11-14 14:03:12 +00:00
christos
12be2d1032 remove a bit of code and a label and explain why in a comment; no code size
change.
2006-10-24 23:41:01 +00:00
oster
7f33898207 Fix a logic bug in the bootblock code.
OK'ed by christos@
2006-10-24 15:56:55 +00:00
christos
d0545a9b43 nuke $DBG, since it contains -O2; suggested by uwe. 2006-10-23 21:57:46 +00:00
christos
3380fe7daf shrink further. 2006-10-23 21:36:47 +00:00
christos
896545c86a shave 32 bytes. 2006-10-22 21:57:55 +00:00
dsl
5400d47389 Put NOMAN= back before the include of bsd.own.mk 2006-10-09 11:25:03 +00:00
martin
dd30915732 Fix PR port-i386/33550 by Scott Ellis as suggested:
make sure the overrides to STRIPFLAGS etc. persist by including
bsd.own.mk earlier.
2006-10-09 00:00:34 +00:00
salo
0c26015e92 Fix ypo. (hi abs!)
Noticed at #NetBSD-code.
2006-10-04 22:27:21 +00:00
abs
57ee5d4340 Enable EPIA_HACK here too - http://mail-index.netbsd.org/port-i386/2006/08/18/0002.html 2006-09-22 15:05:24 +00:00
yamt
2b405338d9 revert the previous because it doesn't work without destdir populated.
pointed by Valeriy E. Ushakov.
2006-07-12 14:56:59 +00:00
yamt
ed6b31b9e9 -I${S}/../common/include for libprop. 2006-07-12 13:51:18 +00:00
yamt
4adfbedff5 include stdlib.h for exit(). 2006-07-12 13:50:23 +00:00
lukem
7a08c82b0b whitespace cleanup 2006-06-29 06:39:38 +00:00
lukem
e84a5a6bd9 Use BUILDSYMLINKS & DPSRCS to simplify the creation of includedir symlinks. 2006-06-29 06:37:19 +00:00
lukem
accbe31e2f support MAKEVERBOSE 2006-06-29 06:31:12 +00:00
lukem
005d886d08 whitespace cleanup. 2006-06-29 06:29:39 +00:00
lukem
419dfdd76b Use BUILDSYMLINKS & DPSRCS to simplify the creation of includedir symlinks. 2006-06-29 06:24:50 +00:00
lukem
6e749ba167 Use ${TOOL_STAT} to get the size, instead of ls | tr | cut. 2006-06-25 15:01:00 +00:00
lukem
186054d0dd Convert to using CC instead of LD, as LDFLAGS is for CC not LD. 2006-06-25 14:49:32 +00:00
lukem
4c28e73199 Use -Wl,-Ttext,foo instead of -Ttext foo when using $(CC) 2006-06-25 14:35:18 +00:00
lukem
8c4a6c51bf whitespace consistency 2006-06-25 14:24:53 +00:00
lukem
51c3e093dc Use LDFLAGS (with $(CC) syntax) instead of appending to LD. 2006-06-25 14:12:14 +00:00
lukem
9073aac5f2 Convert to using CC instead of LD, as LDFLAGS is for CC not LD. 2006-06-25 13:36:26 +00:00
dogcow
b6d29ce0bd Add -Wno-attributes for amd64, too. 2006-06-12 19:25:20 +00:00
lukem
c75cb560f1 support MAKEVERBOSE 2006-05-13 12:02:54 +00:00
lukem
e7526fa7ea support MAKEVERBOSE 2006-05-13 09:14:14 +00:00
lukem
261d50393a Convert to using CC instead of LD, as LDFLAGS is for CC not LD. 2006-05-13 09:13:11 +00:00
lukem
f2e1749b26 support MAKEVERBOSE 2006-05-13 04:12:33 +00:00
lukem
dff2a78d7a Convert to using CC instead of LD, as LDFLAGS is for CC not LD. 2006-05-13 04:11:04 +00:00