# # Configuration variables for the platform-specific run scripts: # $platform - name of the platform passed to the 'create_builddir' script # set verbose_mode "no" # # The Linux version of Noux lacks the support for the fork system call. Hence, # the run script is expected to fail. # if {[have_spec linux]} { puts "Linux is unsupported." exit 0 } if {[get_cmd_switch --autopilot] && [have_include "power_on/qemu"]} { puts "\nRunning tool-chain auto test in autopilot on Qemu is not recommended." exit 0 } if {[have_spec pistachio] || [have_spec sel4] || [expr [have_spec foc] && [have_spec imx7d_sabre]] } { puts "Platform is unsupported." exit 0 } set use_usb_input [expr ![have_spec ps2] && ![have_spec sdl] && [have_spec usb]] create_boot_directory set build_components { core init timer noux lib/libc_noux server/log_terminal server/ram_fs test/libports/ncurses } # # Disable syntax check for config file # # The syntax check fails because the content of the '.bash_profile' is # specified using an '' node but it is no valid XML. I.e., xmllint # complains about the sequence '&&'. # proc check_xml_with_schema {xml_file} { } source ${genode_dir}/repos/base/run/platform_drv.inc append_platform_drv_build_components lappend_if $use_usb_input build_components drivers/usb set cc_march "" set tool_chain_timeout 600 if {[have_spec arm]} { set binutils "binutils_arm" set gcc "gcc_arm" set tool_prefix "genode-arm-" set noux_boot_timeout 350 if {[have_spec panda]} { set platform "panda" } if {[have_spec arndale]} { set platform "arndale" } if {[have_spec pbxa9]} { set platform "pbxa9" } if {[have_spec imx6q_sabrelite]} { set platform "imx6q_sabrelite" } if {[have_spec imx7d_sabre]} { set platform "imx7d_sabre" } if {![info exists platform]} { puts "\n Run script is not supported on this platform. \n" exit 0 } } if {[have_spec arm_64]} { set binutils "binutils_arm_64" set gcc "gcc_arm_64" set tool_prefix "genode-aarch64-" set noux_boot_timeout 350 set platform "arm_v8a" } if {[have_spec x86]} { set binutils "binutils_x86" set gcc "gcc_x86" set tool_prefix "genode-x86-" set noux_boot_timeout 100 set platform "x86_64" } # # Build Noux packages only once # set noux_pkgs "bash coreutils vim grep sed findutils make which $binutils $gcc tclsh" foreach pkg $noux_pkgs { lappend_if [expr ![file exists bin/$pkg]] build_components noux-pkg/$pkg } build $build_components # write default vimrc file set vimrc_fd [open "bin/vimrc" w] puts $vimrc_fd { set noloadplugins set hls set nocompatible set laststatus=2 set noswapfile set viminfo=} close $vimrc_fd # write default .bash_profile file set bash_profile_fd [open bin/bash_profile w] puts $bash_profile_fd { cp /bin/make /usr/bin/ cp /bin/echo /usr/bin/ cp /bin/mkdir /usr/bin/ cp /bin/tclsh /usr/bin/ echo 'creating build directory...' mkdir -p "/home/build" cp -r /genode/depot /home/build } puts $bash_profile_fd "/genode/tool/depot/create DEPOT_DIR=/home/build/depot \ test/bin/$platform/zlib CROSS_DEV_PREFIX=$tool_prefix && exit 234" close $bash_profile_fd exec mkdir -p [depot_dir]/test exec $genode_dir/tool/depot/create DEPOT_DIR=[depot_dir] test/src/zlib exec tar cvf bin/genode.tar -C $genode_dir tool repos/base \ repos/libports/recipes/src/zlib \ repos/libports/recipes/api exec tar rvf bin/genode.tar -C [depot_dir]/.. [file tail [depot_dir]]/test exec rm -rf [depot_dir]/test append config { } append config { } if {![info exists verbose_mode]} {set verbose_mode "yes"} append config " " append config { } foreach pkg $noux_pkgs { append config " " } append config { } append config " " append config { } install_config $config # # Boot modules # # generic modules set boot_modules { core init timer ld.lib.so noux log_terminal ram_fs libc.lib.so vfs.lib.so libm.lib.so libc_noux.lib.so ncurses.lib.so stdcxx.lib.so pcre.lib.so posix.lib.so vimrc bash_profile } append boot_modules { gmp.lib.so mpfr.lib.so mpc.lib.so } foreach pkg $noux_pkgs { lappend boot_modules "$pkg.tar" } append boot_modules { genode.tar } build_boot_image $boot_modules append qemu_args " -nographic -m 768 " # wait until Noux started run_genode_until {\[init -\> noux\].*--- noux started ---} $noux_boot_timeout set serial_id [output_spawn_id] # start the measurement set time_start [ clock seconds ] run_genode_until {child /bin/bash exited with exit value 234} $tool_chain_timeout $serial_id set time_end [ clock seconds ] # cleanup created tars exec rm -f bin/genode.tar # print infos about run set git_info "unknown" catch { set git_info [exec git --git-dir=$genode_dir/.git describe ] } puts "Testing \" [ clock format $time_start -format "%Y-%m-%d %H:%M:%S"], commit: ($git_info)\" in : " puts "Testing \"all\" in printf.wv:" puts "! PERF: runtime [expr $time_end - $time_start ] seconds ok" puts "Test succeeded" # vi: set ft=tcl :