boot - Add a ton of features to the boot loader & adjust default menu
commit5b31b6dc0d4997729c172c7ce226fb880e01d5e9
authorMatthew Dillon <dillon@apollo.backplane.com>
Sun, 24 Oct 2010 02:03:51 +0000 (23 19:03 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sun, 24 Oct 2010 02:16:29 +0000 (23 19:16 -0700)
tree7c91f216643fb5f105fb2032cc3a799f2db8b58b
parentddc99fb4f56cb52a63f98e2da85f8e99c97df1be
boot - Add a ton of features to the boot loader & adjust default menu

* Add conditionals ifset ifexists else elseifexists and endif

* Conditionalize dloader.menu to only present menu options for which
  the related kernels are present in /boot.

* Set the default kernel to one of:

  kernel, kernel.GENERIC, kernel.GENERIC_SMP, kernel.X86_64_GENERIC,
  or kernel.X86_64_GENERIC_SMP.  The first one in the list found becomes
  the default.

* If ${default_kernel}_SMP is available supply a menu option to change
  the default to that kernel, aka UP->SMP

* If kernel.X86_64_GENERIC[_SMP] is available and the current default is
  not the same supply menu options to change the default to the 64-bit
  UP or SMP kernel.

  Note however that for this to work the related boot kernel directory
  had better have a loader.conf.local in it that points the root mount
  to a 64-bit root 'cause 64-bit kernels can't run 32 bit binaries yet.

* Adjust the menu item execution code to copy the items before executing
  them, allowing recursive menu execution.  The recursive menu feature
  is a bit of a hack right now however.

* NOTE: the optcd for people ESCaping into the boot prompt was moved
  to dloader.rc, when updating you may have to manually reinstall that
  file to get the functionality.
sys/boot/common/bootstrap.h
sys/boot/common/commands.c
sys/boot/common/do_dloader.c
sys/boot/dloader/cmds.c
sys/boot/dloader/dloader.h
sys/boot/dloader/dloader.menu
sys/boot/dloader/subs.c
sys/boot/pc32/loader/dloader.rc