proc binary_name_ld_lib_so { } { return "ld-hw.lib.so" } proc binary_name_core_o { } { return "hw/core.o" } proc binary_name_timer { } { return "hw_timer_drv" } proc run_boot_string { } { return "\nkernel initialized" } proc core_link_address { } { if {[have_spec "hw_odroid_xu"]} { return "0x80000000" } if {[have_spec "hw_pbxa9"]} { return "0x70000000" } if {[have_spec "hw_usb_armory"]} { return "0x72000000" } if {[have_spec "hw_x86_64"]} { return "0x00200000" } if {[have_spec "hw_wand_quad"]} { return "0x10001000" } if {[have_spec "hw_imx53_qsb"]} { return "0x70010000" } if {[have_spec "hw_arndale"]} { return "0x80000000" } if {[have_spec "hw_panda"]} { return "0x81000000" } if {[have_spec "hw_zynq"]} { return "0x00100000" } if {[have_spec "hw_riscv"]} { return "0x00000200" } if {[have_spec "hw_rpi"]} { return "0x00800000" } puts "unknown platform no linker address known" exit -1 } ## # Populate boot directory with binaries on hw # proc run_boot_dir {binaries} { # generate static ACPI report for platform driver on Muen if {[have_spec "hw_x86_64_muen"]} { set fh [open "bin/acpi" "WRONLY CREAT TRUNC"] puts $fh "" close $fh } build { lib/ld/hw } build_core_image $binaries if {[have_include "image/iso"] || [have_include "image/disk"]} { # # Install isolinux/GRUB files and bender # install_iso_bootloader_to_run_dir # # Generate GRUB config file # set fh [open "[run_dir]/boot/grub/menu.lst" "WRONLY CREAT TRUNC"] puts $fh "timeout 0" puts $fh "default 0" if {[have_spec "muen"]} { puts $fh "\ntitle Genode on base-hw/Muen SK" puts $fh " kernel /image.bin" } else { puts $fh "\ntitle Genode on base-hw" puts $fh " kernel /boot/bender" puts $fh " module /image.elf" } close $fh } run_image [run_dir]/image.elf # set symbolic link to image.elf file in TFTP directory for PXE boot if {[have_spec arm] && [have_include "load/tftp"]} { exec ln -sf [run_dir]/image.elf [load_tftp_base_dir][load_tftp_offset_dir] if {[have_include "image/uboot"]} { exec ln -sf [pwd]/[run_dir]/uImage [load_tftp_base_dir][load_tftp_offset_dir] } } if {[have_spec x86] && ![have_spec muen] && [have_include "load/tftp"]} { # # Install PXE bootloader pulsar # install_pxe_bootloader_to_run_dir # # Generate pulsar config file # set fh [open "[run_dir]/config-52-54-00-12-34-56" "WRONLY CREAT TRUNC"] puts $fh " exec /boot/bender" puts $fh " load /image.elf" close $fh generate_tftp_config } if {[have_spec x86] && [have_include "load/ipxe"]} { # # Generate iPXE config file # set fh [open "[run_dir]/boot.cfg" "WRONLY CREAT TRUNC"] puts $fh "#!ipxe" if {[have_spec "muen"]} { puts $fh "kernel image.bin" } else { puts $fh "kernel boot/bender" puts $fh "module image.elf" # # Install bender # install_bender_to_run_dir } puts $fh "boot" close $fh update_ipxe_boot_dir } }