mirror of
https://github.com/mmueller41/genode.git
synced 2026-01-21 12:32:56 +01:00
Merge branch 'staging' of github.com:mmueller41/genode into pc-ixgbe
This commit is contained in:
@@ -86,7 +86,6 @@ tz_vmm
|
||||
usb_block
|
||||
usb_hid_raw
|
||||
usb_hid_reconnect
|
||||
vbox5_genode_usb_hid_raw
|
||||
vbox5_ubuntu_16_04_32
|
||||
vbox5_ubuntu_16_04_64
|
||||
vbox5_win10_64
|
||||
@@ -95,6 +94,7 @@ vbox5_win7_64
|
||||
vbox5_win7_64_multiple
|
||||
vbox5_win7_64_raw
|
||||
vbox5_win7_64_share
|
||||
vbox6_genode_usb_hid_raw
|
||||
verify
|
||||
vfs_cfg
|
||||
vfs_import
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
|
||||
#
|
||||
# Board support for Raspberry Pi family
|
||||
#
|
||||
#REPOSITORIES += $(GENODE_DIR)/repos/rpi
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
#
|
||||
# Board-support for Xilinx Zynq-7000 SoC
|
||||
#
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
#
|
||||
# Board support for i.MX SoC family
|
||||
#
|
||||
@@ -12,3 +13,4 @@
|
||||
# Board support for Allwinner SoC family
|
||||
#
|
||||
#REPOSITORIES += $(GENODE_DIR)/repos/allwinner
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
#
|
||||
# Board support for RISC-V Qemu / MiG-V
|
||||
#
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
#
|
||||
# Drivers for x86 PC
|
||||
#
|
||||
|
||||
@@ -85,13 +85,13 @@ endif
|
||||
$(BUILD_DIR)/etc:
|
||||
@mkdir -p $@
|
||||
|
||||
BUILD_CONF_X86 := run_x86 run_boot_dir repos repos_x86
|
||||
BUILD_CONF_ARM_V6 := run_arm_v6 run_boot_dir repos repos_arm_v6
|
||||
BUILD_CONF_ARM_V7 := run_arm_v7 run_boot_dir repos repos_arm_v7
|
||||
BUILD_CONF_X86 := run_x86 run_boot_dir repos_x86 repos
|
||||
BUILD_CONF_ARM_V6 := run_arm_v6 run_boot_dir repos_arm_v6 repos
|
||||
BUILD_CONF_ARM_V7 := run_arm_v7 run_boot_dir repos_arm_v7 repos
|
||||
BUILD_CONF(arm_v6) := $(BUILD_CONF_ARM_V6)
|
||||
BUILD_CONF(arm_v7a) := $(BUILD_CONF_ARM_V7)
|
||||
BUILD_CONF(arm_v8a) := run_arm_v8 run_boot_dir repos repos_arm_v8
|
||||
BUILD_CONF(riscv) := run_riscv run_boot_dir repos repos_riscv
|
||||
BUILD_CONF(arm_v8a) := run_arm_v8 run_boot_dir repos_arm_v8 repos
|
||||
BUILD_CONF(riscv) := run_riscv run_boot_dir repos_riscv repos
|
||||
BUILD_CONF(x86_32) := run_x86_32 $(BUILD_CONF_X86)
|
||||
BUILD_CONF(x86_64) := run_x86_64 $(BUILD_CONF_X86)
|
||||
|
||||
|
||||
@@ -159,9 +159,39 @@ execute_generated_build_mk_file: $(BUILD_MK_FILE)
|
||||
$(VERBOSE)$(MAKE) -j64 $(if $(VERBOSE),--quiet) -f $(BUILD_MK_FILE) \
|
||||
-C $(DEPOT_DIR) VERBOSE=$(VERBOSE)
|
||||
|
||||
#
|
||||
# Utilities to check consistency of bin archives with their src and used APIS
|
||||
#
|
||||
_eq = $(and $(findstring x$(1),x$(2)), $(findstring x$(2),x$(1)))
|
||||
_libapi = $(if $(wildcard $(DEPOT_DIR)/$1/api),$(call file_content,$(DEPOT_DIR)/$1/api),)
|
||||
_apis_of_src = $(call _libapi,$1) $(call file_content,$(DEPOT_DIR)/$1/used_apis)
|
||||
_api_archives_of_src = $(addprefix $(call archive_user,$1)/api/,$(call _apis_of_src,$1))
|
||||
_api_hashes = $(foreach A,$(call _api_archives_of_src,$1),$(call file_content,$(DEPOT_DIR)/$A.hash))
|
||||
_src_hash = $(call file_content,$(DEPOT_DIR)/$1.hash)
|
||||
_src_and_api_hashes = $(call _src_hash,$1) $(call _api_hashes,$1)
|
||||
_src_of_bin = $(call archive_user,$1)/src/$(call bin_archive_recipe,$1)/$(call bin_archive_version,$1)
|
||||
_bin_ingredient_hashes = $(call _src_and_api_hashes,$(call _src_of_bin,$1))
|
||||
_bin_hashes = $(call file_content,$(DEPOT_DIR)/$1.hash)
|
||||
_bin_exists = $(wildcard $(DEPOT_DIR)/$1)
|
||||
_bin_inconsistent = $(if $(call _bin_exists,$1),\
|
||||
$(if $(call _eq,$(call _bin_ingredient_hashes,$1),$(call _bin_hashes,$1)),,$1))
|
||||
|
||||
ifneq ($(REBUILD),)
|
||||
execute_generated_build_mk_file: wipe_existing_archives
|
||||
else
|
||||
INCONSISTENT_BIN_ARCHIVES = $(strip $(foreach I,${ARCHIVES(bin)},$(call _bin_inconsistent,$I)))
|
||||
ifneq ($(INCONSISTENT_BIN_ARCHIVES),)
|
||||
execute_generated_build_mk_file: report_bin_src_inconsistencies
|
||||
endif
|
||||
endif # REBUILD
|
||||
|
||||
report_bin_src_inconsistencies:
|
||||
@( \
|
||||
echo -e "\nError: the following bin archives do not match their src and apis:\n"; \
|
||||
for i in $(INCONSISTENT_BIN_ARCHIVES); do echo -e " $$i"; done; \
|
||||
echo -e "\nYou may consider removing those binary archives from the depot.\n" \
|
||||
)
|
||||
@false
|
||||
|
||||
$(MAKECMDGOALS): execute_generated_build_mk_file
|
||||
@true
|
||||
|
||||
@@ -125,6 +125,7 @@ endif
|
||||
DEPOT_BIN_ARCHIVE_DIR := $(DEPOT_BIN_DIR)/$(SPEC)/$(VERSIONED_ARCHIVE)
|
||||
DEPOT_DBG_ARCHIVE_DIR := $(DEPOT_DBG_DIR)/$(SPEC)/$(VERSIONED_ARCHIVE)
|
||||
DEPOT_ARCHIVE_BUILD_DIR := $(addsuffix .build,$(DEPOT_BIN_ARCHIVE_DIR))
|
||||
DEPOT_BIN_HASH_FILE := $(addsuffix .hash,$(DEPOT_BIN_ARCHIVE_DIR))
|
||||
|
||||
|
||||
#
|
||||
@@ -230,7 +231,13 @@ $(DEPOT_DBG_ARCHIVE_DIR): $(DEPOT_ARCHIVE_BUILD_DIR)/debug
|
||||
$(VERBOSE)find $< -name *.debug -exec cp {} $@/ \;
|
||||
@$(ECHO) "$(DARK_COL)created$(DEFAULT_COL) $(USER)/dbg/$(SPEC)/$(VERSIONED_ARCHIVE)"
|
||||
|
||||
$(TARGET): $(DEPOT_BIN_ARCHIVE_DIR)
|
||||
INGREDIENTS := $(addprefix src/,$(ARCHIVE)) $(addprefix api/,$(USED_APIS))
|
||||
INGREDIENTS_HASHES := $(foreach I,$(INGREDIENTS),$(call file_content,$(DEPOT_DIR)/$(USER)/$I.hash))
|
||||
|
||||
$(DEPOT_BIN_HASH_FILE): $(DEPOT_BIN_ARCHIVE_DIR)
|
||||
$(VERBOSE)echo "$(INGREDIENTS_HASHES)" > $@
|
||||
|
||||
$(TARGET): $(DEPOT_BIN_HASH_FILE)
|
||||
|
||||
ifneq ($(DBG),)
|
||||
$(TARGET): $(DEPOT_DBG_ARCHIVE_DIR)
|
||||
|
||||
@@ -131,7 +131,7 @@ _rename_to_final_archive: _check_hash
|
||||
hint=" $(BRIGHT_COL)(new version)$(DEFAULT_COL)"; \
|
||||
test $$hash = $(ORIG_RECIPE_HASH_VALUE) || \
|
||||
$(VERSION_UPDATED_CMD); \
|
||||
rm -f $(DEPOT_ARCHIVE_DIR).hash; \
|
||||
mv $(DEPOT_ARCHIVE_DIR).hash $(DEPOT_SUB_DIR)/$$final_name.hash; \
|
||||
$(ECHO) "$(DARK_COL)created$(DEFAULT_COL)" \
|
||||
"$(USER)/$(notdir $(DEPOT_SUB_DIR))/$$final_name$$hint"; \
|
||||
true;
|
||||
|
||||
@@ -13,15 +13,15 @@ endif
|
||||
export GENODE_DIR := $(realpath $(dir $(MAKEFILE_LIST))/../..)
|
||||
|
||||
usage:
|
||||
@$(ECHO)
|
||||
@$(ECHO) "Tool for retrieving version information of port sources"
|
||||
@$(ECHO)
|
||||
@$(ECHO) "usage:"
|
||||
@$(ECHO)
|
||||
@$(ECHO) " $(notdir $(MAKEFILE_LIST)) <ports>"
|
||||
@$(ECHO)
|
||||
@$(ECHO) " <ports> whitespace-separated list of ports"
|
||||
@$(ECHO)
|
||||
@echo
|
||||
@echo "Tool for retrieving version information of port sources"
|
||||
@echo
|
||||
@echo "usage:"
|
||||
@echo
|
||||
@echo " $(notdir $(MAKEFILE_LIST)) <ports>"
|
||||
@echo
|
||||
@echo " <ports> whitespace-separated list of ports"
|
||||
@echo
|
||||
|
||||
TARGETS = $(sort $(MAKECMDGOALS))
|
||||
|
||||
|
||||
@@ -23,6 +23,10 @@ proc is_amt_available { {host "" } {password "" } } {
|
||||
return true
|
||||
}
|
||||
|
||||
if {[have_installed meshcmd]} {
|
||||
return true
|
||||
}
|
||||
|
||||
puts "No support for Intel's AMT detected."
|
||||
return false
|
||||
}
|
||||
|
||||
28
tool/run/bender.inc
Normal file
28
tool/run/bender.inc
Normal file
@@ -0,0 +1,28 @@
|
||||
#
|
||||
# Return Bender option that configures Bender's Intel HWP plugin
|
||||
#
|
||||
# \param --bender-intel-hwp-mode Run the Intel HWP plugin of Bender in the
|
||||
# given mode. Valid argument values are
|
||||
# "off",
|
||||
# "performance",
|
||||
# "balanced", and
|
||||
# "power_saving"
|
||||
# The argument value defaults to
|
||||
# "performance".
|
||||
#
|
||||
proc bender_intel_hwp_mode_option { } {
|
||||
|
||||
set opt [get_cmd_arg_first --bender-intel-hwp-mode "performance"]
|
||||
if {$opt == "off"} {
|
||||
return "intel_hwp_off"
|
||||
} elseif {$opt == "performance"} {
|
||||
return "intel_hwp_performance"
|
||||
} elseif {$opt == "balanced"} {
|
||||
return "intel_hwp_balanced"
|
||||
} elseif {$opt == "power_saving"} {
|
||||
return "intel_hwp_power_saving"
|
||||
} else {
|
||||
return "intel_hwp_performance"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ proc core_link_address { } { return "0x01000000" }
|
||||
|
||||
proc boot_output { } { return "serial" }
|
||||
|
||||
proc grub_menuentry { } { return "'Genode on L4/Fiasco'" }
|
||||
|
||||
##
|
||||
# Populate boot directory with binaries on fiasco
|
||||
@@ -66,7 +67,7 @@ proc run_boot_dir {binaries} {
|
||||
# The core binary is part of the 'binaries' list but it must
|
||||
# appear right after 'sigma0' as boot module. Hence the special case.
|
||||
#
|
||||
puts $fh "menuentry 'Genode on L4/Fiasco' {"
|
||||
puts $fh "menuentry [grub_menuentry] {"
|
||||
puts $fh " insmod multiboot"
|
||||
puts $fh " multiboot /boot/bender [boot_output]"
|
||||
puts $fh " module /boot/bootstrap -serial"
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
source [genode_dir]/tool/run/bender.inc
|
||||
|
||||
proc binary_name_ld_lib_so { } { return "ld-foc.lib.so" }
|
||||
proc binary_name_core_a { } { return "core-foc-[board].a" }
|
||||
proc binary_name_timer { } { return "foc_timer" }
|
||||
@@ -26,6 +28,8 @@ proc fiasco_serial_esc_arg { } { return "-serial_esc " }
|
||||
|
||||
proc boot_output { } { return "serial" }
|
||||
|
||||
proc grub_menuentry { } { return "'Genode on Fiasco.OC'" }
|
||||
|
||||
|
||||
##
|
||||
# Reset the target system via the Fiasco.OC kernel debugger
|
||||
@@ -92,7 +96,9 @@ proc run_boot_dir_x86 {binaries} {
|
||||
|
||||
exec mv [run_dir]/image.elf [run_dir]/boot/image.elf
|
||||
|
||||
if {[have_include "image/iso"] || [have_include "image/disk"]} {
|
||||
set options_bender "[boot_output] [bender_intel_hwp_mode_option]"
|
||||
|
||||
if {[have_include "image/iso"] || [have_include "image/disk"] || [have_include image/uefi]} {
|
||||
|
||||
if {[have_include "image/disk"]} {
|
||||
install_disk_bootloader_to_run_dir
|
||||
@@ -102,6 +108,11 @@ proc run_boot_dir_x86 {binaries} {
|
||||
install_iso_bootloader_to_run_dir
|
||||
}
|
||||
|
||||
if {[have_include image/uefi]} {
|
||||
install_uefi_bootloader_to_run_dir
|
||||
append options_bender " serial_fallback"
|
||||
}
|
||||
|
||||
#
|
||||
# Generate GRUB2 config file
|
||||
#
|
||||
@@ -110,9 +121,9 @@ proc run_boot_dir_x86 {binaries} {
|
||||
# The core binary is part of the 'binaries' list but it must
|
||||
# appear right after 'sigma0' as boot module. Hence the special case.
|
||||
#
|
||||
puts $fh "menuentry 'Genode on Fiasco.OC' {"
|
||||
puts $fh "menuentry [grub_menuentry] {"
|
||||
puts $fh " insmod multiboot"
|
||||
puts $fh " multiboot /boot/bender [boot_output]"
|
||||
puts $fh " multiboot /boot/bender $options_bender"
|
||||
puts $fh " module /boot/bootstrap"
|
||||
puts $fh " module /boot/kernel fiasco [fiasco_serial_esc_arg]"
|
||||
puts $fh " module /boot/sigma0"
|
||||
@@ -126,7 +137,7 @@ proc run_boot_dir_x86 {binaries} {
|
||||
#
|
||||
run_image
|
||||
|
||||
if {[have_include "load/tftp"]} {
|
||||
if {[have_spec x86] && [have_include "load/tftp"]} {
|
||||
#
|
||||
# Install PXE bootloader pulsar
|
||||
#
|
||||
@@ -136,7 +147,7 @@ proc run_boot_dir_x86 {binaries} {
|
||||
# Generate pulsar config file
|
||||
#
|
||||
set fh [open "[run_dir]/config-52-54-00-12-34-56" "WRONLY CREAT TRUNC"]
|
||||
puts $fh " exec /boot/bender [boot_output]"
|
||||
puts $fh " exec /boot/bender $options_bender"
|
||||
puts $fh " load /boot/bootstrap"
|
||||
puts $fh " load /boot/kernel -serial_esc"
|
||||
puts $fh " load /boot/sigma0"
|
||||
@@ -146,7 +157,7 @@ proc run_boot_dir_x86 {binaries} {
|
||||
generate_tftp_config
|
||||
}
|
||||
|
||||
if {[have_include "load/ipxe"]} {
|
||||
if {[have_spec x86] && [have_include "load/ipxe"]} {
|
||||
create_ipxe_config
|
||||
update_ipxe_boot_dir
|
||||
create_symlink_for_iso
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
source [genode_dir]/tool/run/bender.inc
|
||||
|
||||
proc binary_name_ld_lib_so { } { return "ld-hw.lib.so" }
|
||||
proc binary_name_core_a { } { return "core-hw.a" }
|
||||
proc binary_name_timer { } { return "hw_timer" }
|
||||
@@ -8,6 +10,8 @@ proc run_boot_string { } { return "\nkernel initialized" }
|
||||
|
||||
proc boot_output { } { return "serial" }
|
||||
|
||||
proc grub_menuentry { } { return "'Genode on base-hw'" }
|
||||
|
||||
|
||||
proc bootstrap_link_address { } {
|
||||
|
||||
@@ -75,6 +79,7 @@ proc run_boot_dir {binaries} {
|
||||
if {[file exists debug/core-hw-[board].a]} {
|
||||
build_core debug/core-hw-[board].a {} [run_dir].core [core_link_address]
|
||||
build_core [run_dir]/genode/$bootstrap_obj {} [run_dir].bootstrap [bootstrap_link_address]
|
||||
exec [cross_dev_prefix]objcopy --only-keep-debug [run_dir].core [run_dir].core.debug
|
||||
}
|
||||
|
||||
# determine modules to be incorporated into the core image
|
||||
@@ -102,7 +107,7 @@ proc run_boot_dir {binaries} {
|
||||
exec mkdir -p [run_dir]/boot
|
||||
exec mv [run_dir]/image-hw.elf [run_dir]/boot/image-hw.elf
|
||||
|
||||
set options_bender "[boot_output] "
|
||||
set options_bender "[boot_output] [bender_intel_hwp_mode_option]"
|
||||
|
||||
if {[have_include "image/iso"] || [have_include "image/disk"] || [have_include image/uefi]} {
|
||||
#
|
||||
@@ -128,7 +133,7 @@ proc run_boot_dir {binaries} {
|
||||
#
|
||||
set fh [create_header_grub2_config]
|
||||
|
||||
puts $fh "menuentry 'Genode on base-hw' {"
|
||||
puts $fh "menuentry [grub_menuentry] {"
|
||||
puts $fh " insmod multiboot2"
|
||||
puts $fh " multiboot2 /boot/bender $options_bender"
|
||||
puts $fh " module2 /boot/image-hw.elf.gz image-hw.elf"
|
||||
|
||||
@@ -2,6 +2,7 @@ proc binary_name_ld_lib_so { } { return "ld-linux.lib.so" }
|
||||
proc binary_name_core { } { return "core-linux" }
|
||||
proc binary_name_timer { } { return "linux_timer" }
|
||||
|
||||
proc grub_menuentry { } { return "'Genode on Linux'" }
|
||||
|
||||
##
|
||||
# Populate boot directory with binaries on Linux
|
||||
@@ -56,7 +57,7 @@ proc run_boot_dir {binaries} {
|
||||
|
||||
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 "menuentry [grub_menuentry] {"
|
||||
puts $fh " insmod linux"
|
||||
puts $fh " linux /vmlinuz console=ttyS0,115200 amd_iommu=off intel_iommu=off"
|
||||
puts $fh " initrd /initrd"
|
||||
|
||||
@@ -1,30 +1,4 @@
|
||||
#
|
||||
# Return Bender option that configures Bender's Intel HWP plugin
|
||||
#
|
||||
# \param --bender-intel-hwp-mode Run the Intel HWP plugin of Bender in the
|
||||
# given mode. Valid argument values are
|
||||
# "off",
|
||||
# "performance",
|
||||
# "balanced", and
|
||||
# "power_saving"
|
||||
# The argument value defaults to
|
||||
# "performance".
|
||||
#
|
||||
proc bender_intel_hwp_mode_option { } {
|
||||
|
||||
set opt [get_cmd_arg_first --bender-intel-hwp-mode "performance"]
|
||||
if {$opt == "off"} {
|
||||
return "intel_hwp_off"
|
||||
} elseif {$opt == "performance"} {
|
||||
return "intel_hwp_performance"
|
||||
} elseif {$opt == "balanced"} {
|
||||
return "intel_hwp_balanced"
|
||||
} elseif {$opt == "power_saving"} {
|
||||
return "intel_hwp_power_saving"
|
||||
} else {
|
||||
return "intel_hwp_performance"
|
||||
}
|
||||
}
|
||||
source [genode_dir]/tool/run/bender.inc
|
||||
|
||||
proc binary_name_ld_lib_so { } { return "ld-nova.lib.so" }
|
||||
proc binary_name_core_a { } { return "core-nova.a" }
|
||||
@@ -35,6 +9,8 @@ proc kernel_output { } { return "serial" }
|
||||
|
||||
proc boot_output { } { return "serial" }
|
||||
|
||||
proc grub_menuentry { } { return "'Genode on NOVA'" }
|
||||
|
||||
proc run_boot_string { } {
|
||||
return "\nHypervisor NOVA "
|
||||
}
|
||||
@@ -122,7 +98,7 @@ proc run_boot_dir {binaries} {
|
||||
#
|
||||
set fh [create_header_grub2_config]
|
||||
|
||||
puts $fh "menuentry 'Genode on NOVA' {"
|
||||
puts $fh "menuentry [grub_menuentry] {"
|
||||
puts $fh " insmod multiboot2"
|
||||
puts $fh " insmod gzio"
|
||||
puts $fh " multiboot2 /boot/bender $options_bender"
|
||||
|
||||
@@ -6,6 +6,8 @@ proc kernel_files { } { return okl4 }
|
||||
|
||||
proc boot_output { } { return "serial" }
|
||||
|
||||
proc grub_menuentry { } { return "'Genode on OKL4'" }
|
||||
|
||||
##
|
||||
# Get the base-okl4 repository
|
||||
#
|
||||
@@ -177,7 +179,7 @@ proc run_boot_dir {binaries} {
|
||||
# The core binary is part of the 'binaries' list but it must
|
||||
# appear right after 'sigma0' as boot module. Hence the special case.
|
||||
#
|
||||
puts $fh "menuentry 'Genode on OKL4' {"
|
||||
puts $fh "menuentry [grub_menuentry] {"
|
||||
puts $fh " insmod multiboot"
|
||||
puts $fh " multiboot /boot/bender [boot_output]"
|
||||
puts $fh " module /boot/image.elf"
|
||||
|
||||
@@ -9,6 +9,9 @@ proc core_link_address { } { return "0x02000000" }
|
||||
|
||||
proc boot_output { } { return "serial" }
|
||||
|
||||
proc grub_menuentry { } { return "'Genode on L4ka::Pistachio'" }
|
||||
|
||||
|
||||
##
|
||||
# Populdate boot directory with binaries on pistachio
|
||||
#
|
||||
@@ -64,7 +67,7 @@ proc run_boot_dir {binaries} {
|
||||
# The core binary is part of the 'binaries' list but it must
|
||||
# appear right after 'sigma0' as boot module. Hence the special case.
|
||||
#
|
||||
puts $fh "menuentry 'Genode on L4ka::Pistachio' {"
|
||||
puts $fh "menuentry [grub_menuentry] {"
|
||||
puts $fh " insmod multiboot"
|
||||
puts $fh " multiboot /boot/bender [boot_output]"
|
||||
puts $fh " module /boot/kickstart"
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
source [genode_dir]/tool/run/bender.inc
|
||||
|
||||
proc binary_name_ld_lib_so { } { return "ld-sel4.lib.so" }
|
||||
proc binary_name_core_a { } { return "core-sel4.a" }
|
||||
proc binary_name_timer { } {
|
||||
@@ -12,6 +14,8 @@ proc kernel_files { } { return sel4 }
|
||||
|
||||
proc boot_output { } { return "serial" }
|
||||
|
||||
proc grub_menuentry { } { return "'Genode on seL4'" }
|
||||
|
||||
proc run_boot_string { } { return "\nBooting all finished, dropped to user space" }
|
||||
proc core_link_address { } { return "0x02000000" }
|
||||
|
||||
@@ -55,7 +59,7 @@ proc run_boot_dir {binaries} {
|
||||
|
||||
exec mv [run_dir]/image.elf [run_dir]/boot/image.elf
|
||||
|
||||
set options_bender "[boot_output] phys_max=256M"
|
||||
set options_bender "[boot_output] [bender_intel_hwp_mode_option] phys_max=256M"
|
||||
|
||||
if {[have_include "image/iso"] || [have_include "image/disk"] || [have_include image/uefi]} {
|
||||
|
||||
@@ -69,7 +73,7 @@ proc run_boot_dir {binaries} {
|
||||
|
||||
if {[have_include image/uefi]} {
|
||||
install_uefi_bootloader_to_run_dir
|
||||
set options_bender " serial_fallback"
|
||||
append options_bender " serial_fallback"
|
||||
}
|
||||
|
||||
#
|
||||
@@ -77,7 +81,7 @@ proc run_boot_dir {binaries} {
|
||||
#
|
||||
set fh [create_header_grub2_config]
|
||||
|
||||
puts $fh "menuentry 'Genode on seL4' {"
|
||||
puts $fh "menuentry [grub_menuentry] {"
|
||||
puts $fh " insmod multiboot2"
|
||||
puts $fh " multiboot2 /boot/bender $options_bender"
|
||||
puts $fh " module2 /boot/sel4 sel4 disable_iommu"
|
||||
|
||||
@@ -233,7 +233,10 @@ proc _depot_auto_update { archives } {
|
||||
|
||||
puts "update depot: $cmd"
|
||||
|
||||
exec {*}$cmd >@ stdout 2>@ stderr
|
||||
if {[catch {exec {*}$cmd >@ stdout 2>@ stderr}]} {
|
||||
puts stderr "\nError: tool/depot/create during depot-auto-update failed\n"
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@ proc image_uboot_gzip_opt { } {
|
||||
# Build U-boot bootloader specific uImage
|
||||
#
|
||||
proc run_image { } {
|
||||
set dtc [installed_command dtc]
|
||||
|
||||
set elf_img [file join [run_dir] boot [kernel_specific_binary image.elf]]
|
||||
|
||||
@@ -67,8 +68,18 @@ proc run_image { } {
|
||||
if {[image_uboot_use_fit]} {
|
||||
# create image.itb
|
||||
set uboot_img [file join [run_dir] boot image.itb]
|
||||
|
||||
# create dummy dtb for version of u-boot requiring it in the fit image
|
||||
set fd [open [run_dir]/dummy.dts w]
|
||||
puts $fd "/dts-v1/;\n / {};"
|
||||
close $fd
|
||||
exec $dtc [run_dir]/dummy.dts -o [run_dir]/dummy.dtb
|
||||
|
||||
exec mkimage -f auto -A $arch -O linux -T kernel -C $compress_type -a $load_addr \
|
||||
-e $entrypoint -d $bin_img$bin_ext $uboot_img
|
||||
-e $entrypoint -b [run_dir]/dummy.dtb -d $bin_img$bin_ext $uboot_img
|
||||
|
||||
# cleanup dummy files
|
||||
file delete -force [run_dir]/dummy.dts [run_dir]/dummy.dtb
|
||||
} else {
|
||||
# create uImage
|
||||
set uboot_img [file join [run_dir] boot uImage]
|
||||
|
||||
@@ -3,5 +3,7 @@
|
||||
#
|
||||
proc load_spawn_id { } {
|
||||
global load_spawn_id
|
||||
return $load_spawn_id
|
||||
if {[info exists load_spawn_id]} {
|
||||
return $load_spawn_id }
|
||||
return -1
|
||||
}
|
||||
|
||||
@@ -34,8 +34,27 @@ proc run_load { } {
|
||||
set device [load_fastboot_device]
|
||||
set uimg [file join [run_dir] boot uImage]
|
||||
|
||||
# sleep a bit, board might need some time to come up
|
||||
sleep 8
|
||||
# show boot log up to the life sign of U-boot's fastboot driver
|
||||
puts stderr "Waiting for U-boot's fastboot driver message"
|
||||
spawn /bin/sh -c "[log_serial_cmd]"
|
||||
set timeout 60
|
||||
set boot_loader_failed false
|
||||
expect {
|
||||
-re {.*musb-hdrc.*\n} { }
|
||||
eof {
|
||||
puts stderr "Aborting, boot log received EOF"
|
||||
set boot_loader_failed true
|
||||
}
|
||||
timeout {
|
||||
puts stderr "Loading of boot loader timed out"
|
||||
set boot_loader_failed true
|
||||
}
|
||||
}
|
||||
close
|
||||
if {$boot_loader_failed} {
|
||||
return false }
|
||||
|
||||
puts stderr "U-boot fastboot driver is up"
|
||||
|
||||
set fastboot_cmd [list fastboot]
|
||||
if {$device != ""} {
|
||||
@@ -47,14 +66,14 @@ proc run_load { } {
|
||||
set load_spawn_id $spawn_id
|
||||
set timeout 80
|
||||
expect {
|
||||
"finished. total time:" { return true; }
|
||||
{[fF]inished. [tT]otal time:} { return true; }
|
||||
eof {
|
||||
puts stderr "fastboot command process died unexpectedly";
|
||||
return false;
|
||||
puts stderr "Fastboot command process died unexpectedly"
|
||||
return false
|
||||
}
|
||||
timeout {
|
||||
puts stderr "Loading timed out";
|
||||
return false;
|
||||
puts stderr "Loading timed out"
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,11 +44,11 @@ proc run_log { wait_for_re timeout_value } {
|
||||
return false
|
||||
}
|
||||
|
||||
set amt_tool [get_cmd_arg --amt-tool "wsman"]
|
||||
set amt_tool [get_cmd_arg --amt-tool "default"]
|
||||
|
||||
# Check that SOL is correctly configured if wsman is available
|
||||
if {![log_amt_skip_test]} {
|
||||
if {[have_installed wsman] && $amt_tool=="wsman" } {
|
||||
if {![log_amt_skip_test] && ( $amt_tool == "wsman" || $amt_tool == "default" )} {
|
||||
if {[have_installed wsman]} {
|
||||
puts "Test for working AMT SOL redirection service ..."
|
||||
set redir_state [exec wsman get http://intel.com/wbem/wscim/1/amt-schema/1/AMT_RedirectionService -h [log_amt_host] -P 16992 -u admin -p [log_amt_password]]
|
||||
set redir_state [regexp -inline {ListenerEnabled.*ListenerEnabled} $redir_state]
|
||||
@@ -62,21 +62,6 @@ proc run_log { wait_for_re timeout_value } {
|
||||
} else {
|
||||
puts " Warning: could not check AMT SOL redirection service because of missing wsman tool, --amt-tool==$amt_tool"
|
||||
}
|
||||
} else {
|
||||
puts "Skipping test for working AMT SOL redirection service"
|
||||
}
|
||||
|
||||
#
|
||||
# password via environment variable for amtterm will not show up in logs
|
||||
#
|
||||
set ::env(AMT_PASSWORD) [log_amt_password]
|
||||
|
||||
#
|
||||
# grab output
|
||||
#
|
||||
set amt_cmd "amtterm -u admin -v [log_amt_host]"
|
||||
if {[get_cmd_switch --log-amt-filter]} {
|
||||
set amt_cmd "$amt_cmd | [log_amt_filter]"
|
||||
}
|
||||
|
||||
if {$wait_for_re == "forever"} {
|
||||
@@ -86,7 +71,30 @@ proc run_log { wait_for_re timeout_value } {
|
||||
}
|
||||
set exit_result 1
|
||||
|
||||
lassign [retry 30 "/bin/sh -c \"$amt_cmd\"" ".*session authentication" 0.5] retry_output output_spawn_id
|
||||
#
|
||||
# prepare command
|
||||
#
|
||||
if {[have_installed meshcmd] && ( $amt_tool == "meshcmd" )} {
|
||||
set amt_cmd "meshcmd amtterm --host [log_amt_host] --password [log_amt_password]"
|
||||
set amt_log ".*Connected"
|
||||
} else {
|
||||
#
|
||||
# password via environment variable for amtterm will not show up in logs
|
||||
#
|
||||
set ::env(AMT_PASSWORD) [log_amt_password]
|
||||
|
||||
set amt_cmd "amtterm -u admin -v [log_amt_host]"
|
||||
set amt_log ".*session authentication"
|
||||
}
|
||||
|
||||
if {[get_cmd_switch --log-amt-filter]} {
|
||||
set amt_cmd "$amt_cmd | [log_amt_filter]"
|
||||
}
|
||||
|
||||
#
|
||||
# grab output
|
||||
#
|
||||
lassign [retry 30 "/bin/sh -c \"$amt_cmd\"" "$amt_log" 2] retry_output output_spawn_id
|
||||
|
||||
if {$retry_output == ""} {
|
||||
puts stderr "Aborting, AMT SOL not accessible"
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
source [genode_dir]/tool/run/log.inc
|
||||
|
||||
|
||||
set default_serial_cmd "picocom -b 115200 /dev/ttyUSB0"
|
||||
set default_serial_cmd "picocom --quiet -b 115200 /dev/ttyUSB0"
|
||||
|
||||
|
||||
proc log_serial_cmd { } {
|
||||
|
||||
@@ -102,6 +102,20 @@ proc amt_reset_wsman { } {
|
||||
}
|
||||
|
||||
|
||||
##
|
||||
# Reset via meshcmd
|
||||
# Executes a power on or power cycle depending on the current power state
|
||||
#
|
||||
proc amt_reset_meshcmd { } {
|
||||
set power_state [exec meshcmd amtpower --reset --host [power_on_amt_host] --password [power_on_amt_password]]
|
||||
if { $power_state == "Current power state: Soft off" } {
|
||||
exec meshcmd amtpower --powercycle --host [power_on_amt_host] --password [power_on_amt_password]
|
||||
} else {
|
||||
exec meshcmd amtpower --poweron --host [power_on_amt_host] --password [power_on_amt_password]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
##
|
||||
# Reset the test machine using Intel's AMT
|
||||
#
|
||||
@@ -111,7 +125,7 @@ proc run_power_on { } {
|
||||
}
|
||||
|
||||
#
|
||||
# amttool and wsman are supported for reset
|
||||
# amttool, wsman and meshcmd are supported for reset
|
||||
#
|
||||
set amt_tool [get_cmd_arg --amt-tool "default"]
|
||||
|
||||
@@ -121,14 +135,14 @@ proc run_power_on { } {
|
||||
if {[have_installed wsman] &&
|
||||
( $amt_tool == "wsman" || $amt_tool == "default") } {
|
||||
amt_reset_wsman
|
||||
} elseif {[have_installed meshcmd] && ( $amt_tool == "meshcmd" )} {
|
||||
amt_reset_meshcmd
|
||||
} elseif {[have_installed amttool] &&
|
||||
( $amt_tool == "amttool" || $amt_tool == "default") } {
|
||||
amt_reset_soap_eoi
|
||||
} else {
|
||||
if {[have_installed amttool] &&
|
||||
($amt_tool == "amttool" || $amt_tool == "default") } {
|
||||
amt_reset_soap_eoi
|
||||
} else {
|
||||
puts stderr "specified tool \"$amt_tool\" for using Intel AMT is unknown or is not installed"
|
||||
exit -1
|
||||
}
|
||||
puts stderr "specified tool \"$amt_tool\" for using Intel AMT is unknown or is not installed"
|
||||
exit -1
|
||||
}
|
||||
|
||||
puts "wait [power_on_amt_timeout] seconds for power on"
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
prefix=!SDK_DIR!
|
||||
lddir=${prefix}/ld
|
||||
libdir=${prefix}/lib
|
||||
toolchaindir=!TOOLCHAIN_DIR!
|
||||
cc=${toolchaindir}/bin/genode-x86-gcc
|
||||
cxx=${toolchaindir}/bin/genode-x86-g++
|
||||
ld=${toolchaindir}/bin/genode-x86-ld
|
||||
ar=${toolchaindir}/bin/genode-x86-ar
|
||||
ranlib=${toolchaindir}/bin/genode-x86-ranlib
|
||||
|
||||
Name: genode-base
|
||||
Description: Genode base compiler definitions
|
||||
URL: https://genode.org/
|
||||
Version: !VERSION!
|
||||
Cflags: -nostdinc -fPIC -I${prefix}/include/genode -I${toolchaindir}/lib/gcc/x86_64-pc-elf/6.3.0/include
|
||||
@@ -1,11 +0,0 @@
|
||||
prefix=!SDK_DIR!
|
||||
lddir=${prefix}/ld
|
||||
libdir=${prefix}/lib
|
||||
toolchaindir=!TOOLCHAIN_DIR!
|
||||
|
||||
Name: genode-lib
|
||||
Description: Flags for linking Genode libraries
|
||||
URL: https://genode.org/
|
||||
Version: !VERSION!
|
||||
Requires: genode-base
|
||||
Libs: -shared --eh-frame-hdr -melf_x86_64 -gc-sections -z max-page-size=0x1000 -T ${lddir}/genode_rel.ld --entry=0x0 ${libdir}/ldso-startup.lib.a ${toolchaindir}/lib/gcc/x86_64-pc-elf/6.3.0/64/libgcc.a
|
||||
@@ -1,11 +0,0 @@
|
||||
prefix=!SDK_DIR!
|
||||
includedir=${prefix}/include/libc
|
||||
libdir=${prefix}/lib
|
||||
|
||||
Name: genode-libc
|
||||
Description: Genode C runtime library
|
||||
URL: https://genode.org/
|
||||
Version: !VERSION!
|
||||
Requires: genode-base genode-vfs
|
||||
Cflags: -D__FreeBSD__=8 -D__ISO_C_VISIBLE=1999 -fno-builtin-sin -fno-builtin-cos -fno-builtin-sinf -fno-builtin-cosf -I${includedir} -I${includedir}/libc -I${includedir}/libc/libc -I${includedir}/libc-genode
|
||||
Libs: ${libdir}/libc.lib.so ${libdir}/libm.lib.so
|
||||
@@ -1,10 +0,0 @@
|
||||
prefix=!SDK_DIR!
|
||||
includedir=${prefix}/include/libc
|
||||
libdir=${prefix}/lib
|
||||
|
||||
Name: genode-posix
|
||||
Description: Genode POSIX entrypoint library
|
||||
URL: https://genode.org/
|
||||
Version: !VERSION!
|
||||
Requires: genode-libc
|
||||
Libs: ${libdir}/posix.lib.so
|
||||
@@ -1,11 +0,0 @@
|
||||
prefix=!SDK_DIR!
|
||||
lddir=${prefix}/ld
|
||||
libdir=${prefix}/lib
|
||||
toolchaindir=!TOOLCHAIN_DIR!
|
||||
ld=${toolchaindir}/bin/genode-x86-ld
|
||||
|
||||
Name: genode-prg
|
||||
Description: Flags for dynamically-linked Genode programs
|
||||
URL: https://genode.org/
|
||||
Version: !VERSION!
|
||||
Libs: -melf_x86_64 -gc-sections -z max-page-size=0x1000 --dynamic-list=${lddir}/genode_dyn.dl -nostdlib -Ttext=0x01000000 --dynamic-linker=ld.lib.so --eh-frame-hdr -rpath-link=. -T ${lddir}/genode_dyn.ld ${libdir}/ld.lib.so ${toolchaindir}/lib/gcc/x86_64-pc-elf/6.3.0/64/libgcc.a
|
||||
@@ -1,11 +0,0 @@
|
||||
prefix=!SDK_DIR!
|
||||
lddir=${prefix}/ld
|
||||
libdir=${prefix}/lib
|
||||
toolchaindir=!TOOLCHAIN_DIR!
|
||||
ld=${toolchaindir}/bin/genode-x86-ld
|
||||
|
||||
Name: genode-prg
|
||||
Description: Flags for dynamically-linked Genode programs
|
||||
URL: https://genode.org/
|
||||
Version: !VERSION!
|
||||
Libs: -melf_x86_64 -gc-sections -z max-page-size=0x1000 --dynamic-list=${lddir}/genode_dyn.dl -nostdlib -Ttext=0x01000000 --dynamic-linker=ld.lib.so --eh-frame-hdr -rpath-link=. -T ${lddir}/genode_dyn.ld ${libdir}/ld.lib.so ${toolchaindir}/lib/gcc/x86_64-pc-elf/6.3.0/64/libgcc.a
|
||||
@@ -1,11 +0,0 @@
|
||||
prefix=!SDK_DIR!
|
||||
includedir=${prefix}/include/stdcxx/stdcxx
|
||||
libdir=${prefix}/lib
|
||||
|
||||
Name: genode-stdcxx
|
||||
Description: Genode Standard C++ library
|
||||
URL: https://genode.org/
|
||||
Version: !VERSION!
|
||||
Requires: genode-libc
|
||||
Cflags: -D_GLIBCXX_HAVE_MBSTATE_T -D_GLIBCXX_ATOMIC_BUILTINS_4 -I${includedir} -I${includedir}/std -I${includedir}/c_global
|
||||
Libs: ${libdir}/stdcxx.lib.so
|
||||
@@ -1,9 +0,0 @@
|
||||
prefix=!SDK_DIR!
|
||||
libdir=${prefix}/lib
|
||||
|
||||
Name: genode-vfs
|
||||
Description: Genode Virtual File-System library
|
||||
URL: https://genode.org/
|
||||
Version: !VERSION!
|
||||
Requires: genode-base
|
||||
Libs: ${libdir}/vfs.lib.so
|
||||
Reference in New Issue
Block a user