loader: include efi.4th only if we do have uefi

Also simplify efi.4th.
This commit is contained in:
Toomas Soome 2018-04-08 11:39:27 +00:00
parent c3115feb7e
commit cae0ecf693
3 changed files with 4 additions and 15 deletions

View File

@ -26,16 +26,5 @@
only forth definitions
: efiboot? ( -- flag )
s" efi-version" getenv -1 <> dup if
swap drop ( c-addr flag -- flag )
then
;
: maybe-efi-resizecons
efiboot? if
s" efi-autoresizecons" evaluate
then
;
s" efi-autoresizecons" evaluate
.( EFI boot environment) cr

View File

@ -46,6 +46,9 @@ include /boot/support.4th
include /boot/color.4th
include /boot/delay.4th
include /boot/check-password.4th
s" efi-version" getenv? [if]
include /boot/forth/efi.4th
[then]
only forth definitions

View File

@ -6,15 +6,12 @@
\
\ Includes additional commands
include /boot/loader.4th
include /boot/efi.4th
try-include /boot/loader.rc.local
\ Reads and processes loader.conf variables
\ NOTE: Change to `initialize' if you enable the below boot menu
start
maybe-efi-resizecons
\ Tests for password -- executes autoboot first if a password was defined
check-password