Compare commits

...

11 Commits
audio ... dhall

95 changed files with 1798 additions and 735 deletions

3
.gitmodules vendored
View File

@ -106,3 +106,6 @@
[submodule "libretro/cores/yabause/upstream"]
path = libretro/cores/yabause/upstream
url = https://github.com/libretro/yabause.git
[submodule "dhall"]
path = dhall
url = https://github.com/ehmry/dhall-genode.git

19
Tupfile
View File

@ -28,8 +28,8 @@ SHORT_SUM = b2sum -l24
|> $(BIN_LISTING)
# Generate a listing of all binary archives
: $(DEPOT_DIR)/<packages> |> ^ generate package version sed script^ \
for d in `dirname %<packages> | tr ' ' '\n' | sort -u`; do \
: $(DEPOT_DIR)/<pkg> |> ^ generate package version sed script^ \
for d in `dirname %<pkg> | tr ' ' '\n' | sort -u`; do \
echo $d/`cat $d/.ARCHIVES $d/runtime | $(SHORT_SUM)` | awk -F '/' \
'{print "s|local/pkg/"$3"/current|@(PUBLIC_USER)/pkg/"$3"/"substr($5,0,6)"|"}' >> %o; \
done \
@ -53,18 +53,15 @@ SHORT_SUM = b2sum -l24
|> Makefile
# Generate the makefile for creating signed package tarballs
: index.xml | $(PKG_SED_FILE) |> ^ generate public index^ \
xmllint %f | sed \
-e 's|_/pkg/\([^"]*\)|local/pkg/\1/current|' \
-f $(PKG_SED_FILE) \
| xz > %o; \
|> public/@(PUBLIC_USER)/index/@(SCULPT_VERSION).xz
AWK_RUNTIME_PATH = awk -v RS=' ' -F '/' \
'/runtime/ {print " <pkg path=\"local/pkg/"$3"/current\"/>"}'
: $(DEPOT_DIR)/<packages> |> ^ generate local index^ \
: $(DEPOT_DIR)/<pkg> |> ^ generate local index^ \
echo '<index>' > %o; \
echo %<packages> | $(AWK_RUNTIME_PATH) | sort >> %o; \
echo %<pkg> | $(AWK_RUNTIME_PATH) | sort >> %o; \
echo '</index>' >> %o |> $(DEPOT_DIR)/index/@(SCULPT_VERSION)
# Generate the depot index file
: index.dhall | $(DEPOT_DIR)/index/<entry> |> \
!dhall text < %f | xmllint --format - | xz > %o \
|> public/@(PUBLIC_USER)/index/@(SCULPT_VERSION).xz

View File

@ -4,15 +4,26 @@ ifndef TOOL_CHAIN_PREFIX
error TOOL_CHAIN_PREFIX not configured, missing variant?
endif
DEPOT_DIR = $(TUP_CWD)/depot
DEPOT_RAW_DIR = $(DEPOT_DIR)/raw
DEPOT_PKG_DIR = $(DEPOT_DIR)/pkg
PUBLIC_DIR = $(TUP_CWD)/public/@(PUBLIC_USER)
PUBLIC_RAW_DIR = $(PUBLIC_DIR)/raw
PUBLIC_BIN_DIR = $(PUBLIC_DIR)/bin
PUBLIC_PKG_DIR = $(PUBLIC_DIR)/pkg
ifeq (@(TUP_ARCH),i386)
CC_MARCH = -march=i686 -m32
LD_MARCH = -melf_i386
AS_MARCH = -march=i686 --32
DEPOT_BIN_DIR = $(DEPOT_DIR)/bin/x86_32
endif
ifeq (@(TUP_ARCH),x86_64)
CC_MARCH = -m64 -mcmodel=large
LD_MARCH = -melf_x86_64
DEPOT_BIN_DIR = $(DEPOT_DIR)/bin/x86_64
endif
ifeq (@(TUP_ARCH),arm_v8)
@ -60,23 +71,13 @@ ifeq ($(RAW_VERSION),)
RAW_VERSION=$(GIT_VERSION)
endif
DEPOT_DIR = $(TUP_CWD)/depot
DEPOT_RAW_DIR = $(DEPOT_DIR)/raw
DEPOT_BIN_DIR = $(DEPOT_DIR)/bin
DEPOT_PKG_DIR = $(DEPOT_DIR)/pkg
PUBLIC_DIR = $(TUP_CWD)/public
PUBLIC_RAW_DIR = $(PUBLIC_DIR)/raw
PUBLIC_BIN_DIR = $(PUBLIC_DIR)/bin
PUBLIC_PKG_DIR = $(PUBLIC_DIR)/pkg
RAW_DIR = $(DEPOT_RAW_DIR)/$(RAW_NAME)/current
# Destination for locally defined raw package
BIN_DIR = $(DEPOT_BIN_DIR)/$(BIN_NAME)/current
# Destination for locally defined binary package
PKG_DIR = $(DEPOT_BIN_DIR)/$(BIN_NAME)/current
PKG_DIR = $(DEPOT_PKG_DIR)/$(PKG_NAME)/current
# Destination for locally defined runtime package
!raw = |> ^ generate raw metadata^ \
@ -104,11 +105,11 @@ AWK_LOCAL_ARCHIVES = awk -F '/' \
!collect_raw = |> ^ COLLECT %b^ \
cp %f %o \
|> $(RAW_DIR)/%b
|> $(RAW_DIR)/%b $(DEPOT_DIR)/<raw>
!collect_bin = |> ^ COLLECT %b^ \
@(TOOL_CHAIN_PREFIX)strip -o %o %f \
|> $(DEPOT_BIN_DIR)/$(BIN_NAME)/current/%b
|> $(DEPOT_BIN_DIR)/$(BIN_NAME)/current/%b $(DEPOT_DIR)/<bin>
!collect_pkg_runtime = | $(VERSIONS_SED_FILE) |> ^ package %f^ \
xmllint --noout -schema $(ERRATA_DIR)/runtime.xsd %f; \
@ -122,11 +123,11 @@ AWK_LOCAL_ARCHIVES = awk -F '/' \
$(DEPOT_PKG_DIR)/$(PKG_NAME)/current/runtime \
$(DEPOT_PKG_DIR)/$(PKG_NAME)/current/archives \
$(DEPOT_PKG_DIR)/$(PKG_NAME)/current/.ARCHIVES \
$(DEPOT_DIR)/<packages>
$(DEPOT_DIR)/<pkg>
!collect_pkg = |> ^ COLLECT %b^ cp %f %o \
|> $(DEPOT_PKG_DIR)/$(PKG_NAME)/current/%b \
$(DEPOT_DIR)/<packages>
$(DEPOT_DIR)/<pkg>
VERSIONS_SED_FILE = $(TUP_CWD)/versions.sed
PKG_SED_FILE = $(TUP_CWD)/pkg.sed
@ -161,15 +162,15 @@ PKG_CONFIG = PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) pkg-config
!asm = |> ^ CC %b^ @(CC_WRAPPER) $(CC) $(DEFINES) $(CFLAGS) $(CFLAGS_%e) $(CFLAGS_%f) -D__ASSEMBLY__ $(INCLUDES) -c %f -o %o |> %B.o
!cc = | $(GENODE_DIR)/<pkg-config> |> ^o CC %f^ @(CC_WRAPPER) $(CC) $(DEFINES) $(CFLAGS) $(CFLAGS_%e) $(CFLAGS_%f) `$(PKG_CONFIG) --cflags $(LIBS) $(LIBS_CFLAGS)` $(INCLUDES) -c %f -o %o |> %B.o
!cc = | $(GENODE_DIR)/<pkg-config> |> ^o CC %f^ @(CC_WRAPPER) $(CC) $(DEFINES) $(CFLAGS) $(CFLAGS_%e) $(CFLAGS_%f) `$(PKG_CONFIG) --cflags $(LIBS) $(LIBS_CFLAGS)` $(INCLUDES) -c -fPIC -g %f -o %o |> %B.o
!cc_port = | $(GENODE_DIR)/<pkg-config> |> ^o CC %o^ @(CC_WRAPPER) $(CC) -c $(DEFINES) $(CFLAGS) $(CFLAGS_%o) $(INCLUDES) `$(PKG_CONFIG) --cflags $(LIBS) $(LIBS_CFLAGS)` -o %o |> %B.o
!cc_port = | $(GENODE_DIR)/<pkg-config> |> ^o CC %o^ @(CC_WRAPPER) $(CC) $(DEFINES) $(CFLAGS) $(CFLAGS_%o) $(INCLUDES) `$(PKG_CONFIG) --cflags $(LIBS) $(LIBS_CFLAGS)` -c -fPIC -g -o %o |> %B.o
!cxx = | $(GENODE_DIR)/<pkg-config> |> ^o CXX %b^ @(CC_WRAPPER) $(CXX) $(DEFINES) $(CXXFLAGS) $(CXXFLAGS_%e) $(CXXFLAGS_%f) `$(PKG_CONFIG) --cflags $(LIBS)` $(INCLUDES) -c %f -o %o |> %B.o
!cxx = | $(GENODE_DIR)/<pkg-config> |> ^o CXX %b^ @(CC_WRAPPER) $(CXX) $(DEFINES) $(CXXFLAGS) $(CXXFLAGS_%e) $(CXXFLAGS_%f) `$(PKG_CONFIG) --cflags $(LIBS)` $(INCLUDES) -c -fPIC -g %f -o %o |> %B.o
!cxx_port = | $(GENODE_DIR)/<pkg-config> |> ^o CXX %o^ @(CC_WRAPPER) $(CXX) -c $(DEFINES) $(CXXFLAGS) $(CXXFLAGS_%f) `$(PKG_CONFIG) --cflags $(LIBS)` $(INCLUDES) -o %o |> %B.o
!cxx_port = | $(GENODE_DIR)/<pkg-config> |> ^o CXX %o^ @(CC_WRAPPER) $(CXX) $(DEFINES) $(CXXFLAGS) $(CXXFLAGS_%f) `$(PKG_CONFIG) --cflags $(LIBS)` $(INCLUDES) -c -fPIC -g -o %o |> %B.o
!ld = | $(GENODE_DIR)/<lib> $(GENODE_DIR)/<pkg-config> |> ^o LD %o^ $(LD) $(LDFLAGS) `$(PKG_CONFIG) --libs $(LIBS)` %f -o %o |>
!ld = | $(GENODE_DIR)/<lib> $(GENODE_DIR)/<pkg-config> |> ^o LD %o^ $(LD) $(LDFLAGS) `$(PKG_CONFIG) --libs $(LIBS)` --whole-archive --start-group %f --no-whole-archive --end-group -o %o |>
!strip = |> strip -o %o %f |>
@ -198,3 +199,25 @@ endif
tmp.o; \
rm tmp.o; \
|> $(STUB_DIR)/%B.lib.so $(GENODE_DIR)/<stub>
DHALL_PRELUDE = $(TUP_CWD)/dhall/Prelude.dhall
DHALL_GENODE = $(TUP_CWD)/dhall/package.dhall
DHALL_GENODE_TYPES = $(TUP_CWD)/dhall/types.dhall
DHALL = DHALL_PRELUDE=$(DHALL_PRELUDE) DHALL_GENODE=$(DHALL_GENODE) DHALL_GENODE_TYPES=$(DHALL_GENODE_TYPES) dhall
!dhall = |> ^b dhall > %o^ $(DHALL) |>
DEPOT_MANIFEST = $(PUBLIC_DIR)/manifest.dhall
!index_pkg = | $(PUBLIC_DIR)/<manifest> |> ^ Generate index.dhall^\
$(DHALL) <<< '{ info = (%f).indexInfo, name = "$(PKG_NAME)", version = ($(DEPOT_MANIFEST)).pkg.$(PKG_NAME).version }' > %o \
|> $(PKG_DIR)/index.dhall $(DEPOT_DIR)/index/<entry>
!render_runtime = |> ^o render %o^ \
$(DHALL) text <<< '$(ERRATA_DIR)/renderRuntime.dhall (%f).runtime' \
> $(DEPOT_PKG_DIR)/$(PKG_NAME)/current/runtime; \
xmllint --noout -schema $(ERRATA_DIR)/runtime.xsd - \
< $(DEPOT_PKG_DIR)/$(PKG_NAME)/current/runtime; \
|> \
$(DEPOT_PKG_DIR)/$(PKG_NAME)/current/runtime \
$(DEPOT_DIR)/<pkg> \

