Port of SuperTux
This commit is contained in:
1
ports/supertux.hash
Normal file
1
ports/supertux.hash
Normal file
@@ -0,0 +1 @@
|
||||
dummy
|
||||
7
ports/supertux.port
Normal file
7
ports/supertux.port
Normal file
@@ -0,0 +1,7 @@
|
||||
LICENSE := GPLv3
|
||||
VERSION := 0.1.3
|
||||
DOWNLOADS := supertux.archive
|
||||
|
||||
URL(supertux) := http://supertux.googlecode.com/files/supertux-$(VERSION).tar.bz2
|
||||
SHA(supertux) := ad783011fbf15a8a56ca8680769a8c2a15abc515
|
||||
DIR(supertux) := src/app/supertux
|
||||
147
run/supertux.run
Normal file
147
run/supertux.run
Normal file
@@ -0,0 +1,147 @@
|
||||
#
|
||||
# Build
|
||||
#
|
||||
|
||||
set build_components {
|
||||
core init
|
||||
drivers/timer
|
||||
app/supertux server/ram_fs
|
||||
drivers/framebuffer drivers/pci drivers/input
|
||||
}
|
||||
|
||||
lappend_if [have_spec usb] build_components drivers/usb
|
||||
lappend_if [have_spec platform_rpi] build_components drivers/platform
|
||||
|
||||
build $build_components
|
||||
|
||||
create_boot_directory
|
||||
|
||||
#
|
||||
# Generate config
|
||||
#
|
||||
|
||||
append config {
|
||||
<config prio_levels="4">
|
||||
<parent-provides>
|
||||
<service name="ROM"/>
|
||||
<service name="RAM"/>
|
||||
<service name="IRQ"/>
|
||||
<service name="IO_MEM"/>
|
||||
<service name="IO_PORT"/>
|
||||
<service name="CAP"/>
|
||||
<service name="PD"/>
|
||||
<service name="RM"/>
|
||||
<service name="CPU"/>
|
||||
<service name="LOG"/>
|
||||
<service name="SIGNAL"/>
|
||||
</parent-provides>
|
||||
<default-route>
|
||||
<any-service> <parent/> <any-child/> </any-service>
|
||||
</default-route>}
|
||||
|
||||
append_if [have_spec sdl] config {
|
||||
<start name="fb_sdl">
|
||||
<resource name="RAM" quantum="4M"/>
|
||||
<provides>
|
||||
<service name="Input"/>
|
||||
<service name="Framebuffer"/>
|
||||
</provides>
|
||||
</start>}
|
||||
|
||||
append_if [have_spec pci] config {
|
||||
<start name="pci_drv" priority="-1">
|
||||
<resource name="RAM" quantum="1M"/>
|
||||
<provides><service name="PCI"/></provides>
|
||||
</start>}
|
||||
|
||||
append_if [have_spec platform_rpi] config {
|
||||
<start name="platform_drv" priority="-1">
|
||||
<resource name="RAM" quantum="1M"/>
|
||||
<provides><service name="Platform"/></provides>
|
||||
<config/>
|
||||
</start>}
|
||||
|
||||
append_if [have_spec framebuffer] config {
|
||||
<start name="fb_drv" priority="-1">
|
||||
<resource name="RAM" quantum="6M"/>
|
||||
<provides><service name="Framebuffer"/></provides>
|
||||
<config buffered="yes" />
|
||||
</start>}
|
||||
|
||||
append_if [have_spec ps2] config {
|
||||
<start name="ps2_drv" priority="-1">
|
||||
<resource name="RAM" quantum="1M"/>
|
||||
<provides><service name="Input"/></provides>
|
||||
</start>}
|
||||
|
||||
append_if [expr ![have_spec ps2] && [have_spec usb]] config {
|
||||
<start name="usb_drv">
|
||||
<resource name="RAM" quantum="12M"/>
|
||||
<provides><service name="Input"/></provides>
|
||||
<config ehci="yes" uhci="yes" xhci="no"> <hid/> </config>
|
||||
</start> }
|
||||
|
||||
append config {
|
||||
<start name="timer">
|
||||
<resource name="RAM" quantum="1M"/>
|
||||
<provides><service name="Timer"/></provides>
|
||||
</start>
|
||||
|
||||
<start name="ram_fs" priority="-1">
|
||||
<resource name="RAM" quantum="4M"/>
|
||||
<provides> <service name="File_system"/> </provides>
|
||||
<config> <policy label="" root="/" writeable="yes" /> </config>
|
||||
</start>
|
||||
|
||||
<start name="supertux" priority="-2">
|
||||
<resource name="RAM" quantum="64M"/>
|
||||
<config>
|
||||
<libc stdout="/dev/log" stderr="/dev/log" >
|
||||
<vfs>
|
||||
<tar name="supertux_data.tar" />
|
||||
<dir name="dev"> <log/> </dir>
|
||||
<fs/>
|
||||
</vfs>
|
||||
</libc>
|
||||
</config>
|
||||
</start>
|
||||
</config>}
|
||||
|
||||
install_config $config
|
||||
|
||||
#
|
||||
# Boot modules
|
||||
#
|
||||
|
||||
# generic modules
|
||||
set boot_modules {
|
||||
core init
|
||||
timer ram_fs
|
||||
supertux
|
||||
jpeg.lib.so
|
||||
ld.lib.so
|
||||
libc.lib.so
|
||||
libm.lib.so
|
||||
libpng.lib.so
|
||||
pthread.lib.so
|
||||
sdl_image.lib.so
|
||||
sdl_mixer.lib.so
|
||||
sdl.lib.so
|
||||
stdcxx.lib.so
|
||||
zlib.lib.so
|
||||
supertux_data.tar
|
||||
}
|
||||
|
||||
# platform-specific modules
|
||||
lappend_if [have_spec linux] boot_modules fb_sdl
|
||||
lappend_if [have_spec pci] boot_modules pci_drv
|
||||
lappend_if [have_spec framebuffer] boot_modules fb_drv
|
||||
lappend_if [have_spec ps2] boot_modules ps2_drv
|
||||
lappend_if [have_spec usb] boot_modules usb_drv
|
||||
lappend_if [have_spec platform_rpi] boot_modules platform_drv
|
||||
|
||||
build_boot_image $boot_modules
|
||||
|
||||
append qemu_args " -m 256 "
|
||||
|
||||
run_genode_until forever
|
||||
2
src/app/supertux/dummy.cc
Normal file
2
src/app/supertux/dummy.cc
Normal file
@@ -0,0 +1,2 @@
|
||||
/* silence debug messages */
|
||||
extern "C" void _sigprocmask() { }
|
||||
19
src/app/supertux/target.mk
Normal file
19
src/app/supertux/target.mk
Normal file
@@ -0,0 +1,19 @@
|
||||
TARGET := supertux
|
||||
|
||||
SUPERTUX_DIR := $(call select_from_ports,supertux)/src/app/supertux
|
||||
|
||||
SRC_CC := $(notdir $(wildcard $(SUPERTUX_DIR)/src/*.cpp))
|
||||
SRC_CC += dummy.cc
|
||||
|
||||
vpath %.cpp $(SUPERTUX_DIR)/src
|
||||
|
||||
INC_DIR += $(SUPERTUX_DIR)/src
|
||||
|
||||
LIBS += base libc libm stdcxx
|
||||
LIBS += sdl sdl_image sdl_mixer zlib
|
||||
|
||||
$(TARGET): supertux_data.tar
|
||||
supertux_data.tar:
|
||||
$(VERBOSE)cd $(SUPERTUX_DIR); tar cf $(PWD)/bin/$@ data
|
||||
|
||||
CC_OPT += -DNOOPENGL -DDATA_PREFIX='"/data"'
|
||||
Reference in New Issue
Block a user