2014-01-17 15:04:04 +00:00
|
|
|
#
|
|
|
|
# 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
|
|
|
|
}
|
|
|
|
|
2018-04-11 12:14:20 +00:00
|
|
|
create_boot_directory
|
2015-06-08 07:05:32 +00:00
|
|
|
|
2019-02-19 13:24:52 +00:00
|
|
|
import_from_depot [depot_user]/src/[base_src] \
|
|
|
|
[depot_user]/pkg/[drivers_interactive_pkg] \
|
|
|
|
[depot_user]/pkg/terminal \
|
|
|
|
[depot_user]/src/init \
|
|
|
|
[depot_user]/src/libc \
|
|
|
|
[depot_user]/src/noux \
|
|
|
|
[depot_user]/src/posix \
|
|
|
|
[depot_user]/src/ncurses \
|
|
|
|
[depot_user]/src/vim \
|
|
|
|
[depot_user]/src/bash \
|
|
|
|
[depot_user]/src/grep \
|
|
|
|
[depot_user]/src/coreutils \
|
|
|
|
[depot_user]/src/ram_fs
|
2014-01-17 15:04:04 +00:00
|
|
|
|
2017-05-14 20:00:40 +00:00
|
|
|
|
2014-01-17 15:04:04 +00:00
|
|
|
# write default vimrc file
|
2017-05-14 20:00:40 +00:00
|
|
|
set vimrc_fd [open "bin/vimrc" w]
|
2014-01-17 15:04:04 +00:00
|
|
|
puts $vimrc_fd {
|
|
|
|
set noloadplugins
|
|
|
|
set hls
|
|
|
|
set nocompatible
|
|
|
|
set laststatus=2
|
|
|
|
set noswapfile
|
|
|
|
set viminfo=}
|
|
|
|
close $vimrc_fd
|
|
|
|
|
2018-04-11 12:14:20 +00:00
|
|
|
install_config {
|
2014-01-17 15:04:04 +00:00
|
|
|
<config verbose="yes">
|
|
|
|
<parent-provides>
|
|
|
|
<service name="ROM"/>
|
|
|
|
<service name="LOG"/>
|
|
|
|
<service name="RM"/>
|
|
|
|
<service name="CPU"/>
|
|
|
|
<service name="PD"/>
|
|
|
|
<service name="IRQ"/>
|
|
|
|
<service name="IO_PORT"/>
|
|
|
|
<service name="IO_MEM"/>
|
|
|
|
<service name="TRACE"/>
|
|
|
|
</parent-provides>
|
2018-04-11 12:14:20 +00:00
|
|
|
|
2014-01-17 15:04:04 +00:00
|
|
|
<default-route>
|
2015-09-17 12:15:28 +00:00
|
|
|
<any-service> <parent/> <any-child/> </any-service>
|
2014-01-17 15:04:04 +00:00
|
|
|
</default-route>
|
2018-04-11 12:14:20 +00:00
|
|
|
|
2017-05-07 20:36:11 +00:00
|
|
|
<default caps="100"/>
|
2018-04-11 12:14:20 +00:00
|
|
|
|
2014-01-17 15:04:04 +00:00
|
|
|
<start name="timer">
|
|
|
|
<resource name="RAM" quantum="1M"/>
|
|
|
|
<provides><service name="Timer"/></provides>
|
2018-04-11 12:14:20 +00:00
|
|
|
</start>
|
2014-01-17 15:04:04 +00:00
|
|
|
|
2018-04-11 12:14:20 +00:00
|
|
|
<start name="drivers" caps="1000">
|
|
|
|
<resource name="RAM" quantum="32M" constrain_phys="yes"/>
|
|
|
|
<binary name="init"/>
|
|
|
|
<route>
|
|
|
|
<service name="ROM" label="config"> <parent label="drivers.config"/> </service>
|
|
|
|
<service name="Timer"> <child name="timer"/> </service>
|
|
|
|
<any-service> <parent/> </any-service>
|
|
|
|
</route>
|
2014-01-17 15:04:04 +00:00
|
|
|
<provides>
|
2018-04-11 12:14:20 +00:00
|
|
|
<service name="Input"/> <service name="Framebuffer"/>
|
2014-01-17 15:04:04 +00:00
|
|
|
</provides>
|
2018-04-11 12:14:20 +00:00
|
|
|
</start>
|
2014-01-17 15:04:04 +00:00
|
|
|
|
|
|
|
<start name="terminal">
|
|
|
|
<resource name="RAM" quantum="2M"/>
|
|
|
|
<provides><service name="Terminal"/></provides>
|
2018-04-11 12:14:20 +00:00
|
|
|
<route>
|
|
|
|
<service name="ROM" label="config"> <parent label="terminal.config"/> </service>
|
|
|
|
<any-service> <parent/> <any-child/> </any-service>
|
|
|
|
</route>
|
2014-01-17 15:04:04 +00:00
|
|
|
</start>
|
2018-04-11 12:14:20 +00:00
|
|
|
|
|
|
|
<start name="trace_fs" caps="200">
|
2014-01-17 15:04:04 +00:00
|
|
|
<resource name="RAM" quantum="128M"/>
|
|
|
|
<provides><service name="File_system"/></provides>
|
|
|
|
<config>
|
2018-04-11 12:14:20 +00:00
|
|
|
<policy label="noux -> trace" root="/" interval="1000"
|
|
|
|
subject_limit="512" trace_quota="64M" parent_levels="0" />
|
2014-01-17 15:04:04 +00:00
|
|
|
</config>
|
|
|
|
</start>
|
2018-04-11 12:14:20 +00:00
|
|
|
|
2014-01-17 15:04:04 +00:00
|
|
|
<start name="ram_fs">
|
|
|
|
<resource name="RAM" quantum="32M"/>
|
|
|
|
<provides><service name="File_system"/></provides>
|
|
|
|
<config>
|
|
|
|
<content>
|
|
|
|
<dir name="home">
|
|
|
|
<inline name=".bash_profile">
|
|
|
|
</inline>
|
|
|
|
</dir>
|
|
|
|
<dir name="tmp">
|
|
|
|
<dir name="policies">
|
|
|
|
<rom name="rpc_name" />
|
|
|
|
</dir>
|
|
|
|
</dir>
|
|
|
|
</content>
|
|
|
|
<!-- constrain sessions according to their labels -->
|
|
|
|
<policy label="noux -> root" root="/" />
|
|
|
|
<policy label="noux -> home" root="/home" writeable="yes" />
|
|
|
|
<policy label="noux -> tmp" root="/tmp" writeable="yes" />
|
|
|
|
</config>
|
|
|
|
</start>
|
2018-04-11 12:14:20 +00:00
|
|
|
|
|
|
|
<start name="noux" caps="2000">
|
2014-01-17 15:04:04 +00:00
|
|
|
<resource name="RAM" quantum="256M" />
|
|
|
|
<config>
|
2018-04-11 12:14:20 +00:00
|
|
|
<fstab>
|
|
|
|
<tar name="coreutils.tar" />
|
|
|
|
<tar name="vim.tar" />
|
|
|
|
<tar name="bash.tar" />
|
|
|
|
<tar name="grep.tar" />
|
|
|
|
|
2015-11-18 11:17:32 +00:00
|
|
|
<dir name="home"> <fs label="home" /> </dir>
|
|
|
|
<dir name="ram"> <fs label="root" /> </dir>
|
|
|
|
<dir name="tmp"> <fs label="tmp" /> </dir>
|
2014-01-17 15:04:04 +00:00
|
|
|
<dir name="trace"> <fs label="trace" /> </dir>
|
|
|
|
|
2018-04-11 12:14:20 +00:00
|
|
|
<dir name="dev"> <null /> <zero /> </dir>
|
2017-05-14 20:00:40 +00:00
|
|
|
|
|
|
|
<dir name="share"> <dir name="vim"> <rom name="vimrc"/> </dir> </dir>
|
2014-01-17 15:04:04 +00:00
|
|
|
</fstab>
|
|
|
|
<start name="/bin/bash">
|
2018-04-03 14:46:04 +00:00
|
|
|
<env name="TERM" value="screen" />
|
2014-01-17 15:04:04 +00:00
|
|
|
<env name="HOME" value="/home" />
|
2018-04-11 12:14:20 +00:00
|
|
|
<!-- <arg value="-login" /> -->
|
2014-01-17 15:04:04 +00:00
|
|
|
</start>
|
|
|
|
</config>
|
|
|
|
<route>
|
2017-01-18 16:10:07 +00:00
|
|
|
<service name="File_system" label="home">
|
|
|
|
<child name="ram_fs" /> </service>
|
|
|
|
<service name="File_system" label="root">
|
|
|
|
<child name="ram_fs" /> </service>
|
|
|
|
<service name="File_system" label="tmp">
|
|
|
|
<child name="ram_fs" /> </service>
|
|
|
|
<service name="File_system" label="trace">
|
|
|
|
<child name="trace_fs"/> </service>
|
2014-01-17 15:04:04 +00:00
|
|
|
<any-service> <parent /> <any-child /> </any-service>
|
|
|
|
</route>
|
|
|
|
</start>
|
|
|
|
</config>}
|
|
|
|
|
2018-04-11 12:14:20 +00:00
|
|
|
build { server/trace_fs lib/trace/policy/rpc_name }
|
2014-01-17 15:04:04 +00:00
|
|
|
|
2018-04-11 12:14:20 +00:00
|
|
|
build_boot_image { vimrc trace_fs rpc_name }
|
2014-01-17 15:04:04 +00:00
|
|
|
|
|
|
|
run_genode_until forever
|
|
|
|
|
|
|
|
# vi: set ft=tcl :
|