mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-18 21:27:56 +00:00
tool: support to use graphical grub2
This commit is contained in:
parent
a6aa4863f3
commit
4979221152
@ -1 +1 @@
|
||||
bf7448a8ecabfa70a5f9ba3f82f42c04b1052097
|
||||
e1b6f0ea55b716ef8548fbf416ec503a5d31a09d
|
||||
|
@ -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)
|
||||
|
BIN
tool/boot/boot.png
Normal file
BIN
tool/boot/boot.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.5 KiB |
@ -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"
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user