From 769bad9f8a55c05abac59cbf35df663a79eb7436 Mon Sep 17 00:00:00 2001 From: Toomas Soome Date: Fri, 16 Jun 2017 20:08:44 +0000 Subject: Add chain loader support for loader Implement simple chain loader in loader; this update does add chain command, taking device or file as argument to load and start new boot loader. In case of BIOS, the chain will read the boot block to address 0000:7c00 and jumps on it. In case of UEFI, the chain command is to be used with efi application, typically stored in EFI System Partition. The update also does add simple menu entry, if the variable chain_disk is set. The value of the variable chain_disk is used as argument for chain loading. Relnotes: yes Differential Revision: https://reviews.freebsd.org/D5992 --- sys/boot/forth/menu.rc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'sys/boot/forth') diff --git a/sys/boot/forth/menu.rc b/sys/boot/forth/menu.rc index 3c7de7138b8ad..6fe3dfe14281a 100644 --- a/sys/boot/forth/menu.rc +++ b/sys/boot/forth/menu.rc @@ -73,8 +73,23 @@ s" currdev" getenv dup 0> [if] drop 4 s" zfs:" compare 0= [if] set mainmenu_command[7]="3 goto_menu" set mainmenu_keycode[7]=101 set mainansi_caption[7]="Select Boot ^[1mE^[37mnvironment..." + + s" chain_disk" getenv? [if] + set mainmenu_caption[8]="Chain[L]oad ${chain_disk}" + set mainmenu_command[8]="chain ${chain_disk}" + set mainmenu_keycode[8]=108 + set mainansi_caption[8]="Chain^[1mL^[moad ${chain_disk}" + [then] +[else] + s" chain_disk" getenv? [if] + set mainmenu_caption[7]="Chain[L]oad ${chain_disk}" + set mainmenu_command[7]="chain ${chain_disk}" + set mainmenu_keycode[7]=108 + set mainansi_caption[7]="Chain^[1mL^[moad ${chain_disk}" + [then] [then] [else] drop [then] + \ \ BOOT OPTIONS MENU \ -- cgit v1.3