diff --git a/repos/base/ports/grub2.hash b/repos/base/ports/grub2.hash index d724eb4f2..ad3a4940c 100644 --- a/repos/base/ports/grub2.hash +++ b/repos/base/ports/grub2.hash @@ -1 +1 @@ -bf7448a8ecabfa70a5f9ba3f82f42c04b1052097 +e1b6f0ea55b716ef8548fbf416ec503a5d31a09d diff --git a/repos/base/ports/grub2.port b/repos/base/ports/grub2.port index 60c2a2ebc..67161c80d 100644 --- a/repos/base/ports/grub2.port +++ b/repos/base/ports/grub2.port @@ -3,7 +3,7 @@ VERSION := git DOWNLOADS := g2fg.git URL(g2fg) := https://github.com/alex-ab/g2fg.git -REV(g2fg) := e6095dd34d71cb180271f47a7bbf20a813102a28 +REV(g2fg) := cf35a6e5dc35a9b1961f66cd37cb1d4c23309832 DIR(g2fg) := boot default: $(DOWNLOADS) diff --git a/tool/boot/boot.png b/tool/boot/boot.png new file mode 100644 index 000000000..ec695877d Binary files /dev/null and b/tool/boot/boot.png differ diff --git a/tool/run/boot_dir/nova b/tool/run/boot_dir/nova index 25bb3ff70..368ec9002 100644 --- a/tool/run/boot_dir/nova +++ b/tool/run/boot_dir/nova @@ -69,6 +69,11 @@ proc run_boot_dir {binaries} { if {[have_include "image/disk"]} { exec mkdir -p [run_dir]/boot/grub exec cp [genode_dir]/tool/boot/bender [run_dir]/boot/bender + exec cp [genode_dir]/tool/boot/boot.png [run_dir]/boot/boot.png + if {[file exists /boot/grub/unicode.pf2]} { + # needed in graphical menu with non-scrampled characters + # exec cp /boot/grub/unicode.pf2 [run_dir]/boot/grub/unicode.pf2 + } } if {[have_include "image/iso"]} { @@ -84,6 +89,12 @@ proc run_boot_dir {binaries} { exec mkdir -p [run_dir]/boot/grub exec cp [genode_dir]/tool/boot/bender [run_dir]/boot/bender + exec cp [genode_dir]/tool/boot/boot.png [run_dir]/boot/boot.png + if {[file exists /boot/grub/unicode.pf2]} { + # needed in graphical menu with non-scrampled characters + # exec cp /boot/grub/unicode.pf2 [run_dir]/boot/grub/unicode.pf2 + } + set serial_bender_opt "serial_fallback" } @@ -91,9 +102,26 @@ proc run_boot_dir {binaries} { # Generate GRUB2 config file # set fh [open "[run_dir]/boot/grub/grub.cfg" "WRONLY CREAT TRUNC"] + + # If timeout != 0 is used and gfxterm, enable and add unicode.pf2 (see above) + # puts $fh "loadfont /boot/grub/unicode.pf2" puts $fh "set timeout=0" + # tell grub2 to prefer 32bit framebuffer resolution puts $fh "set gfxpayload=\"0x0x32\"" + + if {[have_include image/uefi]} { + puts $fh "insmod gfxterm" + puts $fh "terminal_output gfxterm" + puts $fh "insmod gfxterm_background" + puts $fh "insmod png" + puts $fh "background_image -m center /boot/boot.png" + } + + # set this to get text console instead of graphical console + # puts $fh "terminal_input console" + # puts $fh "terminal_output console" + puts $fh "menuentry 'Genode on NOVA' {" puts $fh " insmod multiboot2" puts $fh " insmod gzio" diff --git a/tool/run/image/disk b/tool/run/image/disk index 71b91b9ea..6eabb947f 100644 --- a/tool/run/image/disk +++ b/tool/run/image/disk @@ -32,7 +32,7 @@ proc run_image { {unused ""} } { if {[image_disk_size] > 0} { set disk_size_kb [expr [image_disk_size] * 1024 * 1024] } else { - set disk_size_kb [expr ($size_run + 256 + 128) / 32 * 32] + set disk_size_kb [expr ($size_run + 512) / 32 * 32] } # setup partition with content @@ -75,6 +75,7 @@ proc run_image { {unused ""} } { # create partition table entry pointing to the content catch { exec parted -a none [run_dir].img -- mkpart Fix GENODE ext2 [expr $first_sector]s ${last_sector}s } + exec parted [run_dir].img -s 'name 3 GENODE' # create hybrid MBR exec echo -e "r\no\nh\n1\nn\n\ny\nn\no\nw\ny\n" | gdisk [run_dir].img