diff options
-rw-r--r-- | projects/grub/configs/grub.cfg | 2 | ||||
-rwxr-xr-x | projects/grub/grub | 13 | ||||
-rw-r--r-- | projects/grub/install/corebootfb/AUTHORS (renamed from projects/grub/install/vesafb/AUTHORS) | 0 | ||||
-rw-r--r-- | projects/grub/install/corebootfb/COPYING (renamed from projects/grub/install/vesafb/COPYING) | 0 | ||||
-rw-r--r-- | projects/grub/install/corebootfb/grub.cfg (renamed from projects/grub/install/vesafb/grub.cfg) | 19 | ||||
-rw-r--r-- | projects/grub/install/corebootfb/grubtest.cfg (renamed from projects/grub/install/vesafb/grubtest.cfg) | 19 | ||||
-rw-r--r-- | projects/grub/install/grubenv | 16 | ||||
-rw-r--r-- | projects/grub/install/install | 5 | ||||
-rw-r--r-- | projects/grub/install/txtmode/grub.cfg | 14 | ||||
-rw-r--r-- | projects/grub/install/txtmode/grubtest.cfg | 14 |
10 files changed, 46 insertions, 56 deletions
diff --git a/projects/grub/configs/grub.cfg b/projects/grub/configs/grub.cfg index c9f22ff1..f9e79cbd 100644 --- a/projects/grub/configs/grub.cfg +++ b/projects/grub/configs/grub.cfg @@ -1,4 +1,4 @@ set prefix=(memdisk)/boot/grub -set root='cbfsdisk' +set root=(cbfsdisk) source (cbfsdisk)/grub.cfg diff --git a/projects/grub/grub b/projects/grub/grub index 5dd3435c..4a7ba1ec 100755 --- a/projects/grub/grub +++ b/projects/grub/grub @@ -69,17 +69,9 @@ build() { local sources_path="$(project_sources_path "${project}" "${repository}" "$@")" local build_path="$(project_build_path "${project}" "$@")" - local -a grub_keymaps - mapfile -t grub_install_modules < "${project_path}/${CONFIGS}/grub-install-modules" mapfile -t grub_load_modules < "${project_path}/${CONFIGS}/grub-load-modules" - for keymap in "${project_path}/${CONFIGS}/keymap"/*; do - if [[ -f "${keymap}" ]]; then - grub_keymaps+=("/boot/grub/layouts/${keymap##*/}=${keymap}") - fi - done - mkdir -p "${build_path}" ( @@ -101,14 +93,13 @@ build() { --directory=grub-core \ -O i386-coreboot \ -o grub.elf \ - /boot/grub/grub.cfg="${project_path}/${CONFIGS}/grub.cfg" \ - "${grub_keymaps[@]}" + /boot/grub/grub.cfg="${project_path}/${CONFIGS}/grub.cfg" # Copy the ELF to its build directory cp grub.elf "${build_path}" # Tidy up - make clean + make distclean ) } diff --git a/projects/grub/install/vesafb/AUTHORS b/projects/grub/install/corebootfb/AUTHORS index 0157cfed..0157cfed 100644 --- a/projects/grub/install/vesafb/AUTHORS +++ b/projects/grub/install/corebootfb/AUTHORS diff --git a/projects/grub/install/vesafb/COPYING b/projects/grub/install/corebootfb/COPYING index 3b78313b..3b78313b 100644 --- a/projects/grub/install/vesafb/COPYING +++ b/projects/grub/install/corebootfb/COPYING diff --git a/projects/grub/install/vesafb/grub.cfg b/projects/grub/install/corebootfb/grub.cfg index e057e88b..f61e2684 100644 --- a/projects/grub/install/vesafb/grub.cfg +++ b/projects/grub/install/corebootfb/grub.cfg @@ -1,5 +1,3 @@ -set prefix=(memdisk)/boot/grub - insmod nativedisk insmod ehci insmod ohci @@ -17,20 +15,17 @@ terminal_input --append serial terminal_output --append serial terminal_input --append at_keyboard terminal_output --append cbmemc - -gfxpayload=keep terminal_output --append gfxterm -# Prettify GRUB -background_image (cbfsdisk)/background.png -loadfont (cbfsdisk)/dejavusansmono.pf2 +load_env --file (cbfsdisk)/grubenv -# Default to first option, automatically boot after 1 second -set default="0" -set timeout=1 +# User's preferred keyboard layout +if [ -n "${keymap}" ]; then + keymap "${keymap}" +fi -# This is useful when using 'cat' on long files on GRUB terminal -set pager=1 +# Prettify GRUB +background_image "${gfxterm_background}" function try_user_config { set root="${1}" diff --git a/projects/grub/install/vesafb/grubtest.cfg b/projects/grub/install/corebootfb/grubtest.cfg index d0e0b46e..50beb915 100644 --- a/projects/grub/install/vesafb/grubtest.cfg +++ b/projects/grub/install/corebootfb/grubtest.cfg @@ -1,5 +1,3 @@ -set prefix=(memdisk)/boot/grub - insmod nativedisk insmod ehci insmod ohci @@ -17,20 +15,17 @@ terminal_input --append serial terminal_output --append serial terminal_input --append at_keyboard terminal_output --append cbmemc - -gfxpayload=keep terminal_output --append gfxterm -# Prettify GRUB -background_image (cbfsdisk)/background.png -loadfont (memdisk)/dejavusansmono.pf2 +load_env --file (cbfsdisk)/grubenv -# Default to first option, automatically boot after 1 second -set default="0" -set timeout=1 +# User's preferred keyboard layout +if [ -n "${keymap}" ]; then + keymap "${keymap}" +fi -# This is useful when using 'cat' on long files on GRUB terminal -set pager=1 +# Prettify GRUB +background_image "${gfxterm_background}" function try_user_config { set root="${1}" diff --git a/projects/grub/install/grubenv b/projects/grub/install/grubenv new file mode 100644 index 00000000..66f7b1c6 --- /dev/null +++ b/projects/grub/install/grubenv @@ -0,0 +1,16 @@ +# GRUB Environment Block +color_highlight=black/white +color_normal=white/black +default=0 +gfxpayload=keep +gfxterm_background=(cbfsdisk)/background.png +gfxterm_font=(cbfsdisk)/fonts/dejavusansmono.pf2 +keymap=(cbfsdisk)/keymaps/default.gkb +lang= +locale_dir=(cbfsdisk)/locale +menu_color_highlight=black/white +menu_color_normal=white/black +pager=1 +timeout=1 +timeout_style=menu +#############################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
\ No newline at end of file diff --git a/projects/grub/install/install b/projects/grub/install/install index c396a32d..3ebca5a2 100644 --- a/projects/grub/install/install +++ b/projects/grub/install/install @@ -1,4 +1,5 @@ +grubenv:grubenv txtmode/grub.cfg:txtmode/grub.cfg txtmode/grubtest.cfg:txtmode/grubtest.cfg -vesafb/grub.cfg:vesafb/grub.cfg -vesafb/grubtest.cfg:vesafb/grubtest.cfg +corebootfb/grub.cfg:corebootfb/grub.cfg +corebootfb/grubtest.cfg:corebootfb/grubtest.cfg diff --git a/projects/grub/install/txtmode/grub.cfg b/projects/grub/install/txtmode/grub.cfg index c668544b..90946c01 100644 --- a/projects/grub/install/txtmode/grub.cfg +++ b/projects/grub/install/txtmode/grub.cfg @@ -1,5 +1,3 @@ -set prefix=(memdisk)/boot/grub - insmod nativedisk insmod ehci insmod ohci @@ -16,16 +14,14 @@ terminal_input --append serial terminal_output --append serial terminal_input --append at_keyboard terminal_output --append cbmemc - -gfxpayload=keep terminal_output --append gfxterm -# Default to first option, automatically boot after 1 second -set default="0" -set timeout=1 +load_env --file (cbfsdisk)/grubenv -# This is useful when using 'cat' on long files on GRUB terminal -set pager=1 +# User's preferred keyboard layout +if [ -n "${keymap}" ]; then + keymap "${keymap}" +fi function try_user_config { set root="${1}" diff --git a/projects/grub/install/txtmode/grubtest.cfg b/projects/grub/install/txtmode/grubtest.cfg index 6ffeace7..d9ab637d 100644 --- a/projects/grub/install/txtmode/grubtest.cfg +++ b/projects/grub/install/txtmode/grubtest.cfg @@ -1,5 +1,3 @@ -set prefix=(memdisk)/boot/grub - insmod nativedisk insmod ehci insmod ohci @@ -16,16 +14,14 @@ terminal_input --append serial terminal_output --append serial terminal_input --append at_keyboard terminal_output --append cbmemc - -gfxpayload=keep terminal_output --append gfxterm -# Default to first option, automatically boot after 1 second -set default="0" -set timeout=1 +load_env --file (cbfsdisk)/grubenv -# This is useful when using 'cat' on long files on GRUB terminal -set pager=1 +# User's preferred keyboard layout +if [ -n "${keymap}" ]; then + keymap "${keymap}" +fi function try_user_config { set root="${1}" |