boot - Add a ton of features to the boot loader & adjust default menu
commita2e9504a4ea02db40b9b879db3146a8f4b869c91
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 16:37:17 +0000 (24 09:37 -0700)
tree6ff7bf1b8ac56dbca04f36364bd548194cb56d64
parentaf244385356ffbab2fbbac5ab0343856d13b0bf7
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