Port of OpenTyrian
https://bitbucket.org/opentyrian/opentyrian Fixes #4
This commit is contained in:
committed by
Norman Feske
parent
2309044145
commit
cb1072ea52
1
ports/opentyrian.hash
Normal file
1
ports/opentyrian.hash
Normal file
@@ -0,0 +1 @@
|
||||
71f3e52225e3e98a48983ac6683b1a8a40f5633f
|
||||
11
ports/opentyrian.port
Normal file
11
ports/opentyrian.port
Normal file
@@ -0,0 +1,11 @@
|
||||
LICENSE := GPLv2
|
||||
VERSION := 2.1.20130907
|
||||
DOWNLOADS := opentyrian.archive tyrian.archive
|
||||
|
||||
URL(opentyrian) := http://www.camanis.net/opentyrian/releases/opentyrian-$(VERSION)-src.tar.gz
|
||||
SHA(opentyrian) := c5b97aea3931db6889acb639e59e619162b05183
|
||||
DIR(opentyrian) := src/app/opentyrian
|
||||
|
||||
URL(tyrian) := http://camanis.net/tyrian/tyrian21.zip
|
||||
SHA(tyrian) := 29827de99c92cdba7ac8d8b1307776c8f473cd44
|
||||
DIR(tyrian) := src/app/opentyrian
|
||||
184
run/tyrian.run
Normal file
184
run/tyrian.run
Normal file
@@ -0,0 +1,184 @@
|
||||
#
|
||||
# OpenTyrian crashes without the proper framebuferr resolution,
|
||||
# so run it in nit_fb.
|
||||
#
|
||||
|
||||
#
|
||||
# Build
|
||||
#
|
||||
|
||||
set build_components {
|
||||
core init
|
||||
drivers/audio
|
||||
drivers/framebuffer
|
||||
drivers/input
|
||||
drivers/input/dummy
|
||||
drivers/timer
|
||||
server/nit_fb
|
||||
server/nitpicker
|
||||
app/opentyrian
|
||||
}
|
||||
|
||||
source ${genode_dir}/repos/base/run/platform_drv.inc
|
||||
# override default platform driver policy
|
||||
proc platform_drv_policy {} {
|
||||
return {
|
||||
<policy label="ps2_drv"> <device name="PS2"/> </policy>
|
||||
<policy label="usb_drv"> <pci class="USB"/> </policy>
|
||||
<policy label="fb_drv"> <pci class="VGA"/> </policy>
|
||||
<policy label="audio_drv"> <pci class="AUDIO"/> <pci class="HDAUDIO"/> </policy>}
|
||||
}
|
||||
|
||||
append_platform_drv_build_components
|
||||
|
||||
build $build_components
|
||||
|
||||
create_boot_directory
|
||||
|
||||
#
|
||||
# Generate config
|
||||
#
|
||||
|
||||
append config {
|
||||
<config>
|
||||
<parent-provides>
|
||||
<service name="CAP"/>
|
||||
<service name="CPU"/>
|
||||
<service name="IO_MEM"/>
|
||||
<service name="IO_PORT"/>
|
||||
<service name="IRQ"/>
|
||||
<service name="LOG"/>
|
||||
<service name="PD"/>
|
||||
<service name="RAM"/>
|
||||
<service name="RM"/>
|
||||
<service name="ROM"/>
|
||||
<service name="SIGNAL"/>
|
||||
</parent-provides>
|
||||
<default-route>
|
||||
<any-service> <parent/> <any-child/> </any-service>
|
||||
</default-route>}
|
||||
|
||||
append_platform_drv_config
|
||||
|
||||
append_if [have_spec vesa] config {
|
||||
<start name="fb_drv">
|
||||
<resource name="RAM" quantum="4M"/>
|
||||
<provides><service name="Framebuffer"/></provides>
|
||||
</start>}
|
||||
|
||||
append_if [have_spec pl11x] config {
|
||||
<start name="fb_drv">
|
||||
<resource name="RAM" quantum="2M"/>
|
||||
<provides><service name="Framebuffer"/></provides>
|
||||
</start>}
|
||||
|
||||
append_if [have_spec ps2] config {
|
||||
<start name="ps2_drv">
|
||||
<resource name="RAM" quantum="1M"/>
|
||||
<provides><service name="Input"/></provides>
|
||||
</start>}
|
||||
|
||||
append config {
|
||||
<start name="timer">
|
||||
<resource name="RAM" quantum="1M"/>
|
||||
<provides><service name="Timer"/></provides>
|
||||
</start>
|
||||
<start name="audio_drv">
|
||||
<resource name="RAM" quantum="6M"/>
|
||||
<provides><service name="Audio_out"/></provides>
|
||||
</start>
|
||||
|
||||
<start name="dummy_input_drv">
|
||||
<resource name="RAM" quantum="1M"/>
|
||||
<provides><service name="Input"/></provides>
|
||||
</start>
|
||||
|
||||
<start name="nitpicker">
|
||||
<resource name="RAM" quantum="1M"/>
|
||||
<provides><service name="Nitpicker"/></provides>
|
||||
<route>
|
||||
<any-service>
|
||||
<child name="fb_drv"/>
|
||||
<child name="dummy_input_drv"/>
|
||||
<parent/> <any-child/>
|
||||
</any-service>
|
||||
</route>
|
||||
<config>
|
||||
<domain name="default" layer="1" content="client" label="no" />
|
||||
<policy domain="default"/>
|
||||
</config>
|
||||
</start>
|
||||
|
||||
<start name="nit_fb" priority="-1">
|
||||
<resource name="RAM" quantum="8M" />
|
||||
<provides>
|
||||
<service name="Framebuffer" />
|
||||
<service name="Input" />
|
||||
</provides>
|
||||
<config width="640" height="400" />
|
||||
</start>
|
||||
|
||||
<start name="opentyrian">
|
||||
<exit propagate="yes"/>
|
||||
<resource name="RAM" quantum="128M"/>
|
||||
<route>
|
||||
<service name="Framebuffer">
|
||||
<child name="nit_fb"/>
|
||||
</service>
|
||||
<any-service>
|
||||
<child name="ps2_drv"/>
|
||||
<parent/> <any-child/>
|
||||
</any-service>
|
||||
</route>
|
||||
<config>
|
||||
<sdl_audio_volume value="100"/>
|
||||
<libc stdout="/dev/log" stderr="/dev/log">
|
||||
<vfs>
|
||||
<tar name="tyrian.tar"/>
|
||||
<ram/>
|
||||
<dir name="dev"> <log/> </dir>
|
||||
</vfs>
|
||||
</libc>
|
||||
</config>
|
||||
</start>
|
||||
</config>}
|
||||
|
||||
install_config $config
|
||||
|
||||
#
|
||||
# Boot modules
|
||||
#
|
||||
|
||||
file copy -force app/opentyrian/tyrian.tar bin
|
||||
|
||||
# generic modules
|
||||
set boot_modules {
|
||||
core init
|
||||
audio_drv
|
||||
dummy_input_drv
|
||||
ld.lib.so
|
||||
libc.lib.so
|
||||
libm.lib.so
|
||||
libpng.lib.so
|
||||
nitpicker
|
||||
nit_fb
|
||||
pthread.lib.so
|
||||
sdl.lib.so
|
||||
sdl_net.lib.so
|
||||
stdcxx.lib.so
|
||||
timer
|
||||
opentyrian tyrian.tar
|
||||
}
|
||||
|
||||
# platform-specific modules
|
||||
lappend_if [have_spec vesa] boot_modules fb_drv
|
||||
lappend_if [have_spec ps2] boot_modules ps2_drv
|
||||
lappend_if [have_spec pl11x] boot_modules fb_drv
|
||||
|
||||
append_platform_drv_boot_modules
|
||||
|
||||
build_boot_image $boot_modules
|
||||
|
||||
append qemu_args " -m 256 -soundhw es1370 "
|
||||
|
||||
run_genode_until forever
|
||||
21
src/app/opentyrian/target.mk
Normal file
21
src/app/opentyrian/target.mk
Normal file
@@ -0,0 +1,21 @@
|
||||
TARGET := opentyrian
|
||||
|
||||
OPENTYRIAN_DIR := $(call select_from_ports,opentyrian)/src/app/opentyrian
|
||||
OPENTYRIAN_SRC := $(OPENTYRIAN_DIR)/src
|
||||
|
||||
SRC_C := $(notdir $(wildcard $(OPENTYRIAN_SRC)/*.c))
|
||||
|
||||
vpath %.c $(OPENTYRIAN_SRC)
|
||||
|
||||
LIBS += libc libm sdl sdl_net
|
||||
|
||||
CC_OPT += -std=c99 -DTARGET_UNIX
|
||||
|
||||
CC_WARN += -Wno-implicit-function-declaration
|
||||
|
||||
.PHONY: tyrian.tar
|
||||
|
||||
$(TARGET): tyrian.tar
|
||||
|
||||
tyrian.tar:
|
||||
$(VERBOSE) tar cf $@ -C $(OPENTYRIAN_DIR)/tyrian21 .
|
||||
Reference in New Issue
Block a user