From cb1072ea5212e1816ddbea6ccb978635d68f7664 Mon Sep 17 00:00:00 2001 From: Emery Hemingway Date: Sun, 1 Nov 2015 00:00:51 +0100 Subject: [PATCH] Port of OpenTyrian https://bitbucket.org/opentyrian/opentyrian Fixes #4 --- ports/opentyrian.hash | 1 + ports/opentyrian.port | 11 +++ run/tyrian.run | 184 +++++++++++++++++++++++++++++++++++ src/app/opentyrian/target.mk | 21 ++++ 4 files changed, 217 insertions(+) create mode 100644 ports/opentyrian.hash create mode 100644 ports/opentyrian.port create mode 100644 run/tyrian.run create mode 100644 src/app/opentyrian/target.mk diff --git a/ports/opentyrian.hash b/ports/opentyrian.hash new file mode 100644 index 0000000..6370f69 --- /dev/null +++ b/ports/opentyrian.hash @@ -0,0 +1 @@ +71f3e52225e3e98a48983ac6683b1a8a40f5633f diff --git a/ports/opentyrian.port b/ports/opentyrian.port new file mode 100644 index 0000000..d951ecb --- /dev/null +++ b/ports/opentyrian.port @@ -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 \ No newline at end of file diff --git a/run/tyrian.run b/run/tyrian.run new file mode 100644 index 0000000..301508d --- /dev/null +++ b/run/tyrian.run @@ -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 { + + + + } +} + +append_platform_drv_build_components + +build $build_components + +create_boot_directory + +# +# Generate config +# + +append config { + + + + + + + + + + + + + + + + + } + +append_platform_drv_config + +append_if [have_spec vesa] config { + + + + } + +append_if [have_spec pl11x] config { + + + + } + +append_if [have_spec ps2] config { + + + + } + +append 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 diff --git a/src/app/opentyrian/target.mk b/src/app/opentyrian/target.mk new file mode 100644 index 0000000..e697a53 --- /dev/null +++ b/src/app/opentyrian/target.mk @@ -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 .