mirror of
https://github.com/genodelabs/genode.git
synced 2025-03-22 12:06:00 +00:00
parent
93639532f0
commit
89d35bc41e
@ -30,6 +30,36 @@ proc run_boot_dir {binaries} {
|
|||||||
|
|
||||||
# Save config part of the image.elf for easy inspection
|
# Save config part of the image.elf for easy inspection
|
||||||
exec cp -f [run_dir]/genode/config [run_dir].config
|
exec cp -f [run_dir]/genode/config [run_dir].config
|
||||||
|
|
||||||
|
if {[board] == "pc"} {
|
||||||
|
|
||||||
|
build_initrd $binaries
|
||||||
|
|
||||||
|
file copy -force [genode_dir]/tool/boot/vmlinuz [run_dir]/vmlinuz
|
||||||
|
|
||||||
|
if {[have_include "image/iso"]} {
|
||||||
|
install_iso_bootloader_to_run_dir
|
||||||
|
}
|
||||||
|
|
||||||
|
if {[have_include "image/uefi"]} {
|
||||||
|
|
||||||
|
exec mkdir -p [run_dir]/efi/boot
|
||||||
|
exec cp [get_grub2_dir]/boot/grub2/grub2_32.efi [run_dir]/efi/boot/bootia32.efi
|
||||||
|
exec cp [get_grub2_dir]/boot/grub2/grub2_64.efi [run_dir]/efi/boot/bootx64.efi
|
||||||
|
exec mkdir -p [run_dir]/boot/grub
|
||||||
|
}
|
||||||
|
|
||||||
|
set fh [open "[run_dir]/boot/grub/grub.cfg" "WRONLY CREAT TRUNC"]
|
||||||
|
puts $fh "set timeout=0"
|
||||||
|
puts $fh "menuentry 'Genode on Linux' {"
|
||||||
|
puts $fh " insmod linux"
|
||||||
|
puts $fh " linux /vmlinuz console=ttyS0,115200 amd_iommu=off intel_iommu=off"
|
||||||
|
puts $fh " initrd /initrd"
|
||||||
|
puts $fh "}"
|
||||||
|
close $fh
|
||||||
|
|
||||||
|
run_image
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ proc image_uefi_size { } { return [get_cmd_arg --image-uefi_size 0] }
|
|||||||
#
|
#
|
||||||
proc run_image { {unused ""} } {
|
proc run_image { {unused ""} } {
|
||||||
|
|
||||||
set run_size [expr [regsub {\s.*} [exec du -sm [run_dir]] {}]]
|
set run_size [expr [regsub {\s.*} [exec du -smL [run_dir]] {}]]
|
||||||
|
|
||||||
if {[image_uefi_size] > 0} {
|
if {[image_uefi_size] > 0} {
|
||||||
set disk_size [image_uefi_size]
|
set disk_size [image_uefi_size]
|
||||||
|
@ -21,7 +21,7 @@ proc qemu_args { } {
|
|||||||
# XXX should by removed in favor of [have_include "exec/qemu"]
|
# XXX should by removed in favor of [have_include "exec/qemu"]
|
||||||
#
|
#
|
||||||
proc is_qemu_available { } {
|
proc is_qemu_available { } {
|
||||||
if {[have_spec linux]} { return false }
|
if {[expr [have_spec linux] && {"[board]"} == {"linux"}]} { return false }
|
||||||
|
|
||||||
if {[have_spec panda]
|
if {[have_spec panda]
|
||||||
|| [have_spec arndale]
|
|| [have_spec arndale]
|
||||||
|
31
tool/run/run
31
tool/run/run
@ -987,6 +987,37 @@ proc build_core_image { modules } {
|
|||||||
exec cp -f [run_dir]/genode/config [run_dir].config
|
exec cp -f [run_dir]/genode/config [run_dir].config
|
||||||
}
|
}
|
||||||
|
|
||||||
|
proc build_initrd { modules } {
|
||||||
|
|
||||||
|
copy_genode_binaries_to_run_dir $modules
|
||||||
|
|
||||||
|
set modules [glob -nocomplain -tails -directory [run_dir]/genode/ *]
|
||||||
|
set excluded_modules [kernel_files]
|
||||||
|
|
||||||
|
foreach file [glob -nocomplain [run_dir]/genode/*.config] {
|
||||||
|
check_xml_syntax $file }
|
||||||
|
|
||||||
|
exec cp -f [run_dir]/genode/config [run_dir].config
|
||||||
|
|
||||||
|
set here [pwd]
|
||||||
|
cd [run_dir]
|
||||||
|
puts "generating initrd"
|
||||||
|
exec cp genode/initramfs init
|
||||||
|
exec mkdir tmp
|
||||||
|
exec mkdir dev
|
||||||
|
set files "init\ntmp\ndev\ngenode\n"
|
||||||
|
append files [exec find genode -type f,l -printf "genode/%f\n"]
|
||||||
|
exec -ignorestderr echo $files | [installed_command cpio] -o -L -H newc > initrd
|
||||||
|
|
||||||
|
#workaround because cpio fails to compress broken links sometimes
|
||||||
|
exec touch dev/platform_info
|
||||||
|
cd genode
|
||||||
|
exec ln -s ../dev/platform_info platform_info
|
||||||
|
cd ..
|
||||||
|
exec -ignorestderr echo "genode/platform_info" | [installed_command cpio] -o -A -H newc -O initrd
|
||||||
|
cd ${here}
|
||||||
|
}
|
||||||
|
|
||||||
source [genode_dir]/tool/run/depot.inc
|
source [genode_dir]/tool/run/depot.inc
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user