Commit Graph

794 Commits

Author SHA1 Message Date
dsl
82357f6d42 ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
2009-03-14 21:04:01 +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
dsl
02cdf4d2c8 Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
2009-03-14 14:45:51 +00:00
abs
f681b265bc Prefer MACHINE_ARCH to MACHINE in some tests 2009-03-12 17:16:58 +00:00
isaki
01850a5636 Remove duplicated definitions. 2009-03-01 09:23:27 +00:00
jmcneill
41a1bce5b4 Reorder command line parsing logic; previously the code assumed a string
containing the letter 'x' was a mode string (eg. 640x480), which prevented
the parser from picking up a mode number (eg. 0x101).
2009-02-17 23:17:39 +00:00
jmcneill
c6d7607b67 Bootloader modifications for generic framebuffer console support on i386
and amd64 where VESA VBE 2.0+ is available.

* Add helper library and stubs to invoke VBE bioscalls.
* Bump HEAP_START as we were already dangerously close to our limits.
* bootdataseg now allows access > 16MB so in the future we can scribble
  on the framebuffer.
* Pass BTINFO_FRAMEBUFFER parameters to kernel when configured.
* VBE modes are configured with the new 'vesa' command. Usage, when present:
    * vesa {enabled|disabled}
      Enable / disable linear framebuffer, default mode is 640x480x8. May
      be changed in the future to determine mode based on VBE/DDC where
      available.
    * vesa list
      List modes supported by the firmware that meet the following criteria:
	* linear framebuffer
	* packed pixel or direct colour mode
    * vesa {modenum|modestr}
      Enable specific VBE mode. The mode can be specified either as a
      VBE mode number (eg. 0x101) or as a string (eg. 800x600x16).
2009-02-16 22:39:30 +00:00
abs
515e52158b Convert more MACHINE tests to MACHINE_ARCH 2009-02-14 13:50:50 +00:00
jnemeth
dd808e2b11 PR/40608 - Gao Ya'nan -- typo in comment 2009-02-11 07:24:40 +00:00
christos
29358e4ac0 don't clear the screen unconditionally. Now controlled by an option.
Thanks enami
2009-01-30 14:09:44 +00:00
rmind
6d73ddd355 Revert path of modules back to "/stand". 2009-01-24 22:14:44 +00:00
rmind
f0e51651e4 Change path to kernel modules from "/stand" to "/kernel".
Needs to go in before 5.0.  Proposed on <tech-kern>.
2009-01-24 00:29:12 +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
christos
461a86f9bd merge christos-time_t 2009-01-11 02:45:45 +00:00
jakllsch
0f24b5edb2 Use ${VERSIONFILE} instead of ${.ALLSRC} to match Makefile.boot.
This change stops the full path of newvers_stand.sh from showing up in
pxeboot_ia32.bin.
2009-01-08 19:02:12 +00:00
christos
49e9ba9a6b more KNF and ANSI from Anon-ymous 2008-12-14 18:46:33 +00:00
christos
334f5e8f00 ANSI and KNF from Anon Ymous 2008-12-14 17:03:43 +00:00
christos
f0468ba656 add a boot.cfg option to clear the screen; default off. From Anon Ymous 2008-12-13 23:30:54 +00:00
christos
6d2637b2f4 Allow parsing more than one command line switch. From anon ymous. 2008-12-09 15:38:52 +00:00
dsl
e89d05e775 #undef ACTIVE (not ENTER) since that is the variable we defined just above.
Noted on port-i386 by Gao Ya'nan.
2008-11-28 18:18:16 +00:00
ad
44435f5a02 Make pxeboot understand boot.cfg. 2008-11-25 13:23:54 +00:00
ad
378bfa9aa9 Cut-and-paste strikes again. Set fsmod here too. 2008-11-25 13:18:37 +00:00
ad
5bf641af07 For the x86 boot loader, autoload a kernel module corresponding to the
root file system type.
2008-11-19 12:36:41 +00:00
apb
f46c1de7cb Use ${TOOL_SED} instead if plain sed in Makefiles. 2008-10-25 22:27:34 +00:00
ad
938672fb9c +wbinvd 2008-10-22 08:42:38 +00:00
christos
58120dc797 forgot one more pie to disable. 2008-10-20 20:00:57 +00:00
christos
44c25f2fda disable PIE for boot code. 2008-10-20 03:02:07 +00:00
snj
682ea0e2b3 s/explicitely/explicitly/ 2008-10-19 21:27:46 +00:00
ad
e2115ceee7 PR kern/39726 Soekris 5501-60 boot/bootxx 120 second delay
Try enabling A20 using an extended BIOS call before playing around with
the keyboard controller or system config port.
2008-10-14 14:18:11 +00:00
joerg
9bb39d02a6 Add "multiboot" command to boot multiboot compliant kernels like Xen.
Patch provided by Robert Swindell with fixes for the command line
parsing and addition of passing module options from me. The kernel now
always gets the full string for modules like for the command line,
everything before the first space/tab is the path name of the module.
2008-10-11 11:06:19 +00:00
joerg
14f73bd778 Move functionality for preparing the kernel (including XMS support) into
a new function common_load_kernel.
2008-10-08 22:57:28 +00:00
joerg
fb462122c2 Move initialisation of boot_argv after the full loading of the kernel,
directly before loading modules.
2008-10-08 22:46:19 +00:00
joerg
2230e7f0d7 Setup module_base in module_init(). 2008-10-08 22:42:38 +00:00
tsutsui
eb30897af8 Remove a hack which disables loading boot.cfg from ustarfs.
Now all bootfloppies have a proper boot.cfg file in ustarfs.

Tested on qemu.
(though qemu doesn't emulate timeout on the boot prompt properly)
2008-09-26 18:42:52 +00:00
christos
0578ebaebe The structure of our elf kernel is:
elf header/program headers/text/data/note/
    section headers/symbol table/string table

We need to read the section headers first to find the offset of the note
and thus we requite backwards seek. The only reason we need to read the
note is to find the version of the kernel, and this seems not to be used
anywhere. We could potentially change the kernel ldscript to add the note
information in the program headers, but dealing with ldscripts is painful
and producing a more complex binary could break some dumb standalone loader.
So the simple solution is to just disable the note loading for floppies
which is what this patch does. If someone wants to fix it in a better way,
be my guest.
2008-09-26 14:12:49 +00:00
gmcgarry
3c9a95916d Wrap compiler-specific flags with HAVE_GCC and HAVE_PCC as necessary. Add a few flags for PCC. 2008-08-29 00:02:21 +00:00
sborrill
5744f667c6 Fix display of "Option X will be chosen in" banner. The letter version of it
was always displayed even if number format was selected.
2008-08-20 11:34:32 +00:00
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