View File

@ -15,7 +15,7 @@ CONFIG_PUBLIC_KEY=6E10414EE7160781F5FEE8FFB14D043A26B3D2C7
CONFIG_PUBLIC_PKG_AUDIO_PLAYER=ehmry/pkg/audio_player/2019-05-15
CONFIG_PUBLIC_PKG_AVPLAY=ehmry/pkg/avplay/2019-04-24
CONFIG_PUBLIC_PKG_BACKDROP=ehmry/pkg/backdrop/2019-05-24
CONFIG_PUBLIC_PKG_BACKDROP=genodelabs/pkg/backdrop/2019-07-08
CONFIG_PUBLIC_PKG_NOUX_SYSTEM=ehmry/pkg/noux-system/2019-05-24
CONFIG_PUBLIC_PKG_PDF_VIEW=ehmry/pkg/pdf_view/2019-05-17
@ -25,7 +25,7 @@ CONFIG_PUBLIC_SRC_CHROOT=_/src/chroot
CONFIG_PUBLIC_SRC_EXPAT=nfeske/src/expat/2019-02-19
CONFIG_PUBLIC_SRC_FS_LOG=_/src/fs_log
CONFIG_PUBLIC_SRC_INIT=_/src/init
CONFIG_PUBLIC_SRC_LIBC=nfeske/src/libc/2019-06-24
CONFIG_PUBLIC_SRC_LIBC=genodelabs/src/libc/2019-07-08
CONFIG_PUBLIC_SRC_LIBCRYPTO=ehmry/src/libcrypto/2019-05-24
CONFIG_PUBLIC_SRC_LIBICONV=genodelabs/src/libiconv/2019-05-26
CONFIG_PUBLIC_SRC_LIBMPG123=ehmry/src/libmpg123/2019-05-24

View File

@ -49,6 +49,7 @@ pkgs.mkShell {
''
export LD_DIR=${lddir}
export TOOLCHAIN_DIR=${toolchain}
export HOST_LIBC=${stdenv.glibc.dev}
export SYSLINUX=${syslinux}
export PROMPT_DIRTRIM=2
export PS1="\[\033[1;30m\]Genode-dev [\[\033[1;37m\]\w\[\033[1;30m\]] $\[\033[0m\] "

1
dhall Submodule

@ -0,0 +1 @@
Subproject commit d3273fff08175f64ce4a027e1867abff4bb5abdb

View File

@ -0,0 +1,7 @@
let Genode = env:DHALL_GENODE
let types = env:DHALL_GENODE_TYPES
let XML = Genode.Prelude.XML
in λ(runtime : types.Runtime) → XML.render (Genode.Runtime.toXML runtime)

View File

@ -19,6 +19,7 @@
<xs:element name="log" type="template_service"/>
<xs:element name="nic" type="template_service"/>
<xs:element name="nitpicker" type="template_service"/>
<xs:element name="platform" type="template_service"/>
<xs:element name="report" type="template_service"/>
<xs:element name="rm" type="template_service"/>
<xs:element name="rom" type="template_service"/>

97
index.dhall Normal file
View File

@ -0,0 +1,97 @@
let owner = "ehmry"
let Genode = env:DHALL_GENODE
let Prelude = Genode.Prelude
let List/map = Prelude.List.map
let XML = Prelude.XML
let XML/Type =
/home/repo/dhall-lang/Prelude/XML/Type sha256:461930f3aab769ba537d1a4fd71f411504b0c8d1c1a78d65177be8ded0df8a5c
? /home/repo/dhall-lang/Prelude/XML/Type
let Entry = { info : Text, name : Text, version : Text }
let ownedEntry =
λ(owner : Text)
→ λ(e : Entry)
→ XML.leaf
{ name =
"pkg"
, attributes =
[ { mapKey = "info", mapValue = e.info }
, { mapKey =
"path"
, mapValue =
"${owner}/pkg/${e.name}/${e.version}"
}
]
}
let entry = ownedEntry owner
let subIndex =
λ(name : Text)
→ λ(entries : List Entry)
→ XML.element
{ name =
"index"
, attributes =
[ { mapKey = "name", mapValue = name } ]
, content =
List/map Entry XML/Type entry entries
}
let emu =
subIndex
"Emulators and game engines"
[ ./depot/pkg/fceumm/current/index.dhall
, ./depot/pkg/gambatte/current/index.dhall
, ./depot/pkg/snes9x/current/index.dhall
, ./depot/pkg/mgba/current/index.dhall
]
let games =
subIndex
"Games"
[ ./depot/pkg/libretro-2048/current/index.dhall
, ./depot/pkg/tyrquake/current/index.dhall
]
let streams =
subIndex
"Streams"
[ ./depot/pkg/ifm1/current/index.dhall
, ./depot/pkg/ifm2/current/index.dhall
, ./depot/pkg/ifm3/current/index.dhall
]
let utilities =
subIndex
"Utilities"
[ ./depot/pkg/depot_9P/current/index.dhall
, ./depot/pkg/show_input/current/index.dhall
, ./depot/pkg/nic_bus/current/index.dhall
, ./depot/pkg/noux-system/current/index.dhall
, ./depot/pkg/backdrop/current/index.dhall
]
let index =
XML.element
{ name =
"index"
, attributes =
XML.emptyAttributes
, content =
[ emu
, games
, streams
, utilities
, XML.text
"<pkg path=\"cnuke/pkg/bsd_audio_drv/2019-07-02\" info=\"OpenBSD audio driver\"/>"
]
}
in XML.render index

127
index.xml
View File

@ -1,127 +0,0 @@
<index>
<index name="Emulators and game engines">
<pkg path="_/pkg/dosbox" info="Experimental Libretro port of DOSBox"/>
<pkg path="_/pkg/fceumm" info="NES"/>
<pkg path="_/pkg/gambatte" info="GB"/>
<pkg path="_/pkg/mgba" info="GBA"/>
<pkg path="_/pkg/nxengine" info="Cave Story engine without game data"/>
<pkg path="_/pkg/snes9x" info="SNES"/>
<index name="Tests">
<pkg path="_/pkg/240pee-NES" info="NES tests"/>
<pkg path="_/pkg/240pSuite-SNES" info="SNES tests"/>
<pkg path="_/pkg/advanced_tests" info="An advanced test core written in C"/>
<pkg path="_/pkg/button_test" info="Libretro joypad button test"/>
<pkg path="_/pkg/topbench_dosbox-libretro" info="The Oldskool PC Benchmark running in DOSBox"/>
<pkg path="_/pkg/topbench_dosbox-svn" info="The Oldskool PC Benchmark running in DOSBox"/>
</index>
</index>
<index name="Games">
<pkg path="_/pkg/2048" info="Threes! clone"/>
<pkg path="ehmry/pkg/abuse/2019-05-24" info="Side-scrolling shooter"/>
<pkg path="_/pkg/cave_story-en" info="Cave Story ~ Doukutsu Monogatari is a jumping-and-shooting action game."/>
<pkg path="_/pkg/mrboom" info="Bomberman clone"/>
<pkg path="_/pkg/quake_dopa" info="Quake Episode 5: Dimension of the Past (id1/pak1.pak required)"/>
<pkg path="_/pkg/streemerz" info="Streemerz remake"/>
<pkg path="_/pkg/tyrquake" info="Quake (shareware pak)"/>
</index>
<index name="Block devices">
<!-- <pkg path="_/pkg/alpine-standard-x86" info="Alpine live ISO service"/> -->
<!-- <pkg path="_/pkg/alpine-virt-x86_64" info="Alpine live ISO service"/> -->
<pkg path="_/pkg/dummy_block" info="Dummy block device"/>
<pkg path="_/pkg/fs_block_4G" info="File-system backed 4GiB block device"/>
<pkg path="_/pkg/fs_block_8G" info="File-system backed 8GiB block device"/>
<!-- <pkg path="_/pkg/ReactOS-live" info="ReactOS live ISO service"/> -->
</index>
<index name="VMMs">
<pkg path="genodelabs/pkg/vbox5-nova-sculpt/2019-03-18" info="VBox5 for running Linux"/>
<pkg path="_/pkg/seoul-nova" info="Seoul VMM with routable block devices"/>
<index name="Installers">
<pkg path="_/pkg/fetch_alpine_x86_64" info="Fetch Alpine Linux virt ISO"/>
<pkg path="_/pkg/fetch_freebsd_12_amd64" info="Fetch FreeBSD 12 mini-memstick"/>
<pkg path="_/pkg/fetch_nixos_x86_64" info="Fetch NixOS minimal ISO"/>
<pkg path="_/pkg/fetch_ubuntu_x86_64" info="Fetch Ubuntu netboot installer ISO"/>
</index>
<index name="Experimental">
<pkg path="_/pkg/alpine_seoul_nova_installer" info="Alpine Linux installer as a Seoul VMM with routeable block device"/>
<pkg path="_/pkg/openbsd_seoul_nova_installer" info="OpenBSD installer as a Seoul VMM with routeable block device"/>
<pkg path="_/pkg/vbox5-nova" info="Vbox with routable block devices"/>
</index>
</index>
<index name="Operating system demos">
<pkg path="_/pkg/ban.ai_multics" info="BAN.AI Public Access Multics"/>
<pkg path="_/pkg/oberon" info="Oberon RISC emulator (requires three-button mouse)"/>
<pkg path="_/pkg/soyuz" info="Training program for the Soyuz-TMA spacecraft"/>
<pkg path="_/pkg/templeos" info="The Temple Operating System hosted in VirtualBox for NOVA"/>
</index>
<index name="Utility">
<index name="Audio">
<pkg path="ehmry/pkg/bsd_audio_drv/2019-05-24" info="Cnuke's audio driver"/>
<pkg path="ehmry/pkg/audio_player/2019-05-24" info="Cnuke's audio player"/>
</index>
<index name="Graphic">
<!-- <pkg path="ehmry/pkg/flif_capture/2019-03-22" info="Screen capture utility"/> -->
<pkg path="_/pkg/backdrop" info="Nitpicker backdrop"/>
<!-- <pkg path="ehmry/pkg/flif_view/2019-03-22" info="FLIF file viewer (experimental)"/> -->
<pkg path="ehmry/pkg/grafx2/2019-05-24" info="Bitmap paint program (ported by cnuke)"/>
</index>
<index name="Network">
<pkg path="_/pkg/arora" info="Arora web browser (cproc's package with clipboard)"/>
<pkg path="_/pkg/nic_bridge" info="Ethernet bridge"/>
<pkg path="_/pkg/nic_bridge_logged" info="Logged ethernet bridge"/>
<pkg path="_/pkg/nic_bus" info="Switched ethernet bus"/>
<pkg path="_/pkg/ninep" info="9P server"/>
<pkg path="_/pkg/ssh_client" info="SSH client"/>
<pkg path="_/pkg/test-lwip_node" info="Standalone lwIP IPv6 node"/>
<pkg path="_/pkg/kiosk" info="Kiosk-style web browser"/>
</index>
<index name="UI">
<pkg path="ehmry/pkg/themed_wm/2019-05-24" info="Window manager that should work"/>
<pkg path="_/pkg/wm" info="Base window manager"/>
<pkg path="_/pkg/motif_decorator" info="Motif style window decorator"/>
<pkg path="_/pkg/carn_layouter" info="Piling window layouter"/>
</index>
<index name="Other">
<!-- <pkg path="_/pkg/block_shred" info="Fill a block device with psuedo-random noise"/> -->
<pkg path="_/pkg/depot_9P" info="Serve /depot/local over 9P"/>
<!-- <pkg path="ehmry/pkg/jitter_sponge/2019-03-31" info="Entropy source"/> -->
<!-- <pkg path="ehmry/pkg/noux-build-x86/2019-03-20" info="Noux build environment"/> -->
<pkg path="_/pkg/noux-system" info="Noux administration environment"/>
<pkg path="_/pkg/show_input" info="Nitpicker input event debugger"/>
</index>
</index>
<index name="Radio streams">
<pkg path="_/pkg/ifm1" info="Intergalactic FM 1"/>
<pkg path="_/pkg/ifm2" info="Intergalactic FM 2"/>
<pkg path="_/pkg/ifm3" info="Intergalactic FM 3"/>
</index>
<index name="Experimental">
<index name="Semantic audio player demo">
<pkg path="_/pkg/blob_service" info="Blobsets package with file-system and HTTP frontends"/>
<pkg path="_/pkg/musicbrainz_playlist_generator" info="XSPF playlist generator"/>
<pkg path="_/pkg/xspf_view" info="XSPF playlist viewer"/>
</index>
<pkg path="_/pkg/4do" "3DO emulator"/>
<pkg path="ehmry/pkg/avplay/2019-05-24"/>
<pkg path="_/pkg/bluemsx"/>
<pkg path="_/pkg/cruzes" info="An unfinished Picross Libretro core"/>
<pkg path="_/pkg/monero_vanity"/>
<pkg path="_/pkg/mu"/>
<pkg path="_/pkg/testgl"/>
<pkg path="_/pkg/yabause" info="Sega Saturn emulator/>
</index>
<pkg path="ehmry/pkg/fonts_fs/2019-05-24" info="Fonts provider"/>
<pkg path="_/pkg/chroot" info="Automatic file-system session partitioner"/>
</index>

View File

@ -10,5 +10,7 @@ include upstream/Makefile.common
: {core} |> !collect_bin |>
: |> !bin |>
: $(TUP_CWD)/runtime |> !collect_pkg_runtime |>
: $(TUP_CWD)/pkg.dhall |> !render_runtime |> {runtime}
: |> !pkg |>
: $(TUP_CWD)/pkg.dhall |> !index_pkg |>

View File

@ -0,0 +1,43 @@
let Genode = env:DHALL_GENODE
let Prelude = Genode.Prelude
let XML = Prelude.XML
let List/map = Prelude.List.map
let Service = { service : Text, label : Optional Text }
let service = λ(s : Text) → { service = s, label = None Text }
let defaults = ./../../pkgDefaults.dhall
in { indexInfo =
"Threes! clone"
, runtime =
defaults.runtime
⫽ { ram =
Genode.units.MiB 4
, requires =
List/map Text Service service [ "file_system", "nitpicker" ]
, config =
XML.text
''
<config>
<libc stdout="/dev/log" stderr="/dev/log"/>
<vfs>
<dir name="dev"> <log label="core"/> </dir>
<fs/>
</vfs>
<default-controller port="0" device="1">
<map from="KEY_LEFT" to="LEFT"/>
<map from="KEY_RIGHT" to="RIGHT"/>
<map from="KEY_UP" to="UP"/>
<map from="KEY_DOWN" to="DOWN"/>
<map from="KEY_ENTER" to="START"/>
<map from="KEY_RIGHTSHIFT" to="SELECT"/>
</default-controller>
</config>
''
}
}

View File

@ -1,32 +0,0 @@
<runtime ram="16M" caps="128" binary="retro_frontend">
<requires>
<file_system/>
<nitpicker/>
</requires>
<content>
<rom label="libc.lib.so"/>
<rom label="libm.lib.so"/>
<rom label="libretro.so"/>
<rom label="retro_frontend"/>
<rom label="vfs.lib.so"/>
</content>
<config>
<libc stdout="/dev/log" stderr="/dev/log"/>
<vfs>
<dir name="dev"> <log label="core"/> </dir>
<fs/>
</vfs>
<default-controller port="0" device="1">
<map from="KEY_LEFT" to="LEFT"/>
<map from="KEY_RIGHT" to="RIGHT"/>
<map from="KEY_UP" to="UP"/>
<map from="KEY_DOWN" to="DOWN"/>
<map from="KEY_ENTER" to="START"/>
<map from="KEY_RIGHTSHIFT" to="SELECT"/>
</default-controller>
</config>
</runtime>

@ -1 +1 @@
Subproject commit b8d222ace1bf1962423111e395e01d4674776270
Subproject commit 54d3ddd3c9f81d7bbd5714a670913e46301781c7

@ -1 +1 @@
Subproject commit 8c2b1cf0ccd8ea8a36ae1ed7aa09ae7c2b3dc1cd
Subproject commit 216aa7e1ae01a9ac52c856b1d73e4afe5ce0cc1d

View File

@ -15,5 +15,7 @@ DEFINES += -Wno-write-strings
: {core} |> !collect_bin |>
: |> !bin |>
: $(TUP_CWD)/runtime |> !collect_pkg_runtime |>
: $(TUP_CWD)/pkg.dhall |> !render_runtime |> {runtime}
: |> !pkg |>
: $(TUP_CWD)/pkg.dhall |> !index_pkg |>

View File

@ -0,0 +1,9 @@
let Genode = env:DHALL_GENODE
let defaults = ./../../pkgJoypadDefaults.dhall
in { indexInfo =
"NES emulator"
, runtime =
defaults.runtime ⫽ { ram = Genode.units.MiB 16 }
}

View File

@ -1,39 +0,0 @@
<runtime ram="16M" caps="128" binary="retro_frontend">
<requires>
<audio_out/>
<file_system/>
<nitpicker/>
<rm/>
</requires>
<content>
<rom label="libc.lib.so"/>
<rom label="libm.lib.so"/>
<rom label="libretro.so"/>
<rom label="retro_frontend"/>
<rom label="vfs.lib.so"/>
</content>
<config>
<libc stdout="/dev/log" stderr="/dev/log"/>
<vfs>
<fs/>
<dir name="dev"> <log label="core"/> </dir>
</vfs>
<game/>
<default-controller port="0" device="1">
<map from="KEY_LEFT" to="LEFT"/>
<map from="KEY_RIGHT" to="RIGHT"/>
<map from="KEY_UP" to="UP"/>
<map from="KEY_DOWN" to="DOWN"/>
<map from="KEY_Z" to="B"/>
<map from="KEY_X" to="A"/>
<map from="KEY_ENTER" to="START"/>
<map from="KEY_RIGHTSHIFT" to="SELECT"/>
</default-controller>
</config>
</runtime>

@ -1 +1 @@
Subproject commit 4e1bdaaed021b0f6587c61f18de081bc3876f887
Subproject commit bb8aef82c11b6d9eb21a0e902e770c75924ff96e

View File

@ -20,5 +20,7 @@ include upstream/Makefile.common
PKG_DEPENDS += \
@(PUBLIC_SRC_STDCXX) \
: $(TUP_CWD)/runtime |> !collect_pkg_runtime |>
: $(TUP_CWD)/pkg.dhall |> !render_runtime |> {runtime}
: |> !pkg |>
: $(TUP_CWD)/pkg.dhall |> !index_pkg |>

View File

@ -0,0 +1,14 @@
let Genode = env:DHALL_GENODE
let defaults = ./../../pkgJoypadDefaults.dhall
in { indexInfo =
"Game Boy Emulator"
, runtime =
defaults.runtime
⫽ { ram =
Genode.units.MiB 8
, roms =
defaults.runtime.roms # [ "stdcxx.lib.so" ]
}
}

View File

@ -1,40 +0,0 @@
<runtime ram="8M" caps="128" binary="retro_frontend">
<requires>
<audio_out/>
<file_system/>
<nitpicker/>
<rm/>
</requires>
<content>
<rom label="libc.lib.so"/>
<rom label="libm.lib.so"/>
<rom label="libretro.so"/>
<rom label="stdcxx.lib.so"/>
<rom label="retro_frontend"/>
<rom label="vfs.lib.so"/>
</content>
<config>
<libc stdout="/dev/log" stderr="/dev/log"/>
<vfs>
<fs/>
<dir name="dev"> <log label="core"/> </dir>
</vfs>
<game/>
<default-controller port="0" device="1">
<map from="KEY_LEFT" to="LEFT"/>
<map from="KEY_RIGHT" to="RIGHT"/>
<map from="KEY_UP" to="UP"/>
<map from="KEY_DOWN" to="DOWN"/>
<map from="KEY_Z" to="B"/>
<map from="KEY_X" to="A"/>
<map from="KEY_ENTER" to="START"/>
<map from="KEY_RIGHTSHIFT" to="SELECT"/>
</default-controller>
</config>
</runtime>

View File

@ -23,5 +23,7 @@ CFLAGS += $(INCLUDES)
PKG_DEPENDS += \
@(PUBLIC_SRC_STDCXX) \
: $(TUP_CWD)/runtime |> !collect_pkg_runtime |>
: $(TUP_CWD)/pkg.dhall |> !render_runtime |> {runtime}
: |> !pkg |>
: $(TUP_CWD)/pkg.dhall |> !index_pkg |>

View File

@ -0,0 +1,44 @@
let Genode = env:DHALL_GENODE
let Prelude = Genode.Prelude
let XML = Prelude.XML
let defaults = ./../../pkgDefaults.dhall
in { indexInfo =
"Game Boy Advance Emulator"
, runtime =
defaults.runtime
⫽ { ram =
Genode.units.MiB 64
, roms =
defaults.runtime.roms # [ "stdcxx.lib.so" ]
, config =
XML.text
''
<config>
<libc stdout="/dev/log" stderr="/dev/log"/>
<game/>
<vfs>
<fs/>
<dir name="dev"> <log label="core"/> </dir>
</vfs>
<default-controller port="0" device="1">
<map from="KEY_LEFT" to="LEFT"/>
<map from="KEY_RIGHT" to="RIGHT"/>
<map from="KEY_UP" to="UP"/>
<map from="KEY_DOWN" to="DOWN"/>
<map from="KEY_Z" to="B"/>
<map from="KEY_X" to="A"/>
<map from="KEY_A" to="L"/>
<map from="KEY_S" to="R"/>
<map from="KEY_ENTER" to="START"/>
<map from="KEY_RIGHTSHIFT" to="SELECT"/>
</default-controller>
</config>
''
}
}

View File

@ -1,42 +0,0 @@
<runtime ram="64M" caps="128" binary="retro_frontend">
<requires>
<audio_out/>
<file_system/>
<nitpicker/>
<rm/>
</requires>
<content>
<rom label="libc.lib.so"/>
<rom label="libm.lib.so"/>
<rom label="libretro.so"/>
<rom label="retro_frontend"/>
<rom label="stdcxx.lib.so"/>
<rom label="vfs.lib.so"/>
</content>
<config>
<libc stdout="/dev/log" stderr="/dev/log"/>
<game/>
<vfs>
<fs/>
<dir name="dev"> <log label="core"/> </dir>
</vfs>
<default-controller port="0" device="1">
<map from="KEY_LEFT" to="LEFT"/>
<map from="KEY_RIGHT" to="RIGHT"/>
<map from="KEY_UP" to="UP"/>
<map from="KEY_DOWN" to="DOWN"/>
<map from="KEY_Z" to="B"/>
<map from="KEY_X" to="A"/>
<map from="KEY_A" to="L"/>
<map from="KEY_S" to="R"/>
<map from="KEY_ENTER" to="START"/>
<map from="KEY_RIGHTSHIFT" to="SELECT"/>
</default-controller>
</config>
</runtime>

@ -1 +1 @@
Subproject commit 22c7ae749b9b46fb0343d8f25238db62ca6156ef
Subproject commit 9c8a1a598d04e764df5f848ff619869a9c3f6ad8

@ -1 +1 @@
Subproject commit 148b9f7301db2aebfc3b9190526ebde43eba170b
Subproject commit 12da10f1b14507a0f6d20bc2e8c86ff55451a0d3

View File

@ -18,5 +18,5 @@ CXXFLAGS += -fno-rtti -fno-exceptions
: {core} |> !collect_bin |>
: |> !bin |>
: $(TUP_CWD)/runtime |> !collect_pkg_runtime |>
: $(TUP_CWD)/pkg.dhall |> !render_runtime |>
: |> !pkg |>

View File

@ -0,0 +1,36 @@
let XML = (env:DHALL_GENODE).Prelude.XML
let defaults = ./../../pkgDefaults.dhall
in { indexInfo =
"Cave Story engine"
, runtime =
defaults.runtime
⫽ { config =
XML.text
''
<config>
<libc stdout="/dev/log" stderr="/dev/log"/>
<vfs>
<tar name="doukutsu.tar"/>
<fs/>
<dir name="dev"> <log/> </dir>
</vfs>
<game/>
<default-controller port="0" device="1">
<map from="KEY_LEFT" to="LEFT"/>
<map from="KEY_UP" to="UP"/>
<map from="KEY_DOWN" to="DOWN"/>
<map from="KEY_RIGHT" to="RIGHT"/>
<map from="KEY_Z" to="B"/>
<map from="KEY_X" to="A"/>
<map from="KEY_S" to="X"/>
<map from="KEY_Q" to="L"/>
<map from="KEY_W" to="R"/>
<map from="KEY_RIGHTSHIFT" to="SELECT"/>
<map from="KEY_ENTER" to="START"/>
</default-controller>
</config>
''
}
}

View File

@ -21,5 +21,7 @@ CXXFLAGS += -DRIGHTSHIFT_IS_SAR -D__LIBRETRO__ -DALLOW_CPU_OVERCLOCK
PKG_DEPENDS += \
@(PUBLIC_SRC_STDCXX) \
: $(TUP_CWD)/runtime |> !collect_pkg_runtime |>
: $(TUP_CWD)/pkg.dhall |> !render_runtime |> {runtime}
: |> !pkg |>
: $(TUP_CWD)/pkg.dhall |> !index_pkg |>

View File

@ -0,0 +1,46 @@
let Genode = env:DHALL_GENODE
let XML = Genode.Prelude.XML
let defaults = ./../../pkgDefaults.dhall
in { indexInfo =
"SNES emulator"
, runtime =
defaults.runtime
⫽ { roms =
defaults.runtime.roms # [ "stdcxx.lib.so" ]
, ram =
Genode.units.MiB 24
, caps =
192
, config =
XML.text
''
<config>
<libc stdout="/dev/log" stderr="/dev/log"/>
<game/>
<vfs>
<fs/>
<dir name="dev"> <log label="core"/> </dir>
</vfs>
<default-controller port="0" device="1">
<map from="KEY_LEFT" to="LEFT"/>
<map from="KEY_RIGHT" to="RIGHT"/>
<map from="KEY_UP" to="UP"/>
<map from="KEY_DOWN" to="DOWN"/>
<map from="KEY_X" to="A"/>
<map from="KEY_Z" to="B"/>
<map from="KEY_S" to="X"/>
<map from="KEY_A" to="Y"/>
<map from="KEY_Q" to="L"/>
<map from="KEY_W" to="R"/>
<map from="KEY_ENTER" to="START"/>
<map from="KEY_RIGHTSHIFT" to="SELECT"/>
</default-controller>
</config>
''
}
}

View File

@ -1,44 +0,0 @@
<runtime ram="32M" caps="192" binary="retro_frontend">
<requires>
<audio_out/>
<file_system/>
<nitpicker/>
<rm/>
</requires>
<content>
<rom label="libc.lib.so"/>
<rom label="libm.lib.so"/>
<rom label="libretro.so"/>
<rom label="retro_frontend"/>
<rom label="stdcxx.lib.so"/>
<rom label="vfs.lib.so"/>
</content>
<config>
<libc stdout="/dev/log" stderr="/dev/log"/>
<game/>
<vfs>
<fs/>
<dir name="dev"> <log label="core"/> </dir>
</vfs>
<default-controller port="0" device="1">
<map from="KEY_LEFT" to="LEFT"/>
<map from="KEY_RIGHT" to="RIGHT"/>
<map from="KEY_UP" to="UP"/>
<map from="KEY_DOWN" to="DOWN"/>
<map from="KEY_X" to="A"/>
<map from="KEY_Z" to="B"/>
<map from="KEY_S" to="X"/>
<map from="KEY_A" to="Y"/>
<map from="KEY_Q" to="L"/>
<map from="KEY_W" to="R"/>
<map from="KEY_ENTER" to="START"/>
<map from="KEY_RIGHTSHIFT" to="SELECT"/>
</default-controller>
</config>
</runtime>

View File

@ -28,5 +28,7 @@ include upstream/Makefile.common
PKG_DEPENDS += \
ehmry/raw/quake_shareware/1.06 \
: $(TUP_CWD)/runtime |> !collect_pkg_runtime |>
: $(TUP_CWD)/pkg.dhall |> !render_runtime |> {runtime}
: |> !pkg |>
: $(TUP_CWD)/pkg.dhall |> !index_pkg |>

View File

@ -0,0 +1,37 @@
let Genode = env:DHALL_GENODE
let Prelude = Genode.Prelude
let XML = Prelude.XML
let defaults = ./../../pkgDefaults.dhall
in { indexInfo =
"QUAKE engine"
, runtime =
defaults.runtime
⫽ { ram =
Genode.units.MiB 64
, caps =
256
, roms =
defaults.runtime.roms # [ "quake_shareware.tar" ]
, config =
XML.text
''
<config>
<game/>
<libc stdout="/dev/log" stderr="/dev/log"/>
<vfs>
<tar name="quake_shareware.tar"/>
<fs/>
<dir name="dev"> <log label="core"/> </dir>
</vfs>
<default-controller port="0" device="3"/>
<variables>
<variable key="tyrquake_resolution" value="960x600"/>
</variables>
</config>
''
}
}

View File

@ -1,33 +0,0 @@
<runtime ram="64M" caps="256" binary="retro_frontend">
<requires>
<audio_out/>
<file_system/>
<nitpicker/>
<rm/>
</requires>
<content>
<rom label="libc.lib.so"/>
<rom label="libm.lib.so"/>
<rom label="libretro.so"/>
<rom label="quake_shareware.tar"/>
<rom label="retro_frontend"/>
<rom label="vfs.lib.so"/>
</content>
<config>
<game/>
<libc stdout="/dev/log" stderr="/dev/log"/>
<vfs>
<tar name="quake_shareware.tar"/>
<fs/>
<dir name="dev"> <log label="core"/> </dir>
</vfs>
<default-controller port="0" device="3"/>
<variables>
<variable key="tyrquake_resolution" value="960x600"/>
</variables>
</config>
</runtime>

View File

@ -0,0 +1,23 @@
let frontend = ./retro_frontend/package.dhall
let bind = frontend.Config.Controller.bind
in { port =
0
, device =
1
, binds =
[ bind "KEY_LEFT" "LEFT"
, bind "KEY_RIGHT" "RIGHT"
, bind "KEY_UP" "UP"
, bind "KEY_DOWN" "DOWN"
, bind "KEY_X" "A"
, bind "KEY_Z" "B"
, bind "KEY_S" "X"
, bind "KEY_A" "Y"
, bind "KEY_Q" "L"
, bind "KEY_W" "R"
, bind "KEY_ENTER" "START"
, bind "KEY_RIGHTSHIFT" "SELECT"
]
}

@ -1 +1 @@
Subproject commit 7437ccc0fb92c8177a980b8b45e2a3e995f98f8c
Subproject commit c216fa1a0d02a7b9a6a6d3dc3ed618698777a7a0

View File

@ -0,0 +1,33 @@
let Genode = env:DHALL_GENODE
let types = env:DHALL_GENODE_TYPES
let Prelude = Genode.Prelude
let List/map = Prelude.List.map
let Runtime/Require = types.Runtime/Require
in { runtime =
Genode.Runtime.defaults
⫽ { ram =
Genode.units.MiB 32
, caps =
128
, binary =
"retro_frontend"
, requires =
List/map
Text
Runtime/Require
Genode.Runtime.Require.require
[ "audio_out", "file_system", "nitpicker", "rm" ]
, roms =
[ "retro_frontend"
, "libc.lib.so"
, "libm.lib.so"
, "libretro.so"
, "vfs.lib.so"
]
}
}

View File

@ -0,0 +1,32 @@
let Genode = env:DHALL_GENODE
let frontend = ./retro_frontend/package.dhall
let Prelude = Genode.Prelude
let XML = Prelude.XML
let defaults = ./pkgDefaults.dhall
let frontendConfig =
{ vfs =
XML.text
''
<vfs>
<fs/>
<dir name="dev"> <log label="core"/> </dir>
</vfs>
''
, libc =
XML.text "<libc stdout=\"/dev/log\" stderr=\"/dev/log\"/>\n"
, defaultController =
Some ./keyboardJoypad.dhall
, game =
XML.text "<game/>"
}
in { runtime =
defaults.runtime ⫽ { config = frontend.Config.toXML frontendConfig }
, frontendConfig =
frontendConfig
}

View File

@ -0,0 +1,39 @@
let Genode = env:DHALL_GENODE
let frontend = ./retro_frontend/package.dhall
let Prelude = Genode.Prelude
let XML = Prelude.XML
let defaults = ./pkgDefaults.dhall
let frontendConfig =
{ vfs =
XML.text
''
<vfs>
<fs/>
<dir name="dev"> <log label="core"/> </dir>
</vfs>
''
, libc =
XML.text "<libc stdout=\"/dev/log\" stderr=\"/dev/log\"/>\n"
, defaultController =
Some
{ port =
0
, device =
3
, binds =
[] : List { genode : Text, libretro : Text }
}
, game =
XML.text "<game/>"
}
in { runtime =
defaults.runtime ⫽ { config = frontend.Config.toXML frontendConfig }
, frontendConfig =
frontendConfig
}

@ -1 +1 @@
Subproject commit 90e1d41b851cb812ab841344a21c4e61f5ff4232
Subproject commit 47aa190ab7a41db3f903e0ed93fac8d854cb7c40

View File

@ -1,4 +1,4 @@
TARGET_NAME = 240pSuite-SNES
TARGET_NAME = libretro-240pSuite-SNES
RAW_VERSION = 1.03
include_rules
@ -16,5 +16,8 @@ PKG_DEPENDS += \
_/src/retro_frontend \
_/raw/$(TARGET_NAME) \
: runtime |> !collect_pkg_runtime |>
: ./pkg.dhall |> !render_runtime |> {runtime}
include &(RAW_RULES)
: ./pkg.dhall |> !index_pkg |>

View File

@ -0,0 +1,40 @@
let defaults = ./../../pkgDefaults.dhall
let XML = (env:DHALL_GENODE).Prelude.XML
in { indexInfo =
"SNES tests"
, runtime =
defaults.runtime
⫽ { roms =
[ "240pSuite.sfc", "stdcxx.lib.so" ]
, config =
XML.text
''
<config>
<libc stdout="/dev/log" stderr="/dev/log"/>
<game/>
<vfs>
<rom name="240pSuite.sfc"/>
<dir name="dev"> <log label="core"/> </dir>
</vfs>
<default-controller port="0" device="1">
<map from="KEY_LEFT" to="LEFT"/>
<map from="KEY_RIGHT" to="RIGHT"/>
<map from="KEY_UP" to="UP"/>
<map from="KEY_DOWN" to="DOWN"/>
<map from="KEY_X" to="A"/>
<map from="KEY_Z" to="B"/>
<map from="KEY_S" to="X"/>
<map from="KEY_A" to="Y"/>
<map from="KEY_Q" to="L"/>
<map from="KEY_W" to="R"/>
<map from="KEY_ENTER" to="START"/>
<map from="KEY_RIGHTSHIFT" to="SELECT"/>
</default-controller>
</config>
''
}
}

View File

@ -1,44 +0,0 @@
<runtime ram="32M" caps="192" binary="retro_frontend">
<requires>
<audio_out/>
<nitpicker/>
<rm/>
</requires>
<content>
<rom label="240pSuite.sfc"/>
<rom label="libc.lib.so"/>
<rom label="libm.lib.so"/>
<rom label="libretro.so"/>
<rom label="retro_frontend"/>
<rom label="stdcxx.lib.so"/>
<rom label="vfs.lib.so"/>
</content>
<config>
<libc stdout="/dev/log" stderr="/dev/log"/>
<game/>
<vfs>
<rom name="240pSuite.sfc"/>
<dir name="dev"> <log label="core"/> </dir>
</vfs>
<default-controller port="0" device="1">
<map from="KEY_LEFT" to="LEFT"/>
<map from="KEY_RIGHT" to="RIGHT"/>
<map from="KEY_UP" to="UP"/>
<map from="KEY_DOWN" to="DOWN"/>
<map from="KEY_X" to="A"/>
<map from="KEY_Z" to="B"/>
<map from="KEY_S" to="X"/>
<map from="KEY_A" to="Y"/>
<map from="KEY_Q" to="L"/>
<map from="KEY_W" to="R"/>
<map from="KEY_ENTER" to="START"/>
<map from="KEY_RIGHTSHIFT" to="SELECT"/>
</default-controller>
</config>
</runtime>

View File

@ -1,4 +1,4 @@
TARGET_NAME = 240pee-NES
TARGET_NAME = libretro-240pee-NES
RAW_VERSION = 0.08.2
include_rules
@ -15,7 +15,7 @@ PKG_DEPENDS += \
_/src/retro_frontend \
_/raw/$(TARGET_NAME) \
: runtime |> !collect_pkg_runtime |>
: ./pkg.dhall |> !render_runtime |>
include &(RAW_RULES)
include &(PKG_RULES)

View File

@ -0,0 +1,38 @@
let Genode = env:DHALL_GENODE
let XML = Genode.Prelude.XML
let fceumm = ./../../cores/fceumm/pkg.dhall
in { indexInfo =
"SNES tests"
, runtime =
fceumm.runtime
⫽ { roms =
fceumm.runtime.roms # [ "240pSuite.sfc" ]
, config =
XML.text
''
<config>
<libc stdout="/dev/log" stderr="/dev/log"/>
<game/>
<vfs>
<rom name="240pee.nes"/>
<dir name="dev"> <log label="core"/> </dir>
</vfs>
<default-controller port="0" device="1">
<map from="KEY_LEFT" to="LEFT"/>
<map from="KEY_RIGHT" to="RIGHT"/>
<map from="KEY_UP" to="UP"/>
<map from="KEY_DOWN" to="DOWN"/>
<map from="KEY_X" to="A"/>
<map from="KEY_Z" to="B"/>
<map from="KEY_ENTER" to="START"/>
<map from="KEY_RIGHTSHIFT" to="SELECT"/>
</default-controller>
</config>
''
}
}

View File

@ -1,3 +1,3 @@
PKG_DEPENDS += ehmry/raw/topbench/0.38.h
: $(TUP_CWD)/runtime |> !collect_pkg_runtime |>
: $(TUP_CWD)/pkg.dhall |> !render_runtime |>
: |> !pkg |>

View File

@ -0,0 +1,44 @@
let Genode = env:DHALL_GENODE
let XML = (env:DHALL_GENODE).Prelude.XML
let require = Genode.Runtime.Require.require
let defaults = ./../../pkgDefaults.dhall
in { indexInfo =
"The Oldskool PC Benchmark - DOSBox"
, runtime =
defaults.runtime
⫽ { caps =
192
, ram =
Genode.units.MiB 96
, requires =
defaults.runtime.requires # [ require "report", require "rtc" ]
, roms =
[ "TOPBV38H.tar", "stdcxx.lib.so" ]
, config =
XML.text
''
<config ld_verbose="yes">
<game path="/dosbox.conf"/>
<libc stdout="/dev/log" stderr="/dev/log" rtc="/dev/rtc"/>
<vfs>
<inline name="dosbox.conf">
[autoexec]
mount c /drive_c
c:
TOPBENCH.EXE
</inline>
<dir name="drive_c">
<tar name="TOPBV38H.tar"/>
<fs/>
</dir>
<dir name="dev"> <log label="core"/> <rtc/> </dir>
</vfs>
<default-controller port="0" device="771"/>
</config>
''
}
}

31
manifest/Tupfile Normal file
View File

@ -0,0 +1,31 @@
ifeq (@(TUP_ARCH),x86_64)
DEPOT_ARCH = x86_64
endif
ifeq ($(DEPOT_ARCH),)
error unhandled TUP_ARCH @(TUP_ARCH)
endif
include_rules
: $(DEPOT_DIR)/<raw-archives> |> \
awk -F '/' 'BEGIN { print "{=}"} {print "//{"$3"={version=\""$4"\",owner=\"@(PUBLIC_USER)\"}}" }' $f \
<<< %<raw-archives> | dhall > %o\
|> raw.dhall {records}
: $(DEPOT_DIR)/<bin-archives> |> \
awk -F '/' 'BEGIN { print "{=}"} {print "//{"$3"={version=\""$4"\",owner=\"@(PUBLIC_USER)\"}}" }' $f <<< %<bin-archives> \
| dhall > %o\
|> bin.dhall {records}
SHORT_SUM = b2sum -l24
: $(DEPOT_DIR)/<pkg> |> \
echo '{=}' > %o; \
for d in `dirname %<pkg> | tr ' ' '\n' | sort -u`; do \
echo $d/`cat $d/.ARCHIVES $d/runtime | $(SHORT_SUM)` | awk -F '/' \
'{print "//{"$4"={version=\""substr($6,0,6)"\",owner=\"@(PUBLIC_USER)\"}}"}' >> %o; \
done \
|> pkg.dhall {records}
: | {records} |> !dhall <<< '{bin = { $(DEPOT_ARCH) = ./bin.dhall }, pkg = ./pkg.dhall, raw = ./raw.dhall }' > %o |> $(DEPOT_MANIFEST) $(PUBLIC_DIR)/<manifest>

1
manifest/alex-ab.dhall Normal file
View File

@ -0,0 +1 @@
{ bin = { x86_64 = { ram_block = "2019-02-25" } } }

69
manifest/ehmry.dhall Normal file
View File

@ -0,0 +1,69 @@
{ bin =
{ x86_64 =
{ block_shred =
"2019-03-31"
, libcrypto =
"2019-05-24"
, libmpg123 =
"2019-05-24"
, libpng =
"2019-05-24"
, libssh =
"2019-05-24"
, libssl =
"2019-05-24"
, menu_view =
"2019-05-24"
, mesa =
"2019-05-24"
, decorator =
"2019-05-24"
, mp3_audio_sink =
"2019-05-24"
, nic_bridge =
"2019-05-24"
, nit_fb =
"2019-05-24"
, noux =
"2019-05-24"
, ncurses =
"2019-05-24"
, rom_block =
"2019-04-05-a"
, sdl =
"2019-05-24"
, seoul-nova =
"2019-05-01-a"
, show_input =
"2019-05-24"
, ssh_client =
"2019-05-24"
, terminal =
"2019-05-24-a"
, vfs_audit =
"2019-04-20"
, vfs_jitterentropy =
"2019-05-24"
, vfs_lwip =
"2019-05-24"
, vfs_lxip =
"2019-05-24"
, window_layouter =
"2019-05-24"
, wm =
"2019-05-24"
}
}
, pkg =
{ audio_player =
"2019-05-15"
, avplay =
"2019-04-24"
, backdrop =
"2019-05-24"
, noux-system =
"2019-05-24"
, pdf_view =
"2019-05-17"
}
}

15
manifest/genodelabs.dhall Normal file
View File

@ -0,0 +1,15 @@
{ bin =
{ x86_64 =
{ base-nova =
"2019-05-26"
, libiconv =
"2019-05-26"
, stdcxx =
"2019-05-27"
, vbox5-nova =
"2019-05-28"
, zlib =
"2019-05-26"
}
}
}

5
manifest/nfeske.dhall Normal file
View File

@ -0,0 +1,5 @@
{ bin =
{ x86_64 =
{ expat = "2019-02-19", libc = "2019-06-24", vfs_ttf = "2019-06-20" }
}
}

View File

@ -5,7 +5,6 @@ let
let f = (import path);
in f (builtins.intersectAttrs (builtins.functionArgs f) (tool.nixpkgs // tool) );
hasSuffixNix = tool.hasSuffix ".nix";
dir = builtins.readDir ../ports;
in
builtins.listToAttrs (

35
ports/mpg123/Tupfile Normal file
View File

@ -0,0 +1,35 @@
TARGET_NAME = mpg123
LIBS += libc
include_rules
SOURCE_LINK = port-source
API_LINK = port-api
: |> $(NIX_BUILD) .. --out-link port \
--attr %d.source --attr %d.api |> $(SOURCE_LINK) $(API_LINK) {port}
: $(API_LINK) |> cp %f/pkg-config/%d.pc %o \
|> $(PKG_CONFIG_DIR)/%d.pc $(GENODE_DIR)/<pkg-config>
: libmpg123.symbols |> !abi_stub |>
INCLUDES += -I.
INCLUDES += -I$(SOURCE_LINK)/src/libmpg123
INCLUDES += -I$(SOURCE_LINK)/src/compat
INCLUDES += -I$(SOURCE_LINK)/src
INCLUDES += -I$(API_LINK)/include
ifeq (@(TUP_ARCH),x86_64)
DEFINES += -DOPT_X86_64
run ./port_rules.sh $(SOURCE_LINK) common.files x86_64.files
endif
ifeq (@(TUP_ARCH),arm)
DEFINES += -DOPT_ARM
run ./port_rules.sh $(SOURCE_LINK) common.files arm.files
endif
: {obj} |> !lib |> libmpg123.lib.so {bin}
: {bin} |> !collect_bin |>
include &(BIN_RULES)

1
ports/mpg123/arm.files Normal file
View File

@ -0,0 +1 @@
src/libmpg123/synth_arm.S

38
ports/mpg123/common.files Normal file
View File

@ -0,0 +1,38 @@
src/compat/compat.c
src/compat/compat_str.c
src/libmpg123/parse.c
src/libmpg123/layer1.c
src/libmpg123/synth_stereo_avx.S
src/libmpg123/feature.c
src/libmpg123/lfs_alias.c
src/libmpg123/synth_s32.c
src/libmpg123/dct64_avx.S
src/libmpg123/tabinit.c
src/libmpg123/dct64_i386.c
src/libmpg123/format.c
src/libmpg123/dct64_avx_float.S
src/libmpg123/dither.c
src/libmpg123/synth.c
src/libmpg123/synth_8bit.c
src/libmpg123/layer3.c
src/libmpg123/dct64.c
src/libmpg123/synth_stereo_avx_accurate.S
src/libmpg123/mpg123.h.in
src/libmpg123/icy.c
src/libmpg123/index.c
src/libmpg123/equalizer.c
src/libmpg123/readers.c
src/libmpg123/icy2utf8.c
src/libmpg123/stringbuf.c
src/libmpg123/synth_real.c
src/libmpg123/dct36_avx.S
src/libmpg123/testcpu.c
src/libmpg123/frame.c
src/libmpg123/id3.c
src/libmpg123/Makemodule.am
src/libmpg123/ntom.c
src/libmpg123/synth_stereo_avx_float.S
src/libmpg123/libmpg123.c
src/libmpg123/synth_stereo_avx_s32.S
src/libmpg123/layer2.c
src/libmpg123/optimize.c

48
ports/mpg123/config.h Normal file
View File

@ -0,0 +1,48 @@
#define ASMALIGN_BALIGN 1
#define CCALIGN 1
#define DYNAMIC_BUILD 1
#define FRAME_INDEX 1
#define GAPLESS 1
#define HAVE_ATOLL 1
#define HAVE_DIRENT_H 1
#define HAVE_DLCLOSE 1
#define HAVE_DLFCN_H 1
#define HAVE_DLOPEN 1
#define HAVE_DLSYM 1
#define HAVE_GETPAGESIZE 1
#define HAVE_GETUID 1
#define HAVE_INTTYPES_H 1
#define HAVE_LIBM 1
#define HAVE_LIMITS_H 1
#define HAVE_MEMORY_H 1
#define HAVE_RANDOM 1
#define HAVE_STDINT_H 1
#define HAVE_STDIO_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRERROR 1
#define HAVE_STRINGS_H 1
#define HAVE_STRING_H 1
#define HAVE_SYS_IOCTL_H 1
#define HAVE_SYS_PARAM_H 1
#define HAVE_SYS_RESOURCE_H 1
#define HAVE_SYS_SELECT_H 1
#define HAVE_SYS_SIGNAL_H 1
#define HAVE_SYS_SOUNDCARD_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_SYS_TIME_H 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_SYS_WAIT_H 1
#define HAVE_TERMIOS 1
#define HAVE_UNISTD_H 1
#define IEEE_FLOAT 1
#define INDEX_SIZE 1000
#define LFS_ALIAS_BITS 64
#define SIZEOF_INT32_T 4
#define SIZEOF_LONG 8
#define SIZEOF_OFF_T 8
#define SIZEOF_SIZE_T 8
#define SIZEOF_SSIZE_T 8
#define STDC_HEADERS 1
#define USE_MODULES 1
#define USE_NEW_HUFFTABLE 1
#define lfs_alias_t off_t

27
ports/mpg123/default.nix Normal file
View File

@ -0,0 +1,27 @@
{ preparePort, mpg123 }:
let
apiVersion = 44; # found in configure.ac
in
preparePort rec {
inherit (mpg123) name src;
outputs = [ "source" "api" ];
buildPhase =
''
mkdir -p $api/include $api/pkg-config
sed \
-e 's/@API_VERSION@/$(API_VERSION)/' \
-e '/@.*@/d' \
src/libmpg123/mpg123.h.in > $api/include/mpg123.h
cp src/libmpg123/fmt123.h $api/include
sed \
-e "s|@includedir@|$api/include|" \
-e 's/@PACKAGE_VERSION@/${(builtins.parseDrvName name).version}/' \
-e 's/^Libs:.*/Libs: -l:libmpg123.lib.so/' \
-e '/@/d' \
< libmpg123.pc.in > $api/pkg-config/mpg123.pc
'';
}

View File

@ -0,0 +1,115 @@
mpg123_add_string T
mpg123_add_substring T
mpg123_chomp_string T
mpg123_clip T
mpg123_close T
mpg123_copy_string T
mpg123_current_decoder T
mpg123_decode T
mpg123_decode_frame T
mpg123_decode_frame_64 T
mpg123_decoder T
mpg123_decoders T
mpg123_delete T
mpg123_delete_pars T
mpg123_enc_from_id3 T
mpg123_encodings T
mpg123_encsize T
mpg123_eq T
mpg123_errcode T
mpg123_exit T
mpg123_feature T
mpg123_feed T
mpg123_feedseek T
mpg123_feedseek_64 T
mpg123_fmt T
mpg123_fmt_all T
mpg123_fmt_none T
mpg123_fmt_support T
mpg123_format T
mpg123_format_all T
mpg123_format_none T
mpg123_format_support T
mpg123_framebyframe_decode T
mpg123_framebyframe_decode_64 T
mpg123_framebyframe_next T
mpg123_framedata T
mpg123_framelength T
mpg123_framelength_64 T
mpg123_framepos T
mpg123_framepos_64 T
mpg123_free_string T
mpg123_geteq T
mpg123_getformat T
mpg123_getformat2 T
mpg123_getpar T
mpg123_getparam T
mpg123_getstate T
mpg123_getvolume T
mpg123_grow_string T
mpg123_icy T
mpg123_icy2utf8 T
mpg123_id3 T
mpg123_index T
mpg123_index_64 T
mpg123_info T
mpg123_init T
mpg123_init_string T
mpg123_length T
mpg123_length_64 T
mpg123_meta_check T
mpg123_meta_free T
mpg123_new T
mpg123_new_pars T
mpg123_noise T
mpg123_open T
mpg123_open_64 T
mpg123_open_fd T
mpg123_open_fd_64 T
mpg123_open_feed T
mpg123_open_handle T
mpg123_open_handle_64 T
mpg123_outblock T
mpg123_par T
mpg123_param T
mpg123_parnew T
mpg123_plain_strerror T
mpg123_position T
mpg123_position_64 T
mpg123_rates T
mpg123_read T
mpg123_replace_buffer T
mpg123_replace_reader T
mpg123_replace_reader_64 T
mpg123_replace_reader_handle T
mpg123_replace_reader_handle_64 T
mpg123_reset_eq T
mpg123_resize_string T
mpg123_safe_buffer T
mpg123_scan T
mpg123_seek T
mpg123_seek_64 T
mpg123_seek_frame T
mpg123_seek_frame_64 T
mpg123_set_filesize T
mpg123_set_filesize_64 T
mpg123_set_index T
mpg123_set_index_64 T
mpg123_set_string T
mpg123_set_substring T
mpg123_spf T
mpg123_store_utf8 T
mpg123_strerror T
mpg123_strlen T
mpg123_supported_decoders T
mpg123_tell T
mpg123_tell_64 T
mpg123_tell_stream T
mpg123_tell_stream_64 T
mpg123_tellframe T
mpg123_tellframe_64 T
mpg123_timeframe T
mpg123_timeframe_64 T
mpg123_tpf T
mpg123_volume T
mpg123_volume_change T

16
ports/mpg123/port_rules.sh Executable file
View File

@ -0,0 +1,16 @@
#!/bin/sh
LINK=$1
shift
for LIST in $@
do
grep '\.c$' ${LIST} | while read f
do
echo ": {port} |> !cc_port ${LINK}/${f} |> ${f}.o {obj}"
done
grep '\.S$' ${LIST} | while read f
do
echo ": {port} |> !cc_port ${LINK}/${f} |> ${f}.o {obj}"
done
done

View File

@ -0,0 +1,5 @@
src/libmpg123/getcpuflags_x86_64.S
src/libmpg123/dct64_x86_64.S
src/libmpg123/synth_stereo_x86_64.S
src/libmpg123/synth_x86_64.S
src/libmpg123/dct36_x86_64.S

View File

@ -1,13 +1,16 @@
TARGET_NAME = backdrop
PKG_DEPENDS += \
$(PUBLIC_PKG_BACKDROP) \
@(PUBLIC_PKG_BACKDROP) \
_/raw/backdrop \
include_rules
: backdrop.png |> !collect_raw |>
: runtime |> !collect_pkg_runtime |>
: ./pkg.dhall |> !render_runtime |>
include &(RAW_RULES)
include &(PKG_RULES)
: ./pkg.dhall |> !index_pkg |>

View File

@ -0,0 +1,38 @@
let Genode = env:DHALL_GENODE
let XML = Genode.Prelude.XML
let service = λ(s : Text) → { service = s, label = None Text }
in { indexInfo =
"Desktop backdrop image"
, runtime =
Genode.Runtime.defaults
⫽ { ram =
Genode.units.MiB 64
, caps =
300
, binary =
"backdrop"
, requires =
[ service "nitpicker" ]
, roms =
[ "backdrop"
, "backdrop.png"
, "libc.lib.so"
, "libm.lib.so"
, "libpng.lib.so"
, "vfs.lib.so"
, "zlib.lib.so"
]
, config =
XML.text
''
<config>
<libc/>
<vfs> <rom name="backdrop.png"/> </vfs>
<image png="backdrop.png" scale="zoom"/>
</config>
''
}
}

View File

@ -1,21 +0,0 @@
<runtime ram="64M" caps="300" binary="backdrop" >
<requires> <nitpicker/> </requires>
<content>
<rom label="backdrop"/>
<rom label="backdrop.png"/>
<rom label="libc.lib.so"/>
<rom label="libm.lib.so"/>
<rom label="libpng.lib.so"/>
<rom label="vfs.lib.so"/>
<rom label="zlib.lib.so"/>
</content>
<config>
<libc/>
<vfs> <rom name="backdrop.png"/> </vfs>
<image png="backdrop.png" scale="zoom"/>
</config>
</runtime>

View File

@ -1,4 +1,4 @@
TARGET_NAME = ban.ai_multics
TARGET_NAME = ban_ai_multics
PKG_DEPENDS += \
@(PUBLIC_SRC_VFS) \

View File

@ -10,3 +10,5 @@ include_rules
: runtime |> !collect_pkg_runtime |>
: |> !pkg |>
: ./pkg.dhall |> !index_pkg |>

View File

@ -0,0 +1 @@
{ indexInfo = "Serve /depot/local over 9P" }

View File

@ -1,13 +1,9 @@
PKG_DEPENDS += \
ehmry/src/mp3_audio_sink/19.02 \
@(PUBLIC_SRC_LIBC) \
@(PUBLIC_SRC_LIBMPG123) \
@(PUBLIC_SRC_MP3_AUDIO_SINK) \
@(PUBLIC_SRC_VFS_LWIP) \
@(PUBLIC_SRC_ZLIB) \
_/src/icy_client \
_/src/init \
_/src/vfs \
_/src/icy_client \
: ../runtime.in |> sed 's|@STREAM_URL@|$(STREAM_URL)|' %f > %o |> runtime
: runtime |> !collect_pkg_runtime |>
: |> !pkg |>

View File

@ -1,3 +1,7 @@
TARGET_NAME = ifm1
STREAM_URL = http://radio.intergalactic.fm:80/1
include_rules
: ./pkg.dhall |> !render_runtime |> {runtime}
: |> !pkg |>
: ./pkg.dhall |> !index_pkg |>

View File

@ -0,0 +1,2 @@
../pkg.dhall "http://radio.intergalactic.fm:80/1"
∧ { indexInfo = "Intergalactic FM 1" }

View File

@ -1,3 +1,7 @@
TARGET_NAME = ifm2
STREAM_URL = http://radio.intergalactic.fm:80/2
include_rules
: ./pkg.dhall |> !render_runtime |> {runtime}
: |> !pkg |>
: ./pkg.dhall |> !index_pkg |>

View File

@ -0,0 +1,2 @@
../pkg.dhall "http://radio.intergalactic.fm:80/2"
∧ { indexInfo = "Intergalactic FM 2" }

View File

@ -1,3 +1,7 @@
TARGET_NAME = ifm3
STREAM_URL = http://radio.intergalactic.fm:80/3
include_rules
: ./pkg.dhall |> !render_runtime |> {runtime}
: |> !pkg |>
: ./pkg.dhall |> !index_pkg |>

View File

@ -0,0 +1,2 @@
../pkg.dhall "http://radio.intergalactic.fm:80/3"
∧ { indexInfo = "Intergalactic FM 3" }

View File

@ -0,0 +1,83 @@
let Genode = env:DHALL_GENODE
let XML = Genode.Prelude.XML
let service = λ(s : Text) → { service = s, label = None Text }
let config =
λ ( url
: Text
)
→ { ram =
Genode.units.MiB 32
, caps =
768
, requires =
[ service "audio_out"
, service "nic"
, service "report"
, service "rm"
, service "rtc"
]
, roms =
[ "icy_client"
, "init"
, "libc.lib.so"
, "libm.lib.so"
, "libmpg123.lib.so"
, "mp3_audio_sink"
, "vfs.lib.so"
, "vfs_lwip.lib.so"
, "zlib.lib.so"
]
, config =
XML.text
''
<config>
<parent-provides>
<service name="CPU"/>
<service name="LOG"/>
<service name="PD"/>
<service name="RM"/>
<service name="ROM"/>
<service name="Audio_out"/>
<service name="Timer"/>
<service name="Nic"/>
<service name="Report"/>
<service name="Rtc"/>
</parent-provides>
<start name="icy_client" caps="512">
<resource name="RAM" quantum="16M"/>
<config>
<stream url="${url}" dest="/terminal" report="yes"/>
<libc stderr="/log" stdout="/log" socket="/socket" rtc="/rtc" rng="/rtc"/>
<vfs>
<dir name="socket"> <lwip dhcp="yes"/> </dir>
<log/>
<rtc/>
<terminal/>
</vfs>
</config>
<route>
<any-service> <parent/> <any-child/> </any-service>
</route>
</start>
<start name="mp3_audio_sink" caps="256">
<resource name="RAM" quantum="8M"/>
<provides>
<service name="Terminal"/>
</provides>
<config>
<vfs> <null/> </vfs>
<libc stdout="/null" stderr="/null"/>
</config>
<route>
<any-service> <parent/> </any-service>
</route>
</start>
</config>
''
}
in λ(url : Text) → { runtime = Genode.Runtime.defaults // (config url) }

View File

@ -1,66 +0,0 @@
<runtime ram="32M" caps="768" binary="init">
<requires>
<audio_out/>
<nic/>
<report/>
<rm/>
</requires>
<config>
<parent-provides>
<service name="CPU"/>
<service name="LOG"/>
<service name="PD"/>
<service name="RM"/>
<service name="ROM"/>
<service name="Audio_out"/>
<service name="Timer"/>
<service name="Nic"/>
<service name="Report"/>
</parent-provides>
<start name="icy_client" caps="512">
<resource name="RAM" quantum="16M"/>
<config>
<stream url="@STREAM_URL@" dest="/terminal" report="yes"/>
<libc stderr="/log" stdout="/log" socket="/socket" rtc="/rtc"/>
<vfs>
<dir name="socket"> <lwip dhcp="yes"/> </dir>
<log/>
<terminal/>
<inline name="rtc">2001-01-01 00:01</inline>
</vfs>
</config>
<route>
<any-service> <parent/> <any-child/> </any-service>
</route>
</start>
<start name="mp3_audio_sink" caps="256">
<resource name="RAM" quantum="8M"/>
<provides>
<service name="Terminal"/>
</provides>
<config>
<vfs> <null/> </vfs>
<libc stdout="/null" stderr="/null"/>
</config>
<route>
<any-service> <parent/> </any-service>
</route>
</start>
</config>
<content>
<rom label="icy_client"/>
<rom label="init"/>
<rom label="libc.lib.so"/>
<rom label="libm.lib.so"/>
<rom label="libmpg123.lib.so"/>
<rom label="mp3_audio_sink"/>
<rom label="vfs.lib.so"/>
<rom label="vfs_lwip.lib.so"/>
<rom label="zlib.lib.so"/>
</content>
</runtime>

View File

@ -1,18 +1,20 @@
TARGET_NAME = noux-system
PKG_DEPENDS += \
@(PUBLIC_SRC_LIBC) \
@(PUBLIC_SRC_VFS) \
@(PUBLIC_SRC_INIT) \
@(PUBLIC_SRC_TERMINAL) \
@(PUBLIC_SRC_POSIX) \
@(PUBLIC_SRC_NOUX) \
@(PUBLIC_SRC_NCURSES) \
ehmry/src/bash-minimal/2019-05-24 \
ehmry/src/vim-minimal/2019-05-24 \
ehmry/src/coreutils-minimal/2019-05-24 \
ehmry/src/vim-minimal/2019-05-24 \
@(PUBLIC_SRC_LIBC) \
@(PUBLIC_SRC_NCURSES) \
@(PUBLIC_SRC_NOUX) \
@(PUBLIC_SRC_TERMINAL) \
_/src/posix \
_/src/init \
_/src/vfs \
include_rules
: runtime |> !collect_pkg_runtime |>
: ./pkg.dhall |> !render_runtime |>
: |> !pkg |>
: ./pkg.dhall |> !index_pkg |>

View File

@ -0,0 +1,118 @@
let Genode = env:DHALL_GENODE
let Prelude = Genode.Prelude
let XML = Prelude.XML
let service = λ(s : Text) → { service = s, label = None Text }
let serviceLabel = λ(s : Text) → λ(l : Text) → { service = s, label = Some l }
let fsService = λ(l : Text) → serviceLabel "file_system" l
in { indexInfo =
"Noux administration environment"
, runtime =
Genode.Runtime.defaults
⫽ { ram =
Genode.units.MiB 72
, caps =
1000
, requires =
[ fsService "config"
, fsService "report"
, fsService "target"
, fsService "fonts"
, service "nitpicker"
, serviceLabel "report" "clipboard"
, serviceLabel "rom" "clipboard"
]
, roms =
[ "libc.lib.so"
, "libm.lib.so"
, "init"
, "terminal"
, "noux"
, "libc_noux.lib.so"
, "posix.lib.so"
, "ncurses.lib.so"
, "bash-minimal.tar"
, "coreutils-minimal.tar"
, "vim-minimal.tar"
, "vfs.lib.so"
]
, config =
XML.text
''
<config>
<parent-provides>
<service name="ROM"/>
<service name="PD"/>
<service name="RM"/>
<service name="CPU"/>
<service name="LOG"/>
<service name="Timer"/>
<service name="File_system"/>
<service name="Nitpicker"/>
<service name="Report"/>
</parent-provides>
<default-route> <any-service> <parent/> <any-child/> </any-service> </default-route>
<default caps="100"/>
<start name="nit_fb">
<resource name="RAM" quantum="4M"/>
<provides> <service name="Framebuffer"/> <service name="Input"/> </provides>
<config xpos="10" ypos="10" initial_width="800" initial_height="600"/>
<route>
<service name="Nitpicker"> <parent label="terminal"/> </service>
<any-service> <parent/> </any-service>
</route>
</start>
<start name="terminal">
<resource name="RAM" quantum="4M"/>
<provides> <service name="Terminal"/> </provides>
<config copy="yes" paste="yes">
<vfs> <dir name="fonts"> <fs/> </dir> </vfs>
</config>
<route>
<service name="File_system"> <parent label="fonts"/> </service>
<service name="Report" label="clipboard"> <parent label="clipboard"/> </service>
<service name="ROM" label="clipboard"> <parent label="clipboard"/> </service>
<any-service> <parent/> <any-child/> </any-service>
</route>
</start>
<start name="noux" caps="500">
<resource name="RAM" quantum="60M" />
<exit propagate="yes"/>
<config>
<fstab>
<tar name="bash-minimal.tar" />
<tar name="coreutils-minimal.tar" />
<tar name="vim-minimal.tar" />
<dir name="dev"> <zero/> <null/> </dir>
<dir name="rw"> <fs label="target"/> </dir>
<dir name="report"> <fs label="report"/> </dir>
<dir name="config"> <fs label="config"/> </dir>
<dir name="tmp"> <ram /> </dir>
</fstab>
<start name="/bin/bash">
<env name="TERM" value="screen" />
<env name="PS1" value="noux:$PWD> " />
</start>
</config>
<route>
<service name="File_system" label="target"> <parent label="target"/> </service>
<service name="File_system" label="config"> <parent label="config"/> </service>
<service name="File_system" label="report"> <parent label="report"/> </service>
<service name="Terminal"> <child name="terminal"/> </service>
<any-service> <parent/> </any-service>
</route>
</start>
</config>
''
}
}

View File

@ -1,103 +0,0 @@
<runtime ram="72M" caps="1000" binary="init" config="noux-system.config">
<requires>
<file_system label="config"/>
<file_system label="report"/>
<file_system label="target"/>
<file_system label="fonts"/>
<nitpicker/>
<rom label="vimrc"/>
</requires>
<content>
<rom label="libc.lib.so"/>
<rom label="libm.lib.so"/>
<rom label="init"/>
<rom label="terminal"/>
<rom label="noux"/>
<rom label="libc_noux.lib.so"/>
<rom label="posix.lib.so"/>
<rom label="ncurses.lib.so"/>
<rom label="bash-minimal.tar"/>
<rom label="coreutils-minimal.tar"/>
<rom label="vim-minimal.tar"/>
<rom label="vfs.lib.so"/>
</content>
<config>
<parent-provides>
<service name="ROM"/>
<service name="PD"/>
<service name="RM"/>
<service name="CPU"/>
<service name="LOG"/>
<service name="Timer"/>
<service name="File_system"/>
<service name="Nitpicker"/>
</parent-provides>
<default-route> <any-service> <parent/> <any-child/> </any-service> </default-route>
<default caps="100"/>
<start name="terminal">
<resource name="RAM" quantum="4M"/>
<provides> <service name="Terminal"/> </provides>
<config initial_columns="120" initial_rows="36">
<!-- srcery color scheme -->
<color index="0x0" bg="#1C1B19"/>
<color index="0x1" bg="#EF2F27"/>
<color index="0x2" bg="#519F50"/>
<color index="0x3" bg="#FBB829"/>
<color index="0x4" bg="#2C78BF"/>
<color index="0x5" bg="#E02C6D"/>
<color index="0x6" bg="#0AAEB3"/>
<color index="0x7" bg="#918175"/>
<color index="0x8" bg="#2D2C29"/>
<color index="0x9" bg="#F75341"/>
<color index="0xa" bg="#98BC37"/>
<color index="0xb" bg="#FED06E"/>
<color index="0xc" bg="#68A8E4"/>
<color index="0xd" bg="#FF5C8F"/>
<color index="0xe" bg="#53FDE9"/>
<color index="0xf" bg="#FCE8C3"/>
<vfs> <dir name="fonts"> <fs/> </dir> </vfs>
</config>
<route>
<service name="File_system"> <parent label="fonts"/> </service>
<any-service> <parent/> <any-child/> </any-service>
</route>
</start>
<start name="noux" caps="500">
<resource name="RAM" quantum="60M" />
<exit propagate="yes"/>
<config>
<fstab>
<tar name="bash-minimal.tar" />
<tar name="coreutils-minimal.tar" />
<tar name="vim-minimal.tar" />
<dir name="dev"> <zero/> <null/> </dir>
<dir name="rw"> <fs label="target"/> </dir>
<dir name="report"> <fs label="report"/> </dir>
<dir name="config"> <fs label="config"/> </dir>
<dir name="tmp"> <ram /> </dir>
<dir name="share"> <dir name="vim"> <rom name="vimrc"/> </dir> </dir>
</fstab>
<start name="/bin/bash">
<env name="TERM" value="screen" />
<env name="PS1" value="noux:$PWD> " />
</start>
</config>
<route>
<service name="File_system" label="target"> <parent label="target"/> </service>
<service name="File_system" label="config"> <parent label="config"/> </service>
<service name="File_system" label="report"> <parent label="report"/> </service>
<service name="ROM" label="vimrc"> <parent label="vimrc"/> </service>
<service name="Terminal"> <child name="terminal"/> </service>
<any-service> <parent/> </any-service>
</route>
</start>
</config>
</runtime>

View File

@ -0,0 +1,12 @@
TARGET_NAME = mp3_audio_sink
LIBS += mpg123 libc libm genode-gems
include_rules
INCLUDES += -I../cached_fs_rom
: foreach *.cc |> !cxx |> %B.o {obj}
: {obj} | |> !prg |> {bin}
: {bin} |> !collect_bin |>
include &(BIN_RULES)

View File

@ -0,0 +1,352 @@
/*
* \brief MP3 audio decoder
* \author Emery Hemingway
* \date 2018-03-24
*/
/*
* Copyright (C) 2018 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU Affero General Public License version 3.
*/
/*
* TODO:
* - Metadata report
* - Configure the mpg123 volume control and equalizer
* - Optimize buffer sizes
*/
/* Genode includes */
#include <gems/magic_ring_buffer.h>
#include <os/static_root.h>
#include <libc/component.h>
#include <audio_out_session/connection.h>
#include <terminal_session/connection.h>
#include <base/attached_rom_dataspace.h>
#include <base/attached_ram_dataspace.h>
#include <base/sleep.h>
/* Mpg123 includes */
#include <stdlib.h>
#include <sys/types.h>
#include <mpg123.h>
namespace Mp3_audio_sink {
enum { LEFT, RIGHT, NUM_CHANNELS };
enum {
FEED_POOL_SIZE = 2,
CLIENT_BUFFER_SIZE = 1 << 14, /* 16 KiB */
};
enum {
AUDIO_OUT_BUFFER_SIZE = NUM_CHANNELS
* Audio_out::QUEUE_SIZE
* Audio_out::PERIOD
* Audio_out::SAMPLE_SIZE
};
using namespace Genode;
struct Decoder;
class Terminal_component;
struct Main;
}
struct Mp3_audio_sink::Decoder
{
template <typename FUNC>
static void for_each_channel(FUNC const &func) {
for (int i = 0; i < NUM_CHANNELS; ++i) func(i); }
Genode::Env &_env;
Attached_rom_dataspace _config_rom { _env, "config" };
Audio_out::Connection _out_left { _env, "left", true, true };
Audio_out::Connection _out_right { _env, "right", false, false };
Audio_out::Connection *_out[NUM_CHANNELS];
void die_mpg123(mpg123_handle *mh, char const *msg)
{
int code = mpg123_errcode(mh);
Genode::error(msg, ", ", mpg123_strerror(mh));
mpg123_close(mh);
mpg123_delete(mh);
mpg123_exit();
_env.parent().exit(code);
Genode::sleep_forever();
}
mpg123_handle *create_mpg123_handle()
{
mpg123_handle *mh = NULL;
int err = mpg123_init();
if(err != MPG123_OK || (mh = mpg123_new(NULL, &err)) == NULL)
Genode::error("Mpg123 setup failed, ", mpg123_plain_strerror(err));
mpg123_param(mh, MPG123_FEEDPOOL, FEED_POOL_SIZE, 0);
mpg123_param(mh, MPG123_FEEDBUFFER, CLIENT_BUFFER_SIZE, 0);
/* Set mpg123 output format to match Audio_out exactly */
mpg123_param(mh, MPG123_FORCE_RATE,
Audio_out::SAMPLE_RATE, Audio_out::SAMPLE_RATE);
mpg123_format_none(mh);
if (mpg123_format(mh, Audio_out::SAMPLE_RATE,
MPG123_STEREO, MPG123_ENC_FLOAT_32) != MPG123_OK)
die_mpg123(mh, "Audio_out format is unsupported");
if (mpg123_open_feed(mh) != MPG123_OK)
die_mpg123(mh, "mpg123 feeder mode failed");
return mh;
}
mpg123_handle *_mh = create_mpg123_handle();
/* last error code logged */
int _mh_err = MPG123_OK;
/**
* Use half of the available RAM as buffer
*/
size_t _pcm_buffer_size()
{
size_t n = _env.pd().avail_ram().value / 2;
if (n > (1<<20))
log("internal buffer size is ", n>>20, "MiB");
else if (n > (1<<10))
log("internal buffer size is ", n>>10, "KiB");
else
log("internal buffer size is ", n, " bytes");
return n;
}
Magic_ring_buffer<float> _pcm { _env, _pcm_buffer_size() };
void _log_error()
{
int code = mpg123_errcode(_mh);
if (code != MPG123_OK && _mh_err != code) {
_mh_err = code;
error(mpg123_plain_strerror(code));
}
}
Genode::size_t feedbuffer_size()
{
long value = 0;
double fvalue = 0;
if (mpg123_getparam(_mh, MPG123_FEEDBUFFER, &value, &fvalue))
die_mpg123(_mh, "failed to get feed buffer size");
return value;
}
void submit_audio();
/**
* Process client data, blocks until all data is consumed.
*/
void process(unsigned char const *src, size_t num_bytes)
{
/* TODO: patch mpgg123 not to use stdio for printing errors */
Libc::with_libc([&] () {
/* feed client data into mpg123 buffer */
if (mpg123_feed(_mh, src, num_bytes))
die_mpg123(_mh, "failed to feed");
::off_t num = 0;
unsigned char *audio = nullptr;
size_t bytes = 0;
while (mpg123_decode_frame(_mh, &num, &audio, &bytes) == MPG123_OK) {
Genode::size_t const samples = bytes / Audio_out::SAMPLE_SIZE;
while (_pcm.write_avail() < samples) {
/* submit audio blocks for packet allocation */
submit_audio();
}
Genode::memcpy(_pcm.write_addr(), audio, bytes);
_pcm.fill(samples);
}
if (mpg123_errcode(_mh) != MPG123_ERR_READER
|| mpg123_errcode(_mh) != MPG123_OK)
_log_error();
});
}
Io_signal_handler<Decoder> _progress_handler {
_env.ep(), *this, &Decoder::submit_audio };
Signal_handler<Decoder> _config_handler {
_env.ep(), *this, &Decoder::_handle_config };
void _handle_config()
{
_config_rom.update();
Xml_node const config = _config_rom.xml();
enum { EQ_COUNT = 32 };
mpg123_reset_eq(_mh);
config.for_each_sub_node("eq", [&] (Xml_node const &node) {
unsigned band = node.attribute_value("band", 32U);
double value = node.attribute_value("value", 0.0);
if (band < EQ_COUNT && value != 0.0) {
mpg123_eq(_mh, MPG123_LR , band, value);
log("EQ ", band, ": ", mpg123_geteq(_mh, MPG123_LR , band));
}
});
double volume = 0.5;
config.for_each_sub_node("volume", [&] (Xml_node const &node) {
volume = node.attribute_value("linear", volume); });
mpg123_volume(_mh, 0.5);
}
Decoder(Genode::Env &env) : _env(env)
{
_out[LEFT] = &_out_left;
_out[RIGHT] = &_out_right;
_out_left.progress_sigh(_progress_handler);
_config_rom.sigh(_config_handler);
_handle_config();
}
};
void Mp3_audio_sink::Decoder::submit_audio()
{
using namespace Audio_out;
enum { STEREO_PERIOD = Audio_out::PERIOD*NUM_CHANNELS };
if (_out_left.stream()->empty()) {
for_each_channel([&] (int const c) {
_out[c]->start(); });
log("Audio_out streams started");
}
while (_pcm.read_avail() > STEREO_PERIOD) {
Audio_out::Packet *p[NUM_CHANNELS];
while (true) {
try { p[LEFT] = _out[LEFT]->stream()->alloc(); break; }
catch (Audio_out::Stream::Alloc_failed) {
_out[LEFT]->wait_for_alloc(); }
}
unsigned const ppos = _out[LEFT]->stream()->packet_position(p[LEFT]);
p[RIGHT] = _out[RIGHT]->stream()->get(ppos);
float const *content = _pcm.read_addr();
/* copy channel contents into sessions */
for (unsigned i = 0; i < STEREO_PERIOD; i += NUM_CHANNELS) {
for_each_channel([&] (int const c) {
p[c]->content()[i/NUM_CHANNELS] = content[i+c]; });
}
for_each_channel([&] (int const c) {
_out[c]->submit(p[c]); });
_pcm.drain(STEREO_PERIOD);
}
if (_out_left.stream()->empty()) {
log("Audio_out queue underrun, stopping stream");
for_each_channel([&] (int const c) {
_out[c]->stop(); });
}
}
class Mp3_audio_sink::Terminal_component :
public Rpc_object<Terminal::Session, Terminal_component>
{
private:
Decoder &_decoder;
Genode::Attached_ram_dataspace _io_buffer;
public:
Terminal_component(Genode::Env &env, Decoder &decoder)
:
_decoder(decoder),
_io_buffer(env.pd(), env.rm(), _decoder.feedbuffer_size())
{ }
/********************************
** Terminal session interface **
********************************/
Genode::Dataspace_capability _dataspace() {
return _io_buffer.cap(); }
Size size() { return Size(0, 0); }
bool avail() { return false; }
Genode::size_t read(void *, Genode::size_t) { return 0; }
Genode::size_t _read(Genode::size_t dst_len) { return 0; }
Genode::size_t write(void const *, Genode::size_t) { return 0; }
Genode::size_t _write(Genode::size_t num_bytes)
{
/* sanitize argument */
num_bytes = Genode::min(num_bytes, _io_buffer.size());
/* copy to decoder */
_decoder.process(
_io_buffer.local_addr<unsigned char>(), num_bytes);
return num_bytes;
}
void connected_sigh(Genode::Signal_context_capability cap) {
Genode::Signal_transmitter(cap).submit(); }
void read_avail_sigh(Genode::Signal_context_capability) { }
void size_changed_sigh(Genode::Signal_context_capability) { }
};
struct Mp3_audio_sink::Main
{
Genode::Env &_env;
Decoder _decoder { _env };
Terminal_component _terminal { _env, _decoder };
Static_root<Terminal::Session> _terminal_root {
_env.ep().manage(_terminal) };
Main(Libc::Env &env) : _env(env)
{
env.parent().announce(env.ep().manage(_terminal_root));
}
};
/***************
** Component **
***************/
void Libc::Component::construct(Libc::Env &env) {
static Mp3_audio_sink::Main _main(env); }

View File

@ -7,7 +7,10 @@ include_rules
: foreach *.cc |> !cxx |> %B.o {objs}
: {objs} |> !prg |> %d {binary}
: {binary} |> !collect_bin |>
: runtime |> !collect_pkg_runtime |>
: ./pkg.dhall |> !render_runtime |> {runtime}
include &(BIN_RULES)
include &(PKG_RULES)
: ./pkg.dhall |> !index_pkg |>

25
src/nic_bus/pkg.dhall Normal file
View File

@ -0,0 +1,25 @@
let Genode = env:DHALL_GENODE
let Prelude = Genode.Prelude
let XML = Prelude.XML
in { indexInfo =
"Switched ethernet bus"
, runtime =
{ ram =
Genode.units.MiB 4
, caps =
96
, binary =
"nic_bus"
, provides =
[ "nic" ]
, requires =
[] : List { label : Optional Text, service : Text }
, roms =
[ "nic_bus" ]
, config =
XML.text "<config><default-policy/></config>"
}
}

View File

@ -1,5 +0,0 @@
<runtime ram="4M" caps="96" binary="nic_bus">
<provides> <nic/> </provides>
<content> <rom label="nic_bus"/> </content>
<config ld_verbose="yes"> <default-policy/></config>
</runtime>

View File

@ -18,3 +18,5 @@ PKG_DEPENDS += \
: runtime |> !collect_pkg_runtime |>
include &(PKG_RULES)
: ./pkg.dhall |> !index_pkg |>

38
src/show_input/pkg.dhall Normal file
View File

@ -0,0 +1,38 @@
let Genode = env:DHALL_GENODE
let Prelude = Genode.Prelude
let XML = Prelude.XML
let service = λ(s : Text) → { service = s, label = None Text }
let serviceLabel = λ(s : Text) → λ(l : Text) → { service = s, label = Some l }
in { indexInfo =
"Nitpicker input event debugger"
, runtime =
Genode.Runtime.defaults
⫽ { ram =
Genode.units.MiB 12
, caps =
256
, binary =
"show_input"
, requires =
[ serviceLabel "fs" "fonts", service "nitpicker" ]
, roms =
[ "show_input", "vfs.lib.so" ]
, config =
XML.text
''
<config>
<vfs>
<dir name="fonts">
<fs label="fonts"/>
</dir>
</vfs>
</config>
''
}
}

View File

@ -1,62 +0,0 @@
include_rules
export SYSLINUX
BOOT_MODULES = \
config \
$(GENODE_DIR)/repos/os/src/init/init \
$(GENODE_DIR)/repos/base/src/test/log/test-log \
ifeq (@(TUP_ARCH),i386)
ADDR_TYPE = .long
endif
ifeq (@(TUP_ARCH),x86_64)
ADDR_TYPE = .quad
endif
AWK_IT = awk -v RS=" " -v ADDR_TYPE="$(ADDR_TYPE)"
: $(BOOT_MODULES) \
|> \
echo -n %f | $(AWK_IT) -f a.awk >> %o; \
echo -n %f | $(AWK_IT) -f b.awk >> %o; \
echo -n %f | $(AWK_IT) -f c.awk >> %o; \
|> modules.s
: modules.s | $(BOOT_MODULES) |> $(CC) $(CC_MARCH) -c %f -o %o |> boot_modules.o
LINK_ADDRESS = 0x01000000
: boot_modules.o | $(GENODE_DIR)/repos/base-nova/<core> \
|> \
$(CXX) $(CC_MARCH) -nostdlib \
-Wl,-T -Wl,$(GENODE_DIR)/repos/base/src/ld/genode.ld \
-Wl,-z -Wl,max-page-size=0x1000 \
-Wl,-Ttext=$(LINK_ADDRESS) -Wl,-gc-sections \
-Wl,-nostdlib \
-Wl,--whole-archive -Wl,--start-group \
%<core> %f \
-Wl,--no-whole-archive \
-Wl,--end-group \
`$(CXX) $(CC_MARCH) -print-libgcc-file-name` \
-o %o; \
strip %o; \
|> image.elf
: $(GENODE_DIR)/repos/base-nova/src/NOVA/build/hypervisor-x86_64 image.elf |> \
mkdir -p tmp/syslinux; \
cp \
$SYSLINUX/share/syslinux/isolinux.bin \
$SYSLINUX/share/syslinux/ldlinux.c32 \
$SYSLINUX/share/syslinux/libcom32.c32 \
$SYSLINUX/share/syslinux/mboot.c32 \
isolinux.cfg \
tmp/syslinux; \
cp %f tmp; \
chmod -R 777 tmp; \
mkisofs -o %o \
-b syslinux/isolinux.bin -c syslinux/boot.cat \
-no-emul-boot -boot-load-size 4 -boot-info-table \
-iso-level 2 \
tmp; \
rm -r tmp; \
|> output.iso

View File

@ -2,4 +2,4 @@ SERIAL
DEFAULT 0
LABEL 0
KERNEL mboot.c32
APPEND /hypervisor_x86_64 iommu novpid serial --- /image.elf
APPEND /hypervisor_x86_64 iommu novpid serial --- /image_elf.gz

@ -1 +1 @@
Subproject commit c1cf7c9ad6d43a35b1f28f5f7ebe1472bf293585
Subproject commit b15148c7283a278ee3fbfeda34a6a34a39ad761c