# # 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 } # # On OMAP4 where no PS/2 is available, we rely on USB HID # proc use_usb_input { } { return [expr ![have_spec ps2] && [have_spec usb]] } # # Uncomment the following line when working on the VIM source code. Otherwise, # the package may get recompiled, yet it does not get reinstalled into 'bin/'. # #exec rm -rf noux-pkg/bash bin/bash set build_components { core init drivers/timer noux/minimal lib/libc_noux drivers/framebuffer drivers/input server/terminal server/ram_fs server/trace_fs test/libports/ncurses lib/trace/policy/rpc_name } lappend_if [use_usb_input] build_components drivers/usb lappend_if [have_spec gpio] build_components drivers/gpio set noux_pkgs "bash coreutils grep vim" # # Build Noux packages only once # foreach pkg $noux_pkgs { lappend_if [expr ![file exists bin/$pkg]] build_components noux-pkg/$pkg } source ${genode_dir}/repos/base/run/platform_drv.inc append_platform_drv_build_components build $build_components # write default vimrc file set vimrc_fd [open "bin/vim/share/vim/vimrc" w] puts $vimrc_fd { set noloadplugins set hls set nocompatible set laststatus=2 set noswapfile set viminfo=} close $vimrc_fd # strip all binaries prior archiving foreach pkg $noux_pkgs { exec sh -c "find bin/$pkg -type f | (xargs [cross_dev_prefix]strip || true) 2>/dev/null" exec tar cfv bin/$pkg.tar -h -C bin/$pkg . } create_boot_directory append config { } append_if [have_spec sdl] config { } append_platform_drv_config append_if [have_spec framebuffer] config { } append_if [have_spec ps2] config { } append_if [have_spec gpio] config { } append_if [use_usb_input] config { } append config { } foreach pkg $noux_pkgs { append config " " } append config { } install_config $config # # Boot modules # # generic modules set boot_modules { core init timer ld.lib.so noux terminal ram_fs libc.lib.so libm.lib.so libc_noux.lib.so ncurses.lib.so pcre.lib.so zlib.lib.so readline.lib.so trace_fs rpc_name } foreach pkg $noux_pkgs { append boot_modules " $pkg.tar " } # platform-specific modules lappend_if [have_spec linux] boot_modules fb_sdl lappend_if [have_spec ps2] boot_modules ps2_drv lappend_if [have_spec framebuffer] boot_modules fb_drv lappend_if [use_usb_input ] boot_modules usb_drv lappend_if [have_spec gpio] boot_modules gpio_drv append_platform_drv_boot_modules build_boot_image $boot_modules append qemu_args " -m 512 " run_genode_until forever # vi: set ft=tcl :