diff --git a/.gitmodules b/.gitmodules index 3c14426..b863d47 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,21 +1,3 @@ -[submodule "submodules/musicbrainz_playlist_generator"] - path = nim/musicbrainz_playlist_generator - url = git://depot.h4ck.me/srv/git/musicbrainz_playlist_generator -[submodule "nimble/icy_client"] - path = nim/icy_client - url = git://depot.h4ck.me/srv/git/icy_client -[submodule "nim-genode"] - path = nim/nim-genode - url = git://depot.h4ck.me/srv/git/nim-genode -[submodule "nimble/imap_report"] - path = nim/imap_report - url = git@github.com:ehmry/imap_report.git -[submodule "nimble/blobsets"] - path = nim/blobsets - url = git://depot.h4ck.me/srv/git/blobsets -[submodule "nimble/ninep"] - path = nim/ninep - url = git://depot.h4ck.me/srv/git/ninep [submodule "libretro/libretro-common"] path = libretro/libretro-common url = https://github.com/libretro/libretro-common.git @@ -61,9 +43,6 @@ [submodule "libretro/cores/dinothawr/core"] path = libretro/cores/dinothawr/core url = https://github.com/libretro/Dinothawr -[submodule "nimble/nim-monero"] - path = nim/nim-monero - url = git://depot.h4ck.me/srv/git/nim-monero [submodule "libretro/cores/scummvm/upstream"] path = libretro/cores/scummvm/upstream url = https://github.com/libretro/scummvm.git @@ -73,18 +52,6 @@ [submodule "libretro/cores/bluemsx/upstream"] path = libretro/cores/bluemsx/upstream url = git@github.com:ehmry/blueMSX-libretro.git -[submodule "nimble/fetch_and_copy"] - path = nim/fetch_and_copy - url = git://depot.h4ck.me/srv/git/fetch_and_copy. -[submodule "nimble/nim"] - path = nim/nim - url = https://github.com/ehmry/nim.git -[submodule "nimble/spry_genode"] - path = nim/spry_genode - url = git@github.com:ehmry/spry_genode.git -[submodule "nimble/carn"] - path = nim/carn_layouter - url = git://depot.h4ck.me/srv/git/carn_layouter [submodule "libretro/bios/cbios-cbios"] path = libretro/bios/cbios-cbios url = https://git.code.sf.net/p/cbios/cbios @@ -94,18 +61,6 @@ [submodule "libretro/cores/dosbox-svn/upstream"] path = libretro/cores/dosbox-svn/upstream url = https://github.com/libretro/dosbox-svn.git -[submodule "nim/xspf_view"] - path = nim/xspf_view - url = git://depot.h4ck.me/srv/git/xspf_view -[submodule "upstream"] - path = upstream - url = git@github.com:ehmry/genode.git -[submodule "nim/blobbot"] - path = nim/blobbot - url = git://depot.h4ck.me/srv/git/blobbot [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 diff --git a/README.md b/README.md deleted file mode 100644 index eaf5e2b..0000000 --- a/README.md +++ /dev/null @@ -1,7 +0,0 @@ -![UNDER CONSTRUCTION](.underconstruction.gif) - -This is a super-repository containing an experimental [Tup](http://gittup.org/tup) build -system and submodules containing Genode components and runtime metadata. - -See http://github.com/ehmry/genode-tup-super for a super-repo skeleton, please -forward any pull requests for the build-system there. diff --git a/Tupfile b/Tupfile deleted file mode 100644 index 621212e..0000000 --- a/Tupfile +++ /dev/null @@ -1,67 +0,0 @@ -.gitignore -include_rules - -ifndef SCULPT_VERSION -error CONFIG_SCULPT_VERSION is undefined -endif - -ifndef PUBLIC_USER -error CONFIG_PUBLIC_USER is undefined -endif - -SHORT_SUM = b2sum -l24 - -: $(DEPOT_DIR)/ $(DEPOT_DIR)/ |> \ - for f in % %; do \ - awk -F '/' '{print "s|local/"$2"/"$3"/current|@(PUBLIC_USER)/"$2"/"$3"/"$4"|"}' $f >> %o; done; \ -|> $(VERSIONS_SED_FILE) - # Generate a listing of all raw archives - -: $(DEPOT_DIR)/ |> \ - touch %o; \ - for f in %; do cat $f >> %o; done; \ -|> $(RAW_LISTING) - # Generate a listing of all raw archives - -: $(DEPOT_DIR)/ |> \ - for f in %; do tail -n1 $f >> %o; done; \ -|> $(BIN_LISTING) - # Generate a listing of all binary archives - -: $(DEPOT_DIR)/ |> ^ generate package version sed script^ \ - for d in `dirname % | 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 \ -|> $(PKG_SED_FILE) - # Generate sed commands for replacing package versions - -: $(DEPOT_DIR)/ $(DEPOT_DIR)/ $(PKG_SED_FILE) |> \ - ^ generate public makefile^ \ - echo PUBLIC_USER=@(PUBLIC_USER) >> %o; \ - echo PUBLIC_ARCH=@(TUP_ARCH) >> %o; \ - echo "all: public/@(PUBLIC_USER)/index/@(SCULPT_VERSION).xz.sig" >> %o; \ - echo %%.xz.sig: %%.xz >> %o; \ - echo " @echo sign \$<" >> %o; \ - echo " @gpg --detach-sign --digest-algo SHA256 --no-tty --local-user @(PUBLIC_KEY) < \$< > tmp" >> %o; \ - echo " @mv tmp \$@" >> %o; \ - for f in %; do \ - awk -F '/' -f errata/raw.mk.awk $f >> %o; done; \ - for f in %; do \ - awk -F '/' -f errata/bin.mk.awk $f >> %o; done; \ - awk -F '/' -f errata/pkg.mk.awk $(PKG_SED_FILE) >> %o; \ -|> Makefile - # Generate the makefile for creating signed package tarballs - -AWK_RUNTIME_PATH = awk -v RS=' ' -F '/' \ - '/runtime/ {print " "}' - -: $(DEPOT_DIR)/ |> ^ generate local index^ \ - echo '' > %o; \ - echo % | $(AWK_RUNTIME_PATH) | sort >> %o; \ - echo '' >> %o |> $(DEPOT_DIR)/index/@(SCULPT_VERSION) - # Generate the depot index file - -: index.dhall | $(DEPOT_DIR)/index/ |> \ - !dhall text < %f | xmllint --format - | xz > %o \ -|> public/@(PUBLIC_USER)/index/@(SCULPT_VERSION).xz diff --git a/configs/arm_v8.config b/configs/arm_v8.config deleted file mode 100644 index fbebf7d..0000000 --- a/configs/arm_v8.config +++ /dev/null @@ -1,12 +0,0 @@ -CONFIG_TUP_ARCH=arm64 -CONFIG_TOOL_CHAIN_PREFIX=genode-aarch64- - -CONFIG_CC_WRAPPER=ccache -CONFIG_CXX_WRAPPER=ccache - -CONFIG_OFFLINE= -CONFIG_NO_NETWORK= - -CONFIG_SCULPT_VERSION=19.07 -CONFIG_PUBLIC_USER=ehmry -CONFIG_PUBLIC_KEY=6E10414EE7160781F5FEE8FFB14D043A26B3D2C7 diff --git a/configs/i386.config b/configs/i386.config deleted file mode 100644 index fa6fec1..0000000 --- a/configs/i386.config +++ /dev/null @@ -1,15 +0,0 @@ -CONFIG_TUP_ARCH=x86_64 -CONFIG_x86= -CONFIG_TOOL_CHAIN_PREFIX=genode-x86- - -CONFIG_CC_WRAPPER=ccache -CONFIG_CXX_WRAPPER=ccache - -CONFIG_OFFLINE= -CONFIG_NO_NETWORK= - -CONFIG_BUILD_NOVA=y - -CONFIG_SCULPT_VERSION=19.07 -CONFIG_PUBLIC_USER=ehmry -CONFIG_PUBLIC_KEY=6E10414EE7160781F5FEE8FFB14D043A26B3D2C7 diff --git a/configs/x86_64.config b/configs/x86_64.config deleted file mode 100644 index 304fb22..0000000 --- a/configs/x86_64.config +++ /dev/null @@ -1,62 +0,0 @@ -CONFIG_TUP_ARCH=x86_64 -CONFIG_x86= -CONFIG_TOOL_CHAIN_PREFIX=genode-x86- - -CONFIG_CC_WRAPPER=ccache -CONFIG_CXX_WRAPPER=ccache - -CONFIG_OFFLINE= - -CONFIG_BUILD_NOVA=y - -CONFIG_SCULPT_VERSION=19.07 -CONFIG_PUBLIC_USER=ehmry -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=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 - -CONFIG_PUBLIC_SRC_BASE_NOVA=genodelabs/src/base-nova/2019-05-26 -CONFIG_PUBLIC_SRC_BLOCK_SHRED=ehmry/src/block_shred/2019-03-31 -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=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 -CONFIG_PUBLIC_SRC_LIBPNG=ehmry/src/libpng/2019-05-24 -CONFIG_PUBLIC_SRC_LIBSSH=ehmry/src/libssh/2019-05-24 -CONFIG_PUBLIC_SRC_LIBSSL=ehmry/src/libssl/2019-05-24 -CONFIG_PUBLIC_SRC_MENU_VIEW=ehmry/src/menu_view/2019-05-24 -CONFIG_PUBLIC_SRC_MESA=ehmry/src/mesa/2019-05-24 -CONFIG_PUBLIC_SRC_MOTIF_DECORATOR=ehmry/src/decorator/2019-05-24 -CONFIG_PUBLIC_SRC_MP3_AUDIO_SINK=ehmry/src/mp3_audio_sink/2019-05-24 -CONFIG_PUBLIC_SRC_NIC_BRIDGE=ehmry/src/nic_bridge/2019-05-24 -CONFIG_PUBLIC_SRC_NIT_FB=ehmry/src/nit_fb/2019-05-24 -CONFIG_PUBLIC_SRC_NOUX=ehmry/src/noux/2019-05-24 -CONFIG_PUBLIC_SRC_NCURSES=ehmry/src/ncurses/2019-05-24 -CONFIG_PUBLIC_SRC_POSIX=_/src/posix -CONFIG_PUBLIC_SRC_RAM_BLOCK=alex-ab/src/ram_block/2019-02-25 -CONFIG_PUBLIC_SRC_REPORT_ROM=_/src/report_rom -CONFIG_PUBLIC_SRC_ROM_BLOCK=ehmry/src/rom_block/2019-04-05-a -CONFIG_PUBLIC_SRC_SDL=ehmry/src/sdl/2019-05-24 -CONFIG_PUBLIC_SRC_SEOUL_NOVA=ehmry/src/seoul-nova/2019-05-01-a -CONFIG_PUBLIC_SRC_SHOW_INPUT=ehmry/src/show_input/2019-05-24 -CONFIG_PUBLIC_SRC_SSH_CLIENT=ehmry/src/ssh_client/2019-05-24 -CONFIG_PUBLIC_SRC_STDCXX=genodelabs/src/stdcxx/2019-05-27 -CONFIG_PUBLIC_SRC_TERMINAL=ehmry/src/terminal/2019-05-24-a -CONFIG_PUBLIC_SRC_VBOX_NOVA=genodelabs/src/vbox5-nova/2019-05-28 -CONFIG_PUBLIC_SRC_VFS_AUDIT=ehmry/src/vfs_audit/2019-04-20 -CONFIG_PUBLIC_SRC_VFS=_/src/vfs -CONFIG_PUBLIC_SRC_VFS_JITTERENTROPY=ehmry/src/vfs_jitterentropy/2019-05-24 -CONFIG_PUBLIC_SRC_VFS_LWIP=ehmry/src/vfs_lwip/2019-05-24 -CONFIG_PUBLIC_SRC_VFS_LXIP=ehmry/src/vfs_lxip/2019-05-24 -CONFIG_PUBLIC_SRC_VFS_TTF=nfeske/src/vfs_ttf/2019-06-20 -CONFIG_PUBLIC_SRC_WINDOW_LAYOUTER=ehmry/src/window_layouter/2019-05-24 -CONFIG_PUBLIC_SRC_WM=ehmry/src/wm/2019-05-24 -CONFIG_PUBLIC_SRC_ZLIB=genodelabs/src/zlib/2019-05-26 diff --git a/dhall b/dhall deleted file mode 160000 index abd7666..0000000 --- a/dhall +++ /dev/null @@ -1 +0,0 @@ -Subproject commit abd76668aeba6ebdd8396f7ec4d9c74b5b426f04 diff --git a/errata/toolchain.nix b/errata/toolchain.nix deleted file mode 100644 index 2aa0b8d..0000000 --- a/errata/toolchain.nix +++ /dev/null @@ -1,68 +0,0 @@ -{ pkgs ? import {} }: with pkgs; - -let - genodeVersion = "19.05"; - glibcVersion = (builtins.parseDrvName stdenv.glibc.name).version; - -in -stdenv.mkDerivation rec { - name = "genode-toolchain-${genodeVersion}"; - version = genodeVersion; - - src = - if stdenv.isx86_64 then - fetchurl { - url = "https://downloads.sourceforge.net/project/genode/genode-toolchain/${genodeVersion}/genode-toolchain-${genodeVersion}-x86_64.tar.xz"; - sha256 = "036czy21zk7fvz1y1p67q3d5hgg8rb8grwabgrvzgdsqcv2ls6l9"; - } - else abort "no toolchain for ${stdenv.system}"; - - buildInputs = [ patchelf ]; - - dontPatchELF = true; - - # installPhase is disabled for now - phases = "unpackPhase fixupPhase"; - - unpackPhase = '' - mkdir -p $out - - echo "unpacking $src..." - tar xf $src --strip-components=5 -C $out - ''; - - installPhase = '' - cd $out/bin - for platform in arm x86 ; do - dest="$"$platform"/bin" - eval dest=$"$dest" - - mkdir -p $dest - - for b in genode-$platform-* ; do - eval ln -s $b $dest/$\{b#genode-$platform-\} - done - - done - cd - - ''; - - fixupPhase = '' - interp=${stdenv.glibc.out}/lib/ld-${glibcVersion}.so - if [ ! -f "$interp" ] ; then - echo new interpreter $interp does not exist, - echo cannot patch binaries - exit 1 - fi - - for f in $(find $out); do - if [ -f "$f" ] && patchelf "$f" 2> /dev/null; then - patchelf --set-interpreter $interp \ - --set-rpath $out/lib:${stdenv.glibc.out}/lib:${zlib.out}/lib \ - "$f" || true - fi - done - ''; - - passthru = { libc = stdenv.glibc; }; -} diff --git a/index.dhall b/index.dhall deleted file mode 100644 index 9cd379a..0000000 --- a/index.dhall +++ /dev/null @@ -1,97 +0,0 @@ -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 - "" - ] - } - -in XML.render index diff --git a/manifest/Tupfile b/manifest/Tupfile deleted file mode 100644 index 129c27b..0000000 --- a/manifest/Tupfile +++ /dev/null @@ -1,31 +0,0 @@ -ifeq (@(TUP_ARCH),x86_64) -DEPOT_ARCH = x86_64 -endif - -ifeq ($(DEPOT_ARCH),) - error unhandled TUP_ARCH @(TUP_ARCH) -endif - -include_rules - -: $(DEPOT_DIR)/ |> \ - awk -F '/' 'BEGIN { print "{=}"} {print "∧{"$3"={version=\""$4"\",owner=\"@(PUBLIC_USER)\"}}" }' $f \ - <<< % | dhall > %o\ -|> raw.dhall {records} - -: $(DEPOT_DIR)/ |> \ - awk -F '/' 'BEGIN { print "{=}"} {print "∧{"$3"={version=\""$4"\",owner=\"@(PUBLIC_USER)\"}}" }' $f <<< % \ - | dhall > %o\ -|> bin.dhall {records} - -SHORT_SUM = b2sum -l24 - -: $(DEPOT_DIR)/ |> \ - echo '{=}' > %o; \ - for d in `dirname % | 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)/ diff --git a/manifest/alex-ab.dhall b/manifest/alex-ab.dhall deleted file mode 100644 index 8fcf17c..0000000 --- a/manifest/alex-ab.dhall +++ /dev/null @@ -1 +0,0 @@ -{ bin = { x86_64 = { ram_block = "2019-02-25" } } } diff --git a/manifest/ehmry.dhall b/manifest/ehmry.dhall deleted file mode 100644 index d9fdf23..0000000 --- a/manifest/ehmry.dhall +++ /dev/null @@ -1,69 +0,0 @@ -{ 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" - } -} diff --git a/manifest/genodelabs.dhall b/manifest/genodelabs.dhall deleted file mode 100644 index a73ae42..0000000 --- a/manifest/genodelabs.dhall +++ /dev/null @@ -1,15 +0,0 @@ -{ 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" - } - } -} diff --git a/manifest/nfeske.dhall b/manifest/nfeske.dhall deleted file mode 100644 index ad0829d..0000000 --- a/manifest/nfeske.dhall +++ /dev/null @@ -1,5 +0,0 @@ -{ bin = - { x86_64 = - { expat = "2019-02-19", libc = "2019-06-24", vfs_ttf = "2019-06-20" } - } -} diff --git a/nim/README.md b/nim/README.md deleted file mode 100644 index 847f3ea..0000000 --- a/nim/README.md +++ /dev/null @@ -1,9 +0,0 @@ -This directory hosts component submodules written in Nim. Integration is simple, -commit a `Tupfile` containing the following to the upstream repository, assuming -the repository contains an `*,nimble`, an `archives`, and a `runtime` file. - -```tup -include_rules -include &(NIMBLE_BINARIES_INCLUDE) -include &(NIMBLE_PACKAGE_INCLUDE) -``` diff --git a/nim/Tuprules.tup b/nim/Tuprules.tup deleted file mode 100644 index 5e80387..0000000 --- a/nim/Tuprules.tup +++ /dev/null @@ -1,33 +0,0 @@ -# Nim default variables - -ifeq (@(TUP_ARCH),arm64) - NIM_CPU = arm64 -endif -ifeq (@(TUP_ARCH),i386) - NIM_CPU = i386 -endif -ifeq (@(TUP_ARCH),x86_64) - NIM_CPU = amd64 -endif - -NIM_RELEASE_FLAG = -d:release - # Drop the relase flag with the line "NIM_RELEASE_FLAG=" - -NIM_SRC_DIR = src - # Build everything in this directory - -BIN_VERSION = $(GIT_VERSION) - # Use the git version as the binary package version - -&NIMBLE_BINARIES_INCLUDE = binaries.tup -&NIMBLE_PACKAGE_INCLUDE = package.tup - -!nim_build = | $(GENODE_DIR)/ $(GENODE_DIR)/ \ -|> ^o Nimble %B^ \ - PKG_CONFIG_PATH=`pwd`/$(PKG_CONFIG_DIR) \ - nimble cpp $(NIM_RELEASE_FLAG) $(NIM_FLAGS) \ - --cpu:$(NIM_CPU) --os:genode -d:posix \ - --parallelBuild:1 --passL:-L`pwd`/$(STUB_DIR) -o:%B %f \ -|> %B ./ - # Nim may invoke the C++ compiler at an arbitrary location, - # thus the relative $(PKG_CONFIG_DIR) is prepended with `pwd` diff --git a/nim/binaries.tup b/nim/binaries.tup deleted file mode 100644 index b8e83b5..0000000 --- a/nim/binaries.tup +++ /dev/null @@ -1,3 +0,0 @@ -: foreach $(NIM_SRC_DIR)/*.nim |> !nim_build |> {binary} -: foreach {binary} |> !collect_bin |> -: |> !bin |> diff --git a/nim/blobbot b/nim/blobbot deleted file mode 160000 index 0a0c4cd..0000000 --- a/nim/blobbot +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 0a0c4cdb7c4102c5dadbddea632287638441d89c diff --git a/nim/blobsets b/nim/blobsets deleted file mode 160000 index aaa61ae..0000000 --- a/nim/blobsets +++ /dev/null @@ -1 +0,0 @@ -Subproject commit aaa61aebd895e60de28936711b6231d9e555888a diff --git a/nim/carn_layouter b/nim/carn_layouter deleted file mode 160000 index 48b29f8..0000000 --- a/nim/carn_layouter +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 48b29f8d699571eb79ac73e248754e464f6b9bc7 diff --git a/nim/fetch_and_copy b/nim/fetch_and_copy deleted file mode 160000 index 80a63d0..0000000 --- a/nim/fetch_and_copy +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 80a63d06a41230f98a44b09c8167d14275efee7c diff --git a/nim/icy_client b/nim/icy_client deleted file mode 160000 index c16dd1b..0000000 --- a/nim/icy_client +++ /dev/null @@ -1 +0,0 @@ -Subproject commit c16dd1b093dface9bb8be00da5edbc4b790363cc diff --git a/nim/imap_report b/nim/imap_report deleted file mode 160000 index e8abc83..0000000 --- a/nim/imap_report +++ /dev/null @@ -1 +0,0 @@ -Subproject commit e8abc833f3522794ea691e36f561fe8bf2481af4 diff --git a/nim/musicbrainz_playlist_generator b/nim/musicbrainz_playlist_generator deleted file mode 160000 index 84c694a..0000000 --- a/nim/musicbrainz_playlist_generator +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 84c694a34b489157ce222de1b77d67f0775f9993 diff --git a/nim/nim b/nim/nim deleted file mode 160000 index e7471ce..0000000 --- a/nim/nim +++ /dev/null @@ -1 +0,0 @@ -Subproject commit e7471cebae2a404f3e4239f199f5a0c422484aac diff --git a/nim/nim-genode b/nim/nim-genode deleted file mode 160000 index 1d58fcf..0000000 --- a/nim/nim-genode +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 1d58fcff44e4ad94a5fd5983e64989ba312f7d70 diff --git a/nim/nim-monero b/nim/nim-monero deleted file mode 160000 index a50208a..0000000 --- a/nim/nim-monero +++ /dev/null @@ -1 +0,0 @@ -Subproject commit a50208a35aec3031c81f5b4d6141498465ebcf90 diff --git a/nim/ninep b/nim/ninep deleted file mode 160000 index 739918b..0000000 --- a/nim/ninep +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 739918bcd740f1c3447d3fe54ff275919762c5fe diff --git a/nim/package.tup b/nim/package.tup deleted file mode 100644 index 172f939..0000000 --- a/nim/package.tup +++ /dev/null @@ -1,4 +0,0 @@ -PKG_VERSION = $(GIT_VERSION) - -: runtime | ./ |> !collect_pkg_runtime |> -: |> !pkg |> diff --git a/nim/spry_genode b/nim/spry_genode deleted file mode 160000 index 8f71f72..0000000 --- a/nim/spry_genode +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 8f71f727c13b5cafebc3cc91ccfc9709ef287248 diff --git a/nim/xspf_view b/nim/xspf_view deleted file mode 160000 index 066b2c3..0000000 --- a/nim/xspf_view +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 066b2c3fb9c005e1f29ee9a7c1b0431882790116 diff --git a/pkg-config/.keep b/pkg-config/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/ports/default.nix b/ports/default.nix deleted file mode 100644 index ce03b45..0000000 --- a/ports/default.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ tool ? import ../tool { } }: - -let - importPort = path: - let f = (import path); - in f (builtins.intersectAttrs (builtins.functionArgs f) (tool.nixpkgs // tool) ); - - dir = builtins.readDir ../ports; -in -builtins.listToAttrs ( - builtins.filter - (x: x != null) - (map - (name: - if (builtins.getAttr name dir) != "directory" then null else - { inherit name; - value = importPort (../ports + "/${name}"); - } - ) - (builtins.attrNames dir) - ) -) diff --git a/ports/mpg123/Tupfile b/ports/mpg123/Tupfile deleted file mode 100644 index 0d46710..0000000 --- a/ports/mpg123/Tupfile +++ /dev/null @@ -1,35 +0,0 @@ -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)/ - -: 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) diff --git a/ports/mpg123/arm.files b/ports/mpg123/arm.files deleted file mode 100644 index ffacb3b..0000000 --- a/ports/mpg123/arm.files +++ /dev/null @@ -1 +0,0 @@ -src/libmpg123/synth_arm.S diff --git a/ports/mpg123/common.files b/ports/mpg123/common.files deleted file mode 100644 index 7eaf20c..0000000 --- a/ports/mpg123/common.files +++ /dev/null @@ -1,38 +0,0 @@ -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 diff --git a/ports/mpg123/config.h b/ports/mpg123/config.h deleted file mode 100644 index 4d34cfd..0000000 --- a/ports/mpg123/config.h +++ /dev/null @@ -1,48 +0,0 @@ -#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 diff --git a/ports/mpg123/default.nix b/ports/mpg123/default.nix deleted file mode 100644 index a01ef3d..0000000 --- a/ports/mpg123/default.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ 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 - ''; -} diff --git a/ports/mpg123/libmpg123.symbols b/ports/mpg123/libmpg123.symbols deleted file mode 100644 index f48c68b..0000000 --- a/ports/mpg123/libmpg123.symbols +++ /dev/null @@ -1,115 +0,0 @@ -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 diff --git a/ports/mpg123/port_rules.sh b/ports/mpg123/port_rules.sh deleted file mode 100755 index ea58a04..0000000 --- a/ports/mpg123/port_rules.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/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 diff --git a/ports/mpg123/x86_64.files b/ports/mpg123/x86_64.files deleted file mode 100644 index d10774b..0000000 --- a/ports/mpg123/x86_64.files +++ /dev/null @@ -1,5 +0,0 @@ -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 diff --git a/rrd/.gitignore b/rrd/.gitignore deleted file mode 100644 index c55c8f6..0000000 --- a/rrd/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -.rrd -*.png diff --git a/rrd/collect.sh b/rrd/collect.sh deleted file mode 100755 index 996c542..0000000 --- a/rrd/collect.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env bash - -SQL_FILE=../.tup/db -RRD_FILE=.rrd - -[ -e "$RRD_FILE" ] || rrdtool create "$RRD_FILE" \ - --step 1h \ - DS:node:GAUGE:2d:1000:1000000 \ - DS:normal_link:GAUGE:2d:1000:1000000 \ - DS:sticky_link:GAUGE:2d:1000:1000000 \ - DS:group_link:GAUGE:2d:1000:1000000 \ - DS:var:GAUGE:2d:1000:1000000 \ - RRA:AVERAGE:0.5:1h:72h \ - RRA:AVERAGE:0.5:1d:4y \ - -QUERY="select COUNT(*) from node; select COUNT(*) from normal_link; select COUNT(*) from sticky_link; select COUNT(*) from group_link; select COUNT(*) from var;" - -LINES=`sqlite3 $SQL_FILE -readonly "$QUERY" ` -RECORDS=`echo $LINES | tr ' ' ':' ` - -rrdtool update ${RRD_FILE} N:$RECORDS - - -rrdtool graph chart.png \ - --start 1561669840 \ - --logarithmic \ - DEF:nodes="$RRD_FILE":node:AVERAGE LINE2:nodes#000000:nodes \ - DEF:normal_link="$RRD_FILE":normal_link:AVERAGE LINE2:normal_link#0000FF:"normal links" \ - DEF:sticky_link="$RRD_FILE":sticky_link:AVERAGE LINE2:sticky_link#0080FF:"sticky links" \ - DEF:group_link="$RRD_FILE":group_link:AVERAGE LINE2:group_link#8000FF:"group links" \ - DEF:var="$RRD_FILE":var:AVERAGE LINE2:var#FF0000:variables \ diff --git a/runtimes/arora/Tupfile b/runtimes/arora/Tupfile deleted file mode 100644 index de654c8..0000000 --- a/runtimes/arora/Tupfile +++ /dev/null @@ -1,40 +0,0 @@ -TARGET_NAME = arora - -PKG_DEPENDS += \ - cproc/raw/qt5_dejavusans/2019-02-25 \ - cproc/src/expat/2019-03-18 \ - cproc/src/freetype/2019-02-25 \ - cproc/src/jpeg/2019-02-25 \ - cproc/src/libc/2019-03-18 \ - cproc/src/libpng/2019-02-25 \ - cproc/src/mesa/2019-03-18 \ - cproc/src/pcre16/2019-03-18 \ - cproc/src/qt5_core/2019-03-18 \ - cproc/src/qt5_gui/2019-03-18 \ - cproc/src/qt5_qjpeg/2019-03-18 \ - cproc/src/qt5_qpa_nitpicker/2019-03-18 \ - cproc/src/stdcxx/2019-02-25 \ - cproc/src/vfs/2019-03-18 \ - cproc/src/zlib/2019-02-25 \ - cproc/raw/arora/2019-03-18 \ - cproc/src/arora/2019-03-18 \ - cproc/src/icu/2019-03-18 \ - cproc/src/libcrypto/2019-03-18 \ - cproc/src/libssl/2019-03-18 \ - cproc/src/qt5_network/2019-03-18 \ - cproc/src/qt5_printsupport/2019-03-18 \ - cproc/src/qt5_qnitpickerviewwidget/2019-03-18 \ - cproc/src/qt5_opengl/2019-03-18 \ - cproc/src/qt5_qpluginwidget/2019-03-18 \ - cproc/src/qt5_scriptclassic/2019-03-18 \ - cproc/src/qt5_sql/2019-03-18 \ - cproc/src/qt5_ui_tools/2019-03-18 \ - cproc/src/qt5_webkit/2019-03-18 \ - cproc/src/qt5_widgets/2019-03-18 \ - cproc/src/vfs_jitterentropy/2019-03-18 \ - cproc/src/vfs_lxip/2019-03-18 \ - -include_rules - -: runtime |> !collect_pkg_runtime |> -include &(PKG_RULES) diff --git a/runtimes/arora/runtime b/runtimes/arora/runtime deleted file mode 100755 index cbcf5f3..0000000 --- a/runtimes/arora/runtime +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/runtimes/audio_player/Tupfile b/runtimes/audio_player/Tupfile deleted file mode 100644 index 8a92ea5..0000000 --- a/runtimes/audio_player/Tupfile +++ /dev/null @@ -1,9 +0,0 @@ -TARGET_NAME = audio_player - -PKG_DEPENDS += \ - @(PUBLIC_PKG_AUDIO_PLAYER) \ - -include_rules - -: runtime |> !collect_pkg_runtime |> -include &(PKG_RULES) diff --git a/runtimes/audio_player/runtime b/runtimes/audio_player/runtime deleted file mode 100644 index a38337f..0000000 --- a/runtimes/audio_player/runtime +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/runtimes/avplay/Tupfile b/runtimes/avplay/Tupfile deleted file mode 100644 index 59c41d0..0000000 --- a/runtimes/avplay/Tupfile +++ /dev/null @@ -1,9 +0,0 @@ -TARGET_NAME = akira - -PKG_DEPENDS += \ - @(PUBLIC_PKG_AVPLAY) \ - -include_rules - -: runtime |> !collect_pkg_runtime |> -include &(PKG_RULES) diff --git a/runtimes/avplay/runtime b/runtimes/avplay/runtime deleted file mode 100644 index 4c81bca..0000000 --- a/runtimes/avplay/runtime +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 2000-01-01 00:00 - - - - - - diff --git a/runtimes/backdrop/Tupfile b/runtimes/backdrop/Tupfile deleted file mode 100644 index 35860e3..0000000 --- a/runtimes/backdrop/Tupfile +++ /dev/null @@ -1,16 +0,0 @@ -TARGET_NAME = backdrop - -PKG_DEPENDS += \ - @(PUBLIC_PKG_BACKDROP) \ - _/raw/backdrop \ - -include_rules - -: backdrop.png |> !collect_raw |> - -: ./pkg.dhall |> !render_runtime |> - -include &(RAW_RULES) -include &(PKG_RULES) - -: ./pkg.dhall |> !index_pkg |> diff --git a/runtimes/backdrop/backdrop.png b/runtimes/backdrop/backdrop.png deleted file mode 100644 index 5440a5c..0000000 Binary files a/runtimes/backdrop/backdrop.png and /dev/null differ diff --git a/runtimes/backdrop/pkg.dhall b/runtimes/backdrop/pkg.dhall deleted file mode 100644 index 75407f7..0000000 --- a/runtimes/backdrop/pkg.dhall +++ /dev/null @@ -1,38 +0,0 @@ -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 - '' - - - - - - '' - } - } diff --git a/runtimes/ban_ai_multics/Tupfile b/runtimes/ban_ai_multics/Tupfile deleted file mode 100644 index 50d5c87..0000000 --- a/runtimes/ban_ai_multics/Tupfile +++ /dev/null @@ -1,19 +0,0 @@ -TARGET_NAME = ban_ai_multics - -PKG_DEPENDS += \ - @(PUBLIC_SRC_VFS) \ - @(PUBLIC_SRC_LIBC) \ - @(PUBLIC_SRC_INIT) \ - @(PUBLIC_SRC_LIBCRYPTO) \ - @(PUBLIC_SRC_LIBSSH) \ - @(PUBLIC_SRC_VFS_LWIP) \ - @(PUBLIC_SRC_SSH_CLIENT) \ - @(PUBLIC_SRC_TERMINAL) \ - @(PUBLIC_SRC_VFS_JITTERENTROPY) \ - @(PUBLIC_SRC_VFS_TTF) \ - @(PUBLIC_SRC_ZLIB) \ - -include_rules - -: runtime |> !collect_pkg_runtime |> -: |> !pkg |> diff --git a/runtimes/ban_ai_multics/runtime b/runtimes/ban_ai_multics/runtime deleted file mode 100644 index f3adb35..0000000 --- a/runtimes/ban_ai_multics/runtime +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/runtimes/block_shred/Tupfile b/runtimes/block_shred/Tupfile deleted file mode 100644 index c56d052..0000000 --- a/runtimes/block_shred/Tupfile +++ /dev/null @@ -1,9 +0,0 @@ -TARGET_NAME = block_shred - -PKG_DEPENDS += \ - @(PUBLIC_SRC_BLOCK_SHRED) \ - -include_rules - -: runtime |> !collect_pkg_runtime |> -: |> !pkg |> diff --git a/runtimes/block_shred/runtime b/runtimes/block_shred/runtime deleted file mode 100644 index f68369b..0000000 --- a/runtimes/block_shred/runtime +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/runtimes/chroot/Tupfile b/runtimes/chroot/Tupfile deleted file mode 100644 index 1568922..0000000 --- a/runtimes/chroot/Tupfile +++ /dev/null @@ -1,4 +0,0 @@ -TARGET_NAME = chroot -include_rules -PKG_DEPENDS += @(PUBLIC_SRC_CHROOT) -: runtime |> !collect_pkg_runtime |> diff --git a/runtimes/chroot/runtime b/runtimes/chroot/runtime deleted file mode 100644 index f59add1..0000000 --- a/runtimes/chroot/runtime +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/runtimes/depot_9P/Tupfile b/runtimes/depot_9P/Tupfile deleted file mode 100644 index 39f7a07..0000000 --- a/runtimes/depot_9P/Tupfile +++ /dev/null @@ -1,14 +0,0 @@ -TARGET_NAME = depot_9P - -PKG_DEPENDS += \ - @(PUBLIC_SRC_LIBC) \ - @(PUBLIC_SRC_VFS_LWIP) \ - _/src/vfs \ - _/src/ninep \ - -include_rules - -: runtime |> !collect_pkg_runtime |> -: |> !pkg |> - -: ./pkg.dhall |> !index_pkg |> diff --git a/runtimes/depot_9P/pkg.dhall b/runtimes/depot_9P/pkg.dhall deleted file mode 100644 index acd8671..0000000 --- a/runtimes/depot_9P/pkg.dhall +++ /dev/null @@ -1 +0,0 @@ -{ indexInfo = "Serve /depot/local over 9P" } diff --git a/runtimes/depot_9P/runtime b/runtimes/depot_9P/runtime deleted file mode 100644 index ad00ef8..0000000 --- a/runtimes/depot_9P/runtime +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/runtimes/dummy_block/Tupfile b/runtimes/dummy_block/Tupfile deleted file mode 100644 index 5400137..0000000 --- a/runtimes/dummy_block/Tupfile +++ /dev/null @@ -1,4 +0,0 @@ -TARGET_NAME = dummy_block -include_rules -PKG_DEPENDS += @(PUBLIC_SRC_RAM_BLOCK) -: runtime |> !collect_pkg_runtime |> diff --git a/runtimes/dummy_block/runtime b/runtimes/dummy_block/runtime deleted file mode 100644 index 4b12839..0000000 --- a/runtimes/dummy_block/runtime +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/runtimes/fs_block_4G/Tupfile b/runtimes/fs_block_4G/Tupfile deleted file mode 100644 index e53d4aa..0000000 --- a/runtimes/fs_block_4G/Tupfile +++ /dev/null @@ -1,4 +0,0 @@ -TARGET_NAME = fs_block_4G -include_rules -PKG_DEPENDS += _/src/fs_block -: runtime |> !collect_pkg_runtime |> diff --git a/runtimes/fs_block_4G/runtime b/runtimes/fs_block_4G/runtime deleted file mode 100644 index b721d98..0000000 --- a/runtimes/fs_block_4G/runtime +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/runtimes/fs_block_8G/Tupfile b/runtimes/fs_block_8G/Tupfile deleted file mode 100644 index bc470d2..0000000 --- a/runtimes/fs_block_8G/Tupfile +++ /dev/null @@ -1,4 +0,0 @@ -TARGET_NAME = fs_block_8G -include_rules -PKG_DEPENDS += _/src/fs_block -: runtime |> !collect_pkg_runtime |> diff --git a/runtimes/fs_block_8G/runtime b/runtimes/fs_block_8G/runtime deleted file mode 100644 index e2d6ddf..0000000 --- a/runtimes/fs_block_8G/runtime +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/runtimes/icy-streams/Tuprules.tup b/runtimes/icy-streams/Tuprules.tup deleted file mode 100644 index 360aaae..0000000 --- a/runtimes/icy-streams/Tuprules.tup +++ /dev/null @@ -1,9 +0,0 @@ -PKG_DEPENDS += \ - ehmry/src/mp3_audio_sink/19.02 \ - @(PUBLIC_SRC_LIBC) \ - @(PUBLIC_SRC_LIBMPG123) \ - @(PUBLIC_SRC_VFS_LWIP) \ - @(PUBLIC_SRC_ZLIB) \ - _/src/icy_client \ - _/src/init \ - _/src/vfs \ diff --git a/runtimes/icy-streams/ifm1/Tupfile b/runtimes/icy-streams/ifm1/Tupfile deleted file mode 100644 index a39ea3f..0000000 --- a/runtimes/icy-streams/ifm1/Tupfile +++ /dev/null @@ -1,7 +0,0 @@ -TARGET_NAME = ifm1 -include_rules - -: ./pkg.dhall |> !render_runtime |> {runtime} -: |> !pkg |> - -: ./pkg.dhall |> !index_pkg |> diff --git a/runtimes/icy-streams/ifm1/pkg.dhall b/runtimes/icy-streams/ifm1/pkg.dhall deleted file mode 100644 index b45e24f..0000000 --- a/runtimes/icy-streams/ifm1/pkg.dhall +++ /dev/null @@ -1,2 +0,0 @@ - ../pkg.dhall "http://radio.intergalactic.fm:80/1" -∧ { indexInfo = "Intergalactic FM 1" } diff --git a/runtimes/icy-streams/ifm2/Tupfile b/runtimes/icy-streams/ifm2/Tupfile deleted file mode 100644 index d7f51ad..0000000 --- a/runtimes/icy-streams/ifm2/Tupfile +++ /dev/null @@ -1,7 +0,0 @@ -TARGET_NAME = ifm2 -include_rules - -: ./pkg.dhall |> !render_runtime |> {runtime} -: |> !pkg |> - -: ./pkg.dhall |> !index_pkg |> diff --git a/runtimes/icy-streams/ifm2/pkg.dhall b/runtimes/icy-streams/ifm2/pkg.dhall deleted file mode 100644 index 63fbc8f..0000000 --- a/runtimes/icy-streams/ifm2/pkg.dhall +++ /dev/null @@ -1,2 +0,0 @@ - ../pkg.dhall "http://radio.intergalactic.fm:80/2" -∧ { indexInfo = "Intergalactic FM 2" } diff --git a/runtimes/icy-streams/ifm3/Tupfile b/runtimes/icy-streams/ifm3/Tupfile deleted file mode 100644 index 2adbb2b..0000000 --- a/runtimes/icy-streams/ifm3/Tupfile +++ /dev/null @@ -1,7 +0,0 @@ -TARGET_NAME = ifm3 -include_rules - -: ./pkg.dhall |> !render_runtime |> {runtime} -: |> !pkg |> - -: ./pkg.dhall |> !index_pkg |> diff --git a/runtimes/icy-streams/ifm3/pkg.dhall b/runtimes/icy-streams/ifm3/pkg.dhall deleted file mode 100644 index 3af8356..0000000 --- a/runtimes/icy-streams/ifm3/pkg.dhall +++ /dev/null @@ -1,2 +0,0 @@ - ../pkg.dhall "http://radio.intergalactic.fm:80/3" -∧ { indexInfo = "Intergalactic FM 3" } diff --git a/runtimes/icy-streams/pkg.dhall b/runtimes/icy-streams/pkg.dhall deleted file mode 100644 index 50cd9fa..0000000 --- a/runtimes/icy-streams/pkg.dhall +++ /dev/null @@ -1,83 +0,0 @@ -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 - '' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - '' - } - -in λ(url : Text) → { runtime = Genode.Runtime.defaults // (config url) } diff --git a/runtimes/nic_bridge/Tupfile b/runtimes/nic_bridge/Tupfile deleted file mode 100644 index d708714..0000000 --- a/runtimes/nic_bridge/Tupfile +++ /dev/null @@ -1,4 +0,0 @@ -TARGET_NAME = nic_bridge -include_rules -PKG_DEPENDS += @(PUBLIC_SRC_NIC_BRIDGE) -: runtime |> !collect_pkg_runtime |> diff --git a/runtimes/nic_bridge/runtime b/runtimes/nic_bridge/runtime deleted file mode 100644 index b40b3e8..0000000 --- a/runtimes/nic_bridge/runtime +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/runtimes/nic_bridge_logged/Tupfile b/runtimes/nic_bridge_logged/Tupfile deleted file mode 100644 index 8499e51..0000000 --- a/runtimes/nic_bridge_logged/Tupfile +++ /dev/null @@ -1,9 +0,0 @@ -TARGET_NAME = nic_bridge_logged -include_rules - -PKG_DEPENDS += \ - @(PUBLIC_SRC_FS_LOG) \ - @(PUBLIC_SRC_INIT) \ - @(PUBLIC_SRC_NIC_BRIDGE) \ - -: runtime |> !collect_pkg_runtime |> diff --git a/runtimes/nic_bridge_logged/runtime b/runtimes/nic_bridge_logged/runtime deleted file mode 100644 index 7718f76..0000000 --- a/runtimes/nic_bridge_logged/runtime +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/runtimes/noux-system/Tupfile b/runtimes/noux-system/Tupfile deleted file mode 100644 index 9509ed7..0000000 --- a/runtimes/noux-system/Tupfile +++ /dev/null @@ -1,20 +0,0 @@ -TARGET_NAME = noux-system - -PKG_DEPENDS += \ - ehmry/src/bash-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 - -: ./pkg.dhall |> !render_runtime |> -: |> !pkg |> - -: ./pkg.dhall |> !index_pkg |> diff --git a/runtimes/noux-system/pkg.dhall b/runtimes/noux-system/pkg.dhall deleted file mode 100644 index 1e71da4..0000000 --- a/runtimes/noux-system/pkg.dhall +++ /dev/null @@ -1,118 +0,0 @@ -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 - '' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - '' - } - } diff --git a/runtimes/ssh_client/Tupfile b/runtimes/ssh_client/Tupfile deleted file mode 100644 index 4196489..0000000 --- a/runtimes/ssh_client/Tupfile +++ /dev/null @@ -1,19 +0,0 @@ -TARGET_NAME = ssh_client - -PKG_DEPENDS += \ - @(PUBLIC_SRC_LIBC) \ - @(PUBLIC_SRC_VFS) \ - @(PUBLIC_SRC_INIT) \ - @(PUBLIC_SRC_LIBCRYPTO) \ - @(PUBLIC_SRC_LIBSSH) \ - @(PUBLIC_SRC_VFS_LWIP) \ - @(PUBLIC_SRC_SSH_CLIENT) \ - @(PUBLIC_SRC_TERMINAL) \ - @(PUBLIC_SRC_VFS_JITTERENTROPY) \ - @(PUBLIC_SRC_VFS_TTF) \ - @(PUBLIC_SRC_ZLIB) \ - -include_rules - -: runtime |> !collect_pkg_runtime |> -: |> !pkg |> diff --git a/runtimes/ssh_client/runtime b/runtimes/ssh_client/runtime deleted file mode 100644 index e2ec9db..0000000 --- a/runtimes/ssh_client/runtime +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/runtimes/templeos/README b/runtimes/templeos/README deleted file mode 100644 index bdbc9e7..0000000 --- a/runtimes/templeos/README +++ /dev/null @@ -1,54 +0,0 @@ - - The Temple Operating System hosted in VirtualBox for NOVA - -TempleOS is a free, public domain, open source, x86_64, non-preemptive -multi-tasking, multi-cored, ring-0-only, single-address-map (identity-mapped), -non-networked, PC operating system. Paging is, basically, not used. - -The CIA encourages code obsfucation. They make it more complicated than -necessary. TempleOS is, literally, more simple than necessary. It is -obnoxiously simple... to the point it hurts. - -This "Hello World" joke, the BMP file format and the WAV file format show that -the industry is really screwed-up! That's what TempleOS fixes. I capped the -line-of-code count at 100,000 and God said it must be perfect, so it will never -be an ugly monstrocity. It is currently 82,171 lines of unblemished code. -Backward compatibility is not promised. - -Normally, failure is not an option, but since TempleOS accompanies Windows or -Linux, we exclude certain uses. There is no reason to duplicate browsing, -multimedia, desktop publishing, etc. Linux wants to be a secure, multi-user -mainframe. That's why it has file permissions. The vision for TempleOS, -however, is a modern, 64-bit Commodore 64. The C64 was a non-networked, home -computer mostly used for games. It trained my generation how to program because -it was wide open, completely hackable. The games were not multimedia works of -art, but generated by non-artist. - -A troll might ask, "Why not just use DOS? It was ring-0-only and -single-address-map." DOS was 16-bit, with segmentation -- awful! TempleOS is -64-bit, flat, non-segmented and multi-cored. It has a C64-like shell with -HolyC, a dialect of C/C++, instead of BASIC. It was written from scratch, and -not even ASCII was sacred -- it has 8-bit unsigned char source code to support -European languages. Also, the source code supports binary sprite graphics. - -A troll might say, "It can crash!" We used DOS for years and loved it. -Computers even had a reset switch! Just think of the power of ring-0, muhahaha! -Think of the speed and simplicity of ring-0-only and identity-mapping. It can -change tasks in half a microsecond because it doesn't mess with page tables or -privilege levels. Inter-process communication is effortless because every task -can access every other task's memory. - -It's fun having access to everything. When I was a teenager, I had a book, -Mapping the Commodore 64, that told what every location in memory did. I liked -copying the ROM to RAM and poking around at the ROM BASIC's variables. -Everybody directly poked the hardware ports. - -TempleOS is simpler than Linux and you can have hours of fun tinkering because -all memory and ports are accessible. Memory is identity-mapped at all times, so -you can modify any task's memory from any other task. You can access all disk -blocks, too. I had a blast using a C64 disk block editor to modify directories -to un-delete files, when I was a kid. Maybe, you want to play with a raw-block -database, or make your own file system? - -http://www.templeos.org/ -https://archive.org/details/TempleOS_Website_Archive diff --git a/runtimes/templeos/Tupfile b/runtimes/templeos/Tupfile deleted file mode 100644 index 0e8651f..0000000 --- a/runtimes/templeos/Tupfile +++ /dev/null @@ -1,23 +0,0 @@ -TARGET_NAME = templeos - -include_rules - -PKG_DEPENDS += \ - ehmry/raw/templeos/2017-12-12 \ - genodelabs/src/vbox5-nova/2019-02-25 \ - genodelabs/src/base-nova/2019-02-25 \ - genodelabs/src/libc/2019-02-25 \ - genodelabs/src/init/2019-02-27 \ - genodelabs/src/nit_fb/2019-02-25 \ - genodelabs/src/libc/2019-02-25 \ - genodelabs/src/posix/2019-02-25 \ - genodelabs/src/zlib/2019-02-25 \ - genodelabs/src/nit_fb/2019-02-25 \ - genodelabs/src/libiconv/2019-02-25 \ - genodelabs/src/stdcxx/2019-02-25 \ - genodelabs/src/vfs/2019-02-27 \ - -: runtime |> !collect_pkg_runtime |> -: README |> !collect_pkg |> - -: |> !pkg |> diff --git a/runtimes/templeos/runtime b/runtimes/templeos/runtime deleted file mode 100644 index e45ccfd..0000000 --- a/runtimes/templeos/runtime +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/runtimes/test-lwip_node/Tupfile b/runtimes/test-lwip_node/Tupfile deleted file mode 100644 index 70ac1e5..0000000 --- a/runtimes/test-lwip_node/Tupfile +++ /dev/null @@ -1,4 +0,0 @@ -TARGET_NAME = test-lwip_node -include_rules -PKG_DEPENDS += local/src/test-lwip_node/current -: runtime |> !collect_pkg_runtime |> diff --git a/runtimes/test-lwip_node/runtime b/runtimes/test-lwip_node/runtime deleted file mode 100644 index f22649a..0000000 --- a/runtimes/test-lwip_node/runtime +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/runtimes/ui/motif_decorator/README b/runtimes/ui/motif_decorator/README deleted file mode 100644 index 3e14d80..0000000 --- a/runtimes/ui/motif_decorator/README +++ /dev/null @@ -1,3 +0,0 @@ - - Motif-inspired window decorator - diff --git a/runtimes/ui/motif_decorator/Tupfile b/runtimes/ui/motif_decorator/Tupfile deleted file mode 100644 index f5c1246..0000000 --- a/runtimes/ui/motif_decorator/Tupfile +++ /dev/null @@ -1,6 +0,0 @@ -TARGET_NAME = motif_decorator -include_rules - -PKG_DEPENDS += @(PUBLIC_SRC_MOTIF_DECORATOR) - -: runtime |> !collect_pkg_runtime |> diff --git a/runtimes/ui/motif_decorator/runtime b/runtimes/ui/motif_decorator/runtime deleted file mode 100644 index 539f808..0000000 --- a/runtimes/ui/motif_decorator/runtime +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - <closer/> </controls> - <default-policy/> - </config> - -</runtime> diff --git a/runtimes/ui/window_layouter/README b/runtimes/ui/window_layouter/README deleted file mode 100644 index 9aacf5e..0000000 --- a/runtimes/ui/window_layouter/README +++ /dev/null @@ -1,3 +0,0 @@ - - Default window layouter - diff --git a/runtimes/ui/window_layouter/Tupfile b/runtimes/ui/window_layouter/Tupfile deleted file mode 100644 index eabc25b..0000000 --- a/runtimes/ui/window_layouter/Tupfile +++ /dev/null @@ -1,7 +0,0 @@ -TARGET_NAME = window_layouter -include_rules - -PKG_DEPENDS += \ - @(PUBLIC_SRC_WINDOW_LAYOUTER) \ - -: runtime |> !collect_pkg_runtime |> diff --git a/runtimes/ui/window_layouter/archives b/runtimes/ui/window_layouter/archives deleted file mode 100644 index 9cd19ea..0000000 --- a/runtimes/ui/window_layouter/archives +++ /dev/null @@ -1,6 +0,0 @@ -_/raw/window_layouter -_/src/window_layouter -_/src/init -_/src/fs_report -_/src/fs_rom -_/src/vfs diff --git a/runtimes/ui/window_layouter/runtime b/runtimes/ui/window_layouter/runtime deleted file mode 100644 index b1d47a8..0000000 --- a/runtimes/ui/window_layouter/runtime +++ /dev/null @@ -1,39 +0,0 @@ -<runtime ram="7M" caps="400" binary="window_layouter"> - - <requires> - <nitpicker/> - <rom label="window_list"/> - <rom label="focus_request"/> - <rom label="hover"/> - <rom label="decorator_margins"/> - <report/> - </requires> - - <content> - <rom label="window_layouter"/> - </content> - - <config> - <rules> - <screen name="screen"/> - <assign label_prefix="" target="screen" xpos="any" ypos="any"/> - </rules> - <press key="KEY_SCREEN"> - <press key="KEY_TAB" action="next_window"> - <release key="KEY_TAB"> - <release key="KEY_SCREEN" action="raise_window"/> - </release> - <release key="KEY_SCREEN" action="raise_window"/> - </press> - <press key="KEY_LEFTSHIFT"> - <press key="KEY_TAB" action="prev_window"> - <release key="KEY_TAB"> - <release key="KEY_SCREEN" action="raise_window"/> - </release> - </press> - </press> - <press key="KEY_ENTER" action="toggle_fullscreen"/> - </press> - </config> - -</runtime> diff --git a/runtimes/ui/wm/README b/runtimes/ui/wm/README deleted file mode 100644 index 3477acf..0000000 --- a/runtimes/ui/wm/README +++ /dev/null @@ -1,19 +0,0 @@ - - Window manager - -This package provides the central part of Genode's componentized GUI stack -via a custom implementation of the nitpicker session interface. -It must be complemented by a window layouter and a window decorator, each of -which is a separate client component. Whereas the window decorator defines how -windows look, the window layouter defines how they behave. - -The window manager, decorator, and layouter propagate their respective state -(like the window layout or the decoration margins) via reports and ROMs. The -window-manager package manages the flow of information between those parties -by providing a report and ROM service to the external layouter and decorator. - -The special roles of the layouter and decorator among the window-manager -clients are identified according to their names (labels), which are suffixed -with "layouter" and "decorator" respectively. All other clients are expected -to be regular windowed applications. - diff --git a/runtimes/ui/wm/Tupfile b/runtimes/ui/wm/Tupfile deleted file mode 100644 index 5c55bac..0000000 --- a/runtimes/ui/wm/Tupfile +++ /dev/null @@ -1,9 +0,0 @@ -TARGET_NAME = wm -include_rules - -PKG_DEPENDS += \ - @(PUBLIC_SRC_WM) \ - @(PUBLIC_SRC_INIT) \ - @(PUBLIC_SRC_REPORT_ROM) \ - -: runtime |> !collect_pkg_runtime |> diff --git a/runtimes/ui/wm/runtime b/runtimes/ui/wm/runtime deleted file mode 100644 index 6a316a7..0000000 --- a/runtimes/ui/wm/runtime +++ /dev/null @@ -1,110 +0,0 @@ -<runtime ram="16M" caps="512" binary="init"> - - <requires> - <nitpicker/> - <report/> - </requires> - - <provides> <nitpicker/> <rom/> <report/> </provides> - - <content> - <rom label="init"/> - <rom label="report_rom"/> - <rom label="wm"/> - </content> - - <config> - <parent-provides> - <service name="ROM"/> - <service name="PD"/> - <service name="CPU"/> - <service name="LOG"/> - <service name="Nitpicker"/> - <service name="Timer"/> - <service name="Report"/> - </parent-provides> - - <default-route> - <any-service> <parent/> <any-child/> </any-service> - </default-route> - - <default caps="100"/> - - <service name="Nitpicker"> - <default-policy> <child name="wm"/> </default-policy> - </service> - - <service name="ROM"> - <policy label_suffix="layouter -> window_list"> - <child name="report_rom" label="layouter -> window_list"/> </policy> - <policy label_suffix="layouter -> focus_request"> - <child name="report_rom" label="layouter -> focus_request"/> </policy> - <policy label_suffix="layouter -> hover"> - <child name="report_rom" label="layouter -> hover"/> </policy> - <policy label_suffix="layouter -> decorator_margins"> - <child name="report_rom" label="layouter -> decorator_margins"/> </policy> - <policy label_suffix="layouter -> rules"> - <child name="report_rom" label="layouter -> rules"/> </policy> - <policy label_suffix="decorator -> window_layout"> - <child name="report_rom" label="decorator -> window_layout"/> </policy> - <policy label_suffix="decorator -> pointer"> - <child name="report_rom" label="decorator -> pointer"/> </policy> - </service> - - <service name="Report"> - <policy label_suffix="layouter -> window_layout"> - <child name="report_rom" label="layouter -> window_layout"/> </policy> - <policy label_suffix="layouter -> resize_request"> - <child name="report_rom" label="layouter -> resize_request"/> </policy> - <policy label_suffix="layouter -> focus"> - <child name="report_rom" label="layouter -> focus"/> </policy> - <policy label_suffix="layouter -> rules"> - <child name="report_rom" label="layouter -> rules"/> </policy> - <policy label_suffix="decorator -> hover"> - <child name="report_rom" label="decorator -> hover"/> </policy> - <policy label_suffix="decorator -> decorator_margins"> - <child name="report_rom" label="decorator -> decorator_margins"/> </policy> - <policy label_suffix="-> shape"> <child name="wm"/> </policy> - </service> - - <start name="report_rom"> - <resource name="RAM" quantum="4M"/> - <provides> - <service name="Report"/> - <service name="ROM"/> - </provides> - <config> - <policy label="layouter -> window_list" report="wm -> window_list"/> - <policy label="layouter -> focus_request" report="wm -> focus_request"/> - <policy label="layouter -> hover" report="decorator -> hover"/> - <policy label="layouter -> decorator_margins" report="decorator -> decorator_margins"/> - <policy label="layouter -> rules" report="layouter -> rules"/> - <policy label="decorator -> window_layout" report="layouter -> window_layout"/> - <policy label="decorator -> pointer" report="wm -> pointer"/> - <policy label="wm -> resize_request" report="layouter -> resize_request"/> - <policy label="wm -> focus" report="layouter -> focus"/> - </config> - </start> - - <start name="wm" caps="250"> - <resource name="RAM" quantum="8M"/> - <provides> - <service name="Nitpicker"/> <service name="Report"/> - </provides> - <config> - <policy label_suffix="decorator -> " role="decorator"/> - <policy label_suffix="layouter -> " role="layouter"/> - <default-policy/> - </config> - <route> - <service name="ROM" label="resize_request"> <child name="report_rom"/> </service> - <service name="ROM" label="focus"> <child name="report_rom"/> </service> - <service name="Report" label_last="shape"> <parent/> </service> - <service name="Report"> <child name="report_rom"/> </service> - <service name="Nitpicker" label=""> <parent label="focus"/> </service> - <any-service> <parent/> </any-service> - </route> - </start> - </config> - -</runtime> diff --git a/shell.nix b/shell.nix deleted file mode 100644 index d5474dc..0000000 --- a/shell.nix +++ /dev/null @@ -1,59 +0,0 @@ -{ pkgs ? import <nixpkgs> {} }: with pkgs; - -let - lddir = ./upstream/repos/base/src/ld; - toolchain = import ./errata/toolchain.nix { inherit pkgs; }; -in -pkgs.mkShell { - name = "genode-dev-env"; - nativeBuildInputs = - [ toolchain - stdenv.glibc.dev - git tup - ccache - tcl - gnumake - which - findutils - autoconf264 - autogen - cdrtools - - expect libxml2 syslinux qemu xorriso - - # libc - flex bison - - # virtualbox - yasm libxslt iasl - - # qt5 - gperf - qt5.full - - # ncurses - mawk - - # fb_sdl - pkgconfig - SDL.dev - alsaLib.dev - - # ncurses port needs infocmp - ncurses - ]; - - passthru = { inherit lddir toolchain; }; - - shellHook = - '' - 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\] " - export PS2="\[\033[1;30m\]>\[\033[0m\] " - ''; - # Setup a prompt with a distinct appearance -} diff --git a/src/fs_block/README b/src/fs_block/README deleted file mode 100644 index 4652941..0000000 --- a/src/fs_block/README +++ /dev/null @@ -1,15 +0,0 @@ -Fs_block serves an image from a file system server over a Block session. -Only one session is served at a time. Configuration is straightforward; -images are not writeable by default. - -! <config> -! <default-policy file="/image.raw" block_size="512" writeable="yes""/> -! </config> - -! <config> -! <default-policy file="/disk" writeable="yes" device_size="64G"/> -! </config> - -! <config> -! <default-policy file="/image.iso" block_size="2048"/> -! </config> diff --git a/src/fs_block/Tupfile b/src/fs_block/Tupfile deleted file mode 100644 index c07f9a3..0000000 --- a/src/fs_block/Tupfile +++ /dev/null @@ -1,17 +0,0 @@ -ifdef BUILD_BROKEN - -TARGET_NAME = fs_block -include_rules - -PKGS = genode-os genode-prg -CXXFLAGS += `$(PKG_CONFIG) --cflags $(PKGS)` - -: foreach *.cc |> !cxx |> %B.o {objs} - -: {objs} |> ^o LD %o^ \ - $(LD) `$(PKG_CONFIG) --libs $(PKGS)` %f -o %o |> %d {binary} - -: {binary} |> !collect_bin |> -include &(BIN_RULES) - -endif diff --git a/src/fs_block/component.cc b/src/fs_block/component.cc deleted file mode 100644 index 9b05891..0000000 --- a/src/fs_block/component.cc +++ /dev/null @@ -1,421 +0,0 @@ -/* - * \brief Serve blocks from a file system session - * \author Emery Hemingway - * \date 2015-09-25 - */ - -/* - * Copyright (C) 2015-2018 Genode Labs GmbH - * - * This file is part of the Genode OS framework, which is distributed - * under the terms of the GNU General Public License version 2. - */ - -#include <file_system_session/connection.h> -#include <file_system/util.h> -#include <block_session/rpc_object.h> -#include <block/driver.h> -#include <os/path.h> -#include <os/session_policy.h> -#include <root/component.h> -#include <base/attached_rom_dataspace.h> -#include <base/attached_ram_dataspace.h> -#include <base/allocator_avl.h> -#include <base/heap.h> -#include <base/component.h> - - -namespace Fs_block { - - using namespace Genode; - using namespace Block; - - struct Block_buffer; - class Session_component; - class Root_component; - - typedef Genode::Path<File_system::MAX_PATH_LEN> Path; - typedef File_system::file_size_t file_size_t; -} - - -struct Fs_block::Block_buffer -{ - Attached_ram_dataspace buffer_ds; - - Block_buffer(Genode::Env &env, size_t buffer_size) - : buffer_ds(env.pd(), env.rm(), buffer_size) { } -}; - - -class Fs_block::Session_component final : private Block_buffer, - public Block::Session_rpc_object -{ - private: - - enum { PENDING_QUEUE_COUNT = File_system::Session::TX_QUEUE_SIZE }; - Block::Packet_descriptor _pending[PENDING_QUEUE_COUNT]; - - Genode::Heap &_heap; - Genode::Allocator_avl _fs_tx_alloc { &_heap }; - File_system::Connection<void> _fs; - Signal_handler<Session_component> _fs_handler; - Signal_handler<Session_component> _blk_handler; - File_system::File_handle _handle { ~0U }; - Genode::size_t const _blk_size; - Block::sector_t _blk_count = 0; - Block::Session::Operations _ops { }; - Genode::size_t _pending_count = 0; /* pending index */ - bool _pending_sync = false; - - void _process_blk_pkt(Block::Packet_descriptor const blk_packet) - { - File_system::Session::Tx::Source &source = *_fs.tx(); - Block::Session::Tx::Sink &sink = *tx_sink(); - - File_system::seek_off_t start = blk_packet.block_number() * _blk_size; - size_t const len = blk_packet.block_count() * _blk_size; - - File_system::Packet_descriptor::Opcode op; - switch (blk_packet.operation()) { - case Block::Packet_descriptor::Opcode::READ: - op = File_system::Packet_descriptor::Opcode::READ; break; - case Block::Packet_descriptor::Opcode::WRITE: - op = File_system::Packet_descriptor::Opcode::WRITE; break; - default: - throw ~0; - } - - File_system::Packet_descriptor fs_packet( - source.alloc_packet(len), _handle, op, - len, File_system::seek_off_t(start)); - - if (op == File_system::Packet_descriptor::WRITE) - memcpy(source.packet_content(fs_packet), - sink.packet_content(blk_packet), - fs_packet.length()); - - source.submit_packet(fs_packet); - } - - void _process_blk() - { - File_system::Session::Tx::Source &source = *_fs.tx(); - Block::Session::Tx::Sink &sink = *tx_sink(); - while (sink.packet_avail() - && source.ready_to_submit() - && _pending_count < PENDING_QUEUE_COUNT) - { - Block::Packet_descriptor pkt = sink.get_packet(); - - if (pkt.size() == 0 || pkt.operation() > Block::Packet_descriptor::Opcode::WRITE) - { - warning("refusing invalid Block packet"); - sink.acknowledge_packet(pkt); - } else { - pkt.succeeded(false); - for (int i = 0; i < PENDING_QUEUE_COUNT; ++i) { - if (_pending[i].size() == 0) { - _pending[i] = pkt; - break; - } - } - ++_pending_count; - _process_blk_pkt(pkt); - } - } - } - - void _process_fs_packet() - { - File_system::Session::Tx::Source &source = *_fs.tx(); - Block::Session::Tx::Sink &sink = *tx_sink(); - - File_system::Packet_descriptor fs_packet = source.get_acked_packet(); - - Block::Packet_descriptor::Opcode op; - switch (fs_packet.operation()) { - case File_system::Packet_descriptor::Opcode::READ: - op = Block::Packet_descriptor::Opcode::READ; break; - case File_system::Packet_descriptor::Opcode::WRITE: - op = Block::Packet_descriptor::Opcode::WRITE; break; - case File_system::Packet_descriptor::Opcode::SYNC: - _pending_sync = false; - default: - source.release_packet(fs_packet); - return; - } - - Block::sector_t const blk_num = fs_packet.position() / _blk_size; - - if (_pending_count < 1) - error("got a packet but nothing pending"); - - for (int i = 0; i < PENDING_QUEUE_COUNT; ++i) { - /* process the first queue item with the same offset */ - if (_pending[i].operation() == op && - _pending[i].block_number() == blk_num) - { - size_t byte_count = min( - _pending[i].size(), fs_packet.length()); - size_t blk_count = min( - _pending[i].block_count(), byte_count / _blk_size); - - /* create a new packet with the length from the FS */ - Block::Packet_descriptor ack_pkt( - _pending[i], op, blk_num, blk_count); - ack_pkt.succeeded(fs_packet.succeeded()); - - /* wipe the queue entry */ - _pending[i] = Block::Packet_descriptor(); - --_pending_count; - - if (op == Block::Packet_descriptor::Opcode::READ) { - /* zero any trailing content (last block of file) */ - if (byte_count < ack_pkt.size()) { - memset(sink.packet_content(ack_pkt), - 0x00, ack_pkt.size()); - } - - memcpy(sink.packet_content(ack_pkt), - source.packet_content(fs_packet), - byte_count); - } - - /* free packets */ - sink.acknowledge_packet(ack_pkt); - source.release_packet(fs_packet); - break; - } - } - } - - void _process_fs() - { - Block::Session::Tx::Sink &sink = *tx_sink(); - File_system::Session::Tx::Source &source = *_fs.tx(); - while (source.ack_avail() && sink.ready_to_ack()) - _process_fs_packet(); - } - - Path _file_root(char const *file_path) - { - Path r(file_path); - r.strip_last_element(); - return r; - } - - public: - - /** - * Constructor - */ - Session_component(Genode::Env &env, - Genode::Heap &heap, - size_t tx_buf_size, - file_size_t device_size, - size_t block_size, - char const *file_path, - bool writeable) - : - Block_buffer(env, tx_buf_size), - Session_rpc_object(env.rm(), Block_buffer::buffer_ds.cap(), - env.ep().rpc_ep()), - _heap(heap), - _fs(env, _fs_tx_alloc, "", _file_root(file_path).string(), - writeable, tx_buf_size), - _fs_handler( env.ep(), *this, &Session_component::_process_fs), - _blk_handler(env.ep(), *this, &Session_component::_process_blk), - _blk_size(block_size) - { - using namespace File_system; - - /* the File_system session is rooted at the parent directory of the file */ - Path file_name(file_path); - file_name.keep_only_last_element(); - char const *name = file_name.string()+1; - - try { - Dir_handle dir = _fs.dir("/", false); - Handle_guard guard(_fs, dir); - - if (writeable) { - try { - _ops.set_operation(Block::Packet_descriptor::READ); - _ops.set_operation(Block::Packet_descriptor::WRITE); - _handle = _fs.file(dir, name, READ_WRITE, false); - } catch (Lookup_failed) { - if (device_size == 0) throw; - _handle = _fs.file(dir, name, READ_WRITE, true); - } catch (Permission_denied) { - try { - _ops.set_operation(Block::Packet_descriptor::READ); - _handle = _fs.file(dir, name, READ_ONLY, false); - } catch (Permission_denied) { - /* not likely, but still supported */ - _ops.set_operation(Block::Packet_descriptor::WRITE); - _handle = _fs.file(dir, name, WRITE_ONLY, false); - } - } - } else { - _ops.set_operation(Block::Packet_descriptor::READ); - _handle = _fs.file(dir, name, READ_ONLY, false); - } - } catch (...) { - error("failed to open ", file_path); - throw; - } - - File_system::Status st = _fs.status(_handle); - if (device_size != 0 && st.size != device_size) { - if (!writeable) { - Genode::error("cannot resize read-only file ", file_path); - throw Service_denied(); - } - try { _fs.truncate(_handle, device_size); } - catch (...) { - Genode::error("failed to resize ", file_path, " to ", Genode::Number_of_bytes(device_size)); - throw; - } - st = _fs.status(_handle); - } - - _blk_count = st.size / block_size; - if (st.size % block_size) /* round up */ - ++_blk_count; - - /* register signal handlers */ - _fs.sigh_ack_avail(_fs_handler); - _tx.sigh_packet_avail(_blk_handler); - - for (int i = 0; i < PENDING_QUEUE_COUNT; ++i) - _pending[i] = Block::Packet_descriptor(); - } - - /***************************** - ** Block session interface ** - *****************************/ - - void info(sector_t *blk_count, - Genode::size_t *blk_size, - Operations *ops) - { - *blk_count = _blk_count; - *blk_size = _blk_size; - *ops = _ops; - } - - void sync() override - { - if (_fs.tx()->ready_to_submit()) { - _fs.tx()->submit_packet(File_system::Packet_descriptor( - File_system::Packet_descriptor(), _handle, - File_system::Packet_descriptor::SYNC, 0, 0)); - _pending_sync = true; - } else { - error("cannot sync, File_system submit queue is full"); - } - } -}; - - -class Fs_block::Root_component final : - public Genode::Root_component<Fs_block::Session_component, Genode::Single_client> -{ - private: - - Genode::Env &_env; - Genode::Heap &_heap; - - Attached_rom_dataspace _config_rom { _env, "config" }; - - static - file_size_t _device_size(Xml_node const &config) - { - Genode::Number_of_bytes zero { 0 }; - return config.attribute_value("device_size", zero); - } - - protected: - - Session_component *_create_session(char const *args) override - { - Session_label const label = label_from_args(args); - - long block_size = 512; - bool writeable = false; - - _config_rom.update(); - - String<File_system::MAX_PATH_LEN> path; - Session_policy const policy(label, _config_rom.xml()); - policy.attribute("file").value(&path); - - file_size_t device_size = _device_size(policy); - block_size = policy.attribute_value("block_size", block_size); - writeable = policy.attribute_value("writeable", false); - - /* - * Check that there is sufficient quota, but the client is not - * required to pay for the entire cost of the session for two - * reasons. - * - * First, we only serve a single client at a time so a denial of - * service is not issue. If the quota is deficient the session - * is denied and the parent is not consulted. - * - * Second, we maintain a packet buffer of equal size with the - * backend that we do not expect the client to account for. - * This simplifies the implementation because any packet - * allocation at the client can be matched at the backend. - */ - - size_t ram_quota = - Arg_string::find_arg(args, "ram_quota" ).aligned_size(); - size_t tx_buf_size = - Arg_string::find_arg(args, "tx_buf_size").aligned_size(); - - if (!tx_buf_size) { - error("invalid buffer size"); - throw Service_denied(); - } - - size_t avail = ram_quota + _env.pd().avail_ram().value; - - size_t session_size = max((size_t)4096, sizeof(Session_component)); - - if ((avail < session_size) || - (tx_buf_size*2 > avail - session_size)) - { - error("insufficient 'ram_quota', got %zd, need %zd", - ram_quota, (tx_buf_size*2 + session_size) - avail); - throw Service_denied(); - } - - return new (_heap) - Session_component(_env, _heap, tx_buf_size,\ - device_size, block_size, - path.string(), writeable); - } - - public: - - /** - * Constructor - */ - Root_component(Genode::Env &env, Genode::Heap &heap) - : - Genode::Root_component<Fs_block::Session_component, Genode::Single_client>( - env.ep(), heap), - _env(env), _heap(heap) - { } -}; - - -void Component::construct(Genode::Env &env) -{ - static Genode::Heap heap(env.pd(), env.rm()); - static Fs_block::Root_component root(env, heap); - - env.parent().announce(env.ep().manage(root)); -} diff --git a/src/mp3_audio_sink/Tupfile b/src/mp3_audio_sink/Tupfile deleted file mode 100644 index ee0569f..0000000 --- a/src/mp3_audio_sink/Tupfile +++ /dev/null @@ -1,12 +0,0 @@ -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) diff --git a/src/mp3_audio_sink/component.cc b/src/mp3_audio_sink/component.cc deleted file mode 100644 index f089e41..0000000 --- a/src/mp3_audio_sink/component.cc +++ /dev/null @@ -1,352 +0,0 @@ -/* - * \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); } diff --git a/src/nic_bus/README b/src/nic_bus/README deleted file mode 100644 index d97e805..0000000 --- a/src/nic_bus/README +++ /dev/null @@ -1,4 +0,0 @@ -The nic_bus server switches packets between sessions using Ethernet headers. -Sessions may only send and receive packets with MAC addresses assigned by -the bus. For this reason it does not support attachment to ethernet hubs or -switches and is therefore not intended for use with harware interfaces. diff --git a/src/nic_bus/Tupfile b/src/nic_bus/Tupfile deleted file mode 100644 index 285a953..0000000 --- a/src/nic_bus/Tupfile +++ /dev/null @@ -1,16 +0,0 @@ -TARGET_NAME = nic_bus -LIBS += genode-os genode-prg -PKG_DEPENDS += _/src/$(TARGET_NAME) - -include_rules - -: foreach *.cc |> !cxx |> %B.o {objs} -: {objs} |> !prg |> %d {binary} -: {binary} |> !collect_bin |> - -: ./pkg.dhall |> !render_runtime |> {runtime} - -include &(BIN_RULES) -include &(PKG_RULES) - -: ./pkg.dhall |> !index_pkg |> diff --git a/src/nic_bus/bus.h b/src/nic_bus/bus.h deleted file mode 100644 index 5a0cfa3..0000000 --- a/src/nic_bus/bus.h +++ /dev/null @@ -1,126 +0,0 @@ -/* - * \brief Nic session bus - * \author Emery Hemingway - * \date 2019-04-14 - */ - -/* - * Copyright (C) 2019 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. - */ - -#ifndef _NETWORK_STATE_H_ -#define _NETWORK_STATE_H_ - -/* Genode includes */ -#include <net/ethernet.h> -#include <base/session_label.h> -#include <util/xml_node.h> - -namespace Nic_bus { - using namespace Net; - using namespace Genode; - - template <typename T> - struct Bus; -} - - -template <typename T> -struct Nic_bus::Bus -{ - struct Element; - - /* static array of sessions on the bus */ - enum { BUS_SIZE = 0xffU }; - Element *_elements[BUS_SIZE] { nullptr }; - - static uint8_t _index(Mac_address const &mac) { return mac.addr[1]; }; - - void remove(Mac_address const mac) { - _elements[_index(mac)] = nullptr; } - - Mac_address insert(Element &elem, char const *label) - { - /** - * Derive a MAC address using the FNV-1a algorithm. - */ - enum { - FNV_64_PRIME = 1099511628211U, - FNV_64_OFFSET = 14695981039346656037U, - }; - - uint64_t hash = FNV_64_OFFSET; - - char const *p = label; - while (*p) { - hash ^= *p++; - hash *= FNV_64_PRIME; - } - - for (;;) { - /* add the terminating zero */ - hash *= FNV_64_PRIME; - - uint8_t index = hash >> 32; - - if (_elements[index] != nullptr) - continue; - /* hash until a free slot is found */ - - _elements[index] = &elem; - - Mac_address mac; - mac.addr[0] = 0x02; - mac.addr[1] = index; - mac.addr[2] = hash >> 24; - mac.addr[3] = hash >> 16; - mac.addr[4] = hash >> 8; - mac.addr[5] = hash; - - return mac; - } - } - - struct Element - { - Bus &bus; - T &obj; - - Mac_address const mac; - - Element(Bus &b, T &o, char const *label) - : bus(b), obj(o), mac(bus.insert(*this, label)) { } - - ~Element() { bus.remove(mac); } - }; - - Bus() { } - - template<typename PROC> - void apply(Mac_address mac, PROC proc) - { - uint8_t const index = _index(mac); - Element *elem = _elements[index]; - if (elem != nullptr) { - if (elem->mac == mac) { - proc(elem->obj); - } - } - } - - template<typename PROC> - void apply_all(PROC proc) - { - for (auto i = 0U; i < BUS_SIZE; ++i) { - Element *elem = _elements[i]; - if (elem != nullptr) { - proc(elem->obj); - } - } - } -}; - -#endif diff --git a/src/nic_bus/main.cc b/src/nic_bus/main.cc deleted file mode 100644 index 0e6d437..0000000 --- a/src/nic_bus/main.cc +++ /dev/null @@ -1,86 +0,0 @@ -/* - * \brief Nic bus service - * \author Emery Hemingway - * \date 2019-04-10 - */ - -/* - * Copyright (C) 2019 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. - */ - -/* local includes */ -#include "session_component.h" - -/* Genode */ -#include <root/component.h> -#include <base/attached_rom_dataspace.h> -#include <os/session_policy.h> -#include <base/component.h> - -namespace Nic_bus { - using namespace Net; - using namespace Genode; - class Root; - struct Main; -} - - -class Nic_bus::Root : public Genode::Root_component<Nic_bus::Session_component> -{ - private: - - Genode::Env &_env; - - Attached_rom_dataspace _config_rom { _env, "config" }; - - Session_bus _bus { }; - - protected: - - Session_component *_create_session(const char *args) override - { - using namespace Genode; - - _config_rom.update(); - - Session_label label { label_from_args(args) }; - Session_policy policy { label, _config_rom.xml() }; - - return new (md_alloc()) - Session_component(_env.ep(), _env.ram(), _env.rm(), - ram_quota_from_args(args), - cap_quota_from_args(args), - Tx_size{Arg_string::find_arg(args, "tx_buf_size").ulong_value(0)}, - Rx_size{Arg_string::find_arg(args, "rx_buf_size").ulong_value(0)}, - _bus, - label); - } - - public: - - Root(Genode::Env &env, - Genode::Allocator &md_alloc) - : Genode::Root_component<Nic_bus::Session_component>(env.ep(), md_alloc), - _env(env) - { } -}; - - -struct Nic_bus::Main -{ - Sliced_heap _sliced_heap; - Nic_bus::Root _root; - - Main(Genode::Env &env) - : _sliced_heap(env.ram(), env.rm()), - _root(env, _sliced_heap) - { - env.parent().announce(env.ep().manage(_root)); - } -}; - - -void Component::construct(Genode::Env &env) { static Nic_bus::Main inst(env); } diff --git a/src/nic_bus/pkg.dhall b/src/nic_bus/pkg.dhall deleted file mode 100644 index ee10cc0..0000000 --- a/src/nic_bus/pkg.dhall +++ /dev/null @@ -1,25 +0,0 @@ -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>" - } - } diff --git a/src/nic_bus/session_component.h b/src/nic_bus/session_component.h deleted file mode 100644 index 3acac2c..0000000 --- a/src/nic_bus/session_component.h +++ /dev/null @@ -1,168 +0,0 @@ -/* - * \brief Nic bus session component - * \author Emery Hemingway - * \date 2019-04-14 - */ - -/* - * Copyright (C) 2019 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. - */ - -#ifndef _SESSION_COMPONENT_H_ -#define _SESSION_COMPONENT_H_ - -/* local includes */ -#include "bus.h" - -/* Genode includes */ -#include <net/ethernet.h> -#include <net/size_guard.h> -#include <nic/component.h> -#include <base/heap.h> -#include <base/session_label.h> - -namespace Nic_bus { - using namespace Net; - - struct Tx_size { Genode::size_t value; }; - struct Rx_size { Genode::size_t value; }; - - class Session_resources; - class Session_component; - - typedef Bus<Session_component> Session_bus; -} - - -/** - * Base class to manage session quotas and allocations - */ -class Nic_bus::Session_resources -{ - protected: - - Genode::Ram_quota_guard _ram_guard; - Genode::Cap_quota_guard _cap_guard; - Genode::Constrained_ram_allocator _ram_alloc; - Genode::Attached_ram_dataspace _tx_ds, _rx_ds; - Genode::Heap _alloc; - Nic::Packet_allocator _rx_pkt_alloc { &_alloc }; - - Session_resources(Genode::Ram_allocator &ram, - Genode::Region_map ®ion_map, - Genode::Ram_quota ram_quota, - Genode::Cap_quota cap_quota, - Tx_size tx_size, - Rx_size rx_size) - : - _ram_guard(ram_quota), _cap_guard(cap_quota), - _ram_alloc(ram, _ram_guard, _cap_guard), - _tx_ds(_ram_alloc, region_map, tx_size.value), - _rx_ds(_ram_alloc, region_map, rx_size.value), - _alloc(_ram_alloc, region_map) - { } -}; - - -class Nic_bus::Session_component : private Session_resources, - public Nic::Session_rpc_object -{ - private: - - Session_bus::Element _bus_elem; - - Genode::Session_label const _label; - - Genode::Io_signal_handler<Session_component> _packet_handler; - - Nic::Packet_stream_sink<::Nic::Session::Policy> &sink() { - return *_tx.sink(); } - - Nic::Packet_stream_source<::Nic::Session::Policy> &source() { - return *_rx.source(); } - - void _send(Ethernet_frame const ð, Genode::size_t const size) - { - while (source().ack_avail()) - source().release_packet(source().get_acked_packet()); - - if (!source().ready_to_submit()) return; - /* drop the packet if the queue is congested */ - - Nic::Packet_descriptor pkt = source().alloc_packet(size); - void *content = source().packet_content(pkt); - Genode::memcpy(content, (void*)ð, size); - source().submit_packet(pkt); - } - - void _handle_packet(Nic::Packet_descriptor const &pkt) - { - if (!pkt.size() || !sink().packet_valid(pkt)) return; - - Size_guard size_guard(pkt.size()); - Ethernet_frame const ð = Ethernet_frame::cast_from( - sink().packet_content(pkt), size_guard); - - if (eth.src() != _bus_elem.mac) { - Genode::warning( - eth.src(), " is not the managed MAC adress, " - "dropping packet from ", _label); - return; - } - - auto send = [&] (Session_component &other) { other._send(eth, pkt.size()); }; - - if (eth.dst().addr[0] & 1) { - /* multicast */ - _bus_elem.bus.apply_all(send); - } else { - /* unicast */ - _bus_elem.bus.apply(eth.dst(), send); - } - } - - void _handle_packets() - { - while (sink().ready_to_ack() && sink().packet_avail()) { - _handle_packet(sink().peek_packet()); - sink().acknowledge_packet(sink().get_packet()); - } - } - - public: - - Session_component(Genode::Entrypoint &ep, - Genode::Ram_allocator &ram, - Genode::Region_map ®ion_map, - Genode::Ram_quota ram_quota, - Genode::Cap_quota cap_quota, - Tx_size tx_size, - Rx_size rx_size, - Session_bus &bus, - Genode::Session_label const &label) - : - Session_resources(ram, region_map, - ram_quota, cap_quota, - tx_size, rx_size), - Nic::Session_rpc_object(region_map, - _tx_ds.cap(), _rx_ds.cap(), - &_rx_pkt_alloc, ep.rpc_ep()), - _bus_elem(bus, *this, label.string()), _label(label), - _packet_handler(ep, *this, &Session_component::_handle_packets) - { - _tx.sigh_packet_avail(_packet_handler); - _tx.sigh_ready_to_ack(_packet_handler); - } - - Nic::Mac_address mac_address() override { return _bus_elem.mac; } - - bool link_state() override { return true; } - - void link_state_sigh(Genode::Signal_context_capability) override { } - -}; - -#endif /* _SESSION_COMPONENT_H_ */ diff --git a/src/show_input/Tupfile b/src/show_input/Tupfile deleted file mode 100644 index 41ec48f..0000000 --- a/src/show_input/Tupfile +++ /dev/null @@ -1,22 +0,0 @@ -TARGET_NAME = show_input -include_rules - -LIBS = vfs genode-gems genode-os genode-base genode-prg -CXXFLAGS += `$(PKG_CONFIG) --cflags $(PKG_CONFIGS)` -LDFLAGS += `$(PKG_CONFIG) --libs $(PKG_CONFIGS)` - -: foreach *.cc |> !cxx |> %B.o {objs} - -: {objs} |> !prg |> %d {binary} - -: {binary} |> !collect_bin |> -include &(BIN_RULES) - -PKG_DEPENDS += \ - _/src/vfs \ - _/src/$(BIN_NAME) \ - -: runtime |> !collect_pkg_runtime |> -include &(PKG_RULES) - -: ./pkg.dhall |> !index_pkg |> diff --git a/src/show_input/main.cc b/src/show_input/main.cc deleted file mode 100644 index 40309f0..0000000 --- a/src/show_input/main.cc +++ /dev/null @@ -1,140 +0,0 @@ -/* - * \brief Tool for checking input events - * \author Emery Hemingway - * \date 2018-10-09 - */ - -/* - * 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. - */ - -/* Genode includes */ -#include <nitpicker_session/connection.h> -#include <framebuffer_session/connection.h> -#include <base/component.h> -#include <base/attached_rom_dataspace.h> -#include <base/log.h> -#include <base/heap.h> -#include <os/pixel_rgb565.h> -#include <os/surface.h> -#include <nitpicker_gfx/tff_font.h> -#include <nitpicker_gfx/box_painter.h> - -/* gems includes */ -#include <gems/vfs.h> -#include <gems/vfs_font.h> - - -namespace Show_input { - using namespace Genode; - typedef Surface_base::Point Point; - typedef Surface_base::Area Area; - typedef Surface_base::Rect Rect; - - struct Main; -}; - - -struct Show_input::Main -{ - Genode::Env &_env; - - Heap _heap { _env.ram(), _env.rm() }; - - Attached_rom_dataspace _config { _env, "config" }; - - Root_directory _root { _env, _heap, _config.xml().sub_node("vfs") }; - - Vfs_font _font { _heap, _root, "fonts/text/regular" }; - - Nitpicker::Connection _nitpicker { _env }; - - Input::Session_client &_input = *_nitpicker.input(); - Framebuffer::Session &_fb = *_nitpicker.framebuffer(); - - Dataspace_capability _fb_ds_cap() - { - _nitpicker.buffer(_nitpicker.mode(), false); - return _fb.dataspace(); - } - - Attached_dataspace _fb_ds { _env.rm(), _fb_ds_cap() }; - - Nitpicker::Session::View_handle _view = _nitpicker.create_view(); - - typedef Pixel_rgb565 PT; - - Surface_base::Area _size { (unsigned)_fb.mode().width(), - (unsigned)_font.height() }; - - Surface<PT> _surface { _fb_ds.local_addr<PT>(), _size }; - - void _refresh() { _fb.refresh(0, 0, _size.w(), _size.h()); } - - Signal_handler<Main> _input_sigh { - _env.ep(), *this, &Main::_handle_input }; - - void _handle_input() - { - using namespace Input; - bool refresh = false; - - _input.for_each_event([&] (Input::Event const &ev) { - ev.handle_press([&] (Keycode key, Codepoint codepoint) { - String<128> info( - key_name(key), " ", - codepoint, " " - "(", codepoint.value, ")"); - - Box_painter::paint( - _surface, - Rect(Point(), _size), - Color(0, 0, 0)); - - - Text_painter::paint( - _surface, - Text_painter::Position(0, 0), - _font, - Color(255, 255, 255), - info.string()); - refresh = true; - - auto w = _font.string_width(info.string()).decimal(); - auto h = _font.height(); - - _nitpicker.enqueue<Nitpicker::Session::Command::Geometry>( - _view, Rect(Point(0, 0), Area(w*2, h*2))); - }); - }); - - if (refresh) { - _nitpicker.execute(); - _refresh(); - } - } - - Main(Env &env) : _env(env) - { - _input.sigh(_input_sigh); - - _nitpicker.enqueue<Nitpicker::Session::Command::Geometry>( - _view, Rect(Point(0, 0), _size)); - - _nitpicker.enqueue<Nitpicker::Session::Command::To_front>( - _view, Nitpicker::Session::View_handle()); - _nitpicker.execute(); - - _surface.clip(Rect(Point(0, 0), _size)); - } -}; - - -void Component::construct(Genode::Env &env) -{ - env.exec_static_constructors(); - static Show_input::Main inst(env); -} diff --git a/src/show_input/pkg.dhall b/src/show_input/pkg.dhall deleted file mode 100644 index 54fa659..0000000 --- a/src/show_input/pkg.dhall +++ /dev/null @@ -1,38 +0,0 @@ -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> - - '' - } - } diff --git a/src/show_input/runtime b/src/show_input/runtime deleted file mode 100644 index 518a873..0000000 --- a/src/show_input/runtime +++ /dev/null @@ -1,21 +0,0 @@ -<runtime ram="12M" caps="256" binary="show_input"> - - <requires> - <file_system label="fonts"/> - <nitpicker/> - </requires> - - <content> - <rom label="show_input"/> - <rom label="vfs.lib.so"/> - </content> - - <config> - <vfs> - <dir name="fonts"> - <fs label="fonts"/> - </dir> - </vfs> - </config> - -</runtime> diff --git a/stub/.keep b/stub/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/talk/blobsets/slides.tex b/talk/blobsets/slides.tex deleted file mode 100644 index 3abc156..0000000 --- a/talk/blobsets/slides.tex +++ /dev/null @@ -1,235 +0,0 @@ -\documentclass{beamer} -\usepackage{listings} - -\usepackage{tikz} -\usetikzlibrary{shapes,arrows,positioning} - -\usetheme{Dresden} -\title[Blobsets]{Blobsets} -\author{Emery} - -\begin{document} - -\begin{frame} -\titlepage -\end{frame} - -\begin{frame}{Motivation} -Hierarchical storage is a poor abstraction for data with rich context -\pause -\\Hierarchy is weak metadata -\pause -\\Data at rest accumulates contextual metadata -\end{frame} - -\begin{frame}{UNIX / Plan 9 file-system} -\begin{itemize} -\pause \item Ergonomic, intuitive -\pause \item Stable semantics -\pause \item Optimized -\pause \item Multipurpose - bulk storage, configuration, system state, UEFI variables -\pause \item Archaic sharing model -\pause \item Migration can be messy -\pause \item SPOF -\end{itemize} -\end{frame} - -\begin{frame}{IPFS} -\begin{itemize} -\pause \item Content addressed -\pause \item Explicit namespacing -\pause \item Distributed -\pause \item Global network state - DHT -\pause \item LevelDB -\pause \item Super daemon -\pause \item Extensible -\end{itemize} -\end{frame} - -\begin{frame}{DAT} -\begin{itemize} -\pause \item Javascript -\end{itemize} -\end{frame} - -\begin{frame}{An alternative approach} -Metadata is too rich for the storage layer\\ -\begin{itemize} -\pause \item Storage without implicit structure -\pause \item Fixed, non-negotiable specification -\pause \item Deterministic, transactional updates -\pause \item Multiple least-privileged components -\pause \item Replication -\pause \item Network optional -\end{itemize} -\end{frame} - -\section{Blobsets} - -\begin{frame}{Just a hash map} -\pause -Blobs may be data of any lengths identified by a 256 bit hash. -\\~\ -\pause - -Sets are collections of blobs indexed by 64 bit keys. -\\~\ -\pause - -Keys may be derived from a hash function. -\\~\ -\pause - -Set may contain the same blob under different keys. -\\~\ -\pause - -Sets are not recursive. -\end{frame} - -\begin{frame}{Implementation} - -A set is a hash array mapped trie -\\~\ -\pause - -Set serialization is CBOR -\\~\ -\pause - -Blob hash function is a BLAKE2B-256 tree hash with 64 KiB leaves -\\~\ -\pause - -Key hash function is SipHash -\\~\ -\pause - -Approximately 1 KLOC of Nim -\\~\ - -\end{frame}{} - -\begin{frame}{BlobStore API} -\pause -\begin{block}{\lstinline{openBlobStream(BlobStore, BlobHash) -> BlobStream}} - \lstinline{get_pos(BlobStream) -> Integer} - - \lstinline{set_pos(BlobStream, Integer)} - - \lstinline{read(BlobStream, Integer) -> String} - - \lstinline{close(BlobStream)} -\end{block} -\begin{block}{\lstinline{openIngestStream(BlobStore store) -> IngestStream}} - \lstinline{write(IngestStream, String)} - - \lstinline{finish(IngestStream) -> BlobHash} - - \lstinline{cancel(IngestStream)} - -\end{block} - -\begin{block}{\lstinline{close(BlobStore store)}} -\end{block} - -\end{frame} - -\begin{frame}{BlobSet API} -\lstinline{load(BlobStore, BlobHash) -> BlobSet} -\\~\ - -\lstinline{insert(BlobStore, BlobSet, Key, BlobHash) -> BlobSet} -\\~\ - -\lstinline{remove(BlobStore, BlobSet, Key) -> BlobSet} -\\~\ - -\lstinline{union(BlobStore, BlobSet, BlobSet) -> BlobSet} -\\~\ - -\lstinline{apply(BlobStore, BlobSet, Key, Procedure)} -\\~\ - -\lstinline{randomApply(BlobStore, BlobSet, Procedure)} -\\~\ - -\lstinline{commit(BlobStore, BlobSet) -> BlobSet} -\end{frame} - -\section{Demo} -\begin{frame}{} -\center{REPL DEMO} -\end{frame} - -\section{Audio player} -\begin{frame}{Music Problem} -\begin{itemize} -\pause \item New operating system architecture -\pause \item Restricted access to audio hardware -\pause \item Audio player must be isolated -\pause \item Native audio player has no GUI or CLI -\pause \item Context, not files -\end{itemize} -\end{frame} - -\begin{frame}{} -\tikzstyle{block} = [draw, rectangle, minimum height=3em, minimum width=3em] -\tikzstyle{virtual} = [coordinate] -\begin{tikzpicture}[>=stealth,auto, node distance=1cm] - % Place nodes - \node [block] (playlist) {XSPF playlist}; - \node [block, left=of playlist, xshift=-8ex] (ext2) {EXT2}; - \node [block, above=of playlist] (audioplayer) {audio player}; - \node [block, above=of ext2] (blob_fs) {synthetic blob file-system}; - \node [block, below=of playlist] (vm) {VM}; - \node [block, below=of ext2] (blob_http) {blob HTTP service}; - - % Connect nodes - \draw [->] (blob_fs) -- node {} (ext2); - \draw [->] (blob_http) -- node {} (ext2); - \draw [->] (audioplayer) -- node {} (blob_fs); - \draw [->] (vm) -- node {} (blob_http); - \draw [->] (audioplayer) -- node {} (playlist); - \draw [->] (vm) -- node {} (playlist); -\end{tikzpicture} -\end{frame} - -\begin{frame}{MusicBrainz} - \includegraphics[height=.8\textheight,keepaspectratio]{ngs.png} -\end{frame} - -\begin{frame}{MusicBrainz} - -\begin{block} -{\url{https://musicbrainz.org/recording/7053937d-45b0-4303-ace7-0db8586821bf}} -\end{block} - -\begin{block} -{\url{https://musicbrainz.org/recording/7a677b2a-0a3b-4f62-a1fb-1385ed5c743a}} -\end{block} - -\begin{block} -{\url{https://musicbrainz.org/recording/20ff3e70-f7af-4417-b187-0935c526aebc}} -\end{block} - -\begin{block} -{\url{http://musicbrainz.org/recording/7dd9713e-0515-4011-937d-969c3a445182}} -\end{block} - -\begin{block} -{\url{https://musicbrainz.org/release/76f203a1-e7f4-45a6-b8af-0bea2bdc1c5c}} -\end{block} - -\end{frame} - -\begin{frame}{Further work} -\begin{itemize} -\pause \item Replication layer -\pause \item Lazy loading -\pause \item Garbage collection -\pause \item Books, movies, software -\end{itemize} -\end{frame} - -\end{document} diff --git a/tests/iso/a.awk b/tests/iso/a.awk deleted file mode 100644 index 0e7143e..0000000 --- a/tests/iso/a.awk +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env -S awk -f -BEGIN { - print ".set MIN_PAGE_SIZE_LOG2, 12"; - print ".set DATA_ACCESS_ALIGNM_LOG2, 3"; - print ""; - print ".section .data"; - print ""; - print ".p2align DATA_ACCESS_ALIGNM_LOG2"; - print ".global _boot_modules_headers_begin"; - print "_boot_modules_headers_begin:"; - print ""; -} - -{ - print ADDR_TYPE" _boot_module_"NR"_name"; - print ADDR_TYPE" _boot_module_"NR"_begin"; - print ADDR_TYPE" _boot_module_"NR"_end - _boot_module_"NR"_begin"; - print ""; -} - -END { - print ".global _boot_modules_headers_end"; - print "_boot_modules_headers_end:"; - print ""; -} diff --git a/tests/iso/b.awk b/tests/iso/b.awk deleted file mode 100644 index 63fdef6..0000000 --- a/tests/iso/b.awk +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env -S awk -f - -BEGIN { - FS = "/" - -} - -{ - print ".p2align DATA_ACCESS_ALIGNM_LOG2"; - print "_boot_module_"NR"_name:"; - print ".string \""$(NF)"\""; - print ".byte 0"; - print ""; -} diff --git a/tests/iso/c.awk b/tests/iso/c.awk deleted file mode 100644 index ea7f029..0000000 --- a/tests/iso/c.awk +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env -S awk -f -BEGIN { - print ".section .data.boot_modules_binaries"; - print ""; - print ".global _boot_modules_binaries_begin"; - print "_boot_modules_binaries_begin:"; - print ""; -} - -{ - print ".p2align MIN_PAGE_SIZE_LOG2"; - print "_boot_module_"NR"_begin:"; - print ".incbin \""$0"\""; - print "_boot_module_"NR"_end:"; - print ""; -} - -END { - print ".p2align MIN_PAGE_SIZE_LOG2"; - print ".global _boot_modules_binaries_end"; - print "_boot_modules_binaries_end:"; - print ""; -} diff --git a/tests/iso/isolinux.cfg b/tests/iso/isolinux.cfg deleted file mode 100644 index 523755e..0000000 --- a/tests/iso/isolinux.cfg +++ /dev/null @@ -1,5 +0,0 @@ -SERIAL -DEFAULT 0 -LABEL 0 - KERNEL mboot.c32 - APPEND /hypervisor_x86_64 iommu novpid serial --- /image_elf.gz diff --git a/tool/default.nix b/tool/default.nix deleted file mode 100644 index fa1b53a..0000000 --- a/tool/default.nix +++ /dev/null @@ -1,477 +0,0 @@ -/* - * \brief Tools and utility functions - * \author Emery Hemingway - * \date 2014-09-30 - */ - -{ nixpkgs ? import <nixpkgs> { } }: - -with builtins; - -rec { - inherit nixpkgs; - inherit (nixpkgs) fetchurl; - - ## - # Add a prefix to a list of strings. - addPrefix = prefix: map (s: prefix+s); - - ## - # Determine if any of the following libs are shared. - anyShared = libs: - let h = head libs; in - if libs == [] then false else - if h.shared or false then true else anyShared (tail libs); - - ## - # Drop a suffix from the end of a string. - dropSuffix = suf: str: - let - strL = stringLength str; - sufL = stringLength suf; - in - if lessThan strL sufL || substring (sub strL sufL) strL str != suf - then abort "${str} does not have suffix ${suf}" - else substring 0 (sub strL sufL) str; - - ## - # Generate a list of file paths from a directory and - # filenames. - fromDir = dir: map (s: dir+("/"+s)); - - ## - # Utility functions for gathering sources. - fromGlob = - dir: glob: - let - dirName = dir.name or baseNameOf (toString dir); - in - import (shellDerivation { - name = "${dirName}-glob.nix"; - script = ./from-glob.sh; - #PATH="${nixpkgs.coreutils}/bin"; - inherit dir glob; - }); - - fromPath = path: [ [ path (baseNameOf (toString path)) ] ]; - fromPaths = paths: map (p: [ p (baseNameOf (toString p)) ]) paths; - - ## - # Filter out libs that are not derivations - filterFakeLibs = libs: filter (lib: hasAttr "shared" lib) libs; - - ## - # Test if a string ends in '.h'. - hasDotH = s: substring (sub (stringLength s) 2) 2 s == ".h"; - hasDotHH = s: substring (sub (stringLength s) 3) 3 s == ".hh"; - hasDotHPP = s: substring (sub (stringLength s) 4) 4 s == ".hpp"; - - ## - # Filter out everything but *.h on a path. - # Prevents files that exist alongside headers from changing header path hash. - filterHeaders = dir: filterSource - (path: type: hasDotH path || hasDotHH path || hasDotHPP path || type == "directory") - dir; - - ## - # Find a filename in a search path. - findFile = fn: searchPath: - if searchPath == [] then [] - else - let - sp = head searchPath; - fn' = sp + "/${fn}"; - in - if builtins.typeOf fn' != "path" then [] else - if pathExists fn' then - [ { key = fn'; relative = fn; } ] - else findFile fn (tail searchPath); - - findIncludes = main: path: - map (x: [ x.key x.relative ]) (genericClosure { - startSet = [ { key = main; relative = baseNameOf (toString main); } ]; - operator = - { key, ... }: - let - includes = import (includesOf key); - includesFound = - nixpkgs.lib.concatMap - (fn: findFile fn ([ (dirOf main) ] ++ path)) - includes; - in includesFound; - }); - - ## - # Recursively find libraries. - findLibraries = libs: - let - list = map (lib: { key = lib.name; inherit lib; }); - in - map (x: x.lib) (genericClosure { - startSet = list libs; - operator = { key, lib }: list lib.libs or []; - }); - - ## - # Recursively find libraries to link. - findLinkLibraries = libs: - let - list = libs: map - (lib: { key = lib.name; inherit lib; }) - (filter (lib: hasAttr "drvPath" lib) libs); - in - map (x: x.lib) (genericClosure { - startSet = list libs; - operator = - { key, lib }: - if lib.shared then [] - else list lib.libs or []; - }); - - findLocalIncludes = main: path: - let path' = [ (dirOf main) ] ++ path; in - map (x: [ x.key x.relative ]) (genericClosure { - startSet = [ { key = main; relative = baseNameOf (toString main); } ]; - operator = - { key, ... }: - let - includes = import (localIncludesOf key); - includesFound = - nixpkgs.lib.concatMap - (fn: findFile fn path') - includes; - in includesFound; - }); - - ## - # Recursively find shared libraries. - findRuntimeLibraries = libs: - let - filter = libs: builtins.filter (lib: lib.shared) libs; - list = libs: - map (lib: { key = lib.name; inherit lib; }) libs; - in - filter (map (x: x.lib) (genericClosure { - startSet = list libs; - operator = - { key, lib }: - list ([lib ] ++ lib.libs); - })); - - ## - # Determine if a string has the given suffix. - hasSuffix = suf: str: - let - strL = stringLength str; - sufL = stringLength suf; - in - if lessThan strL sufL then false else - substring (sub strL sufL) strL str == suf; - - includesOf = file: - import (derivation { - name = - if typeOf file == "path" - then "${baseNameOf (toString file)}-includes" - else "includes"; - system = currentSystem; - preferLocalBuild = true; - builder = "${nixpkgs.perl}/bin/perl"; - args = [ ./find-includes.pl ]; - inherit file; - }); - - ## - # Create a bootable ISO. - iso = - { name, contents, kernel, kernelArgs }: - shellDerivation { - name = "${name}.iso"; - script = ./iso.sh; - PATH="${nixpkgs.coreutils}/bin:${nixpkgs.cdrkit}/bin:${nixpkgs.binutils}/bin"; - inherit kernel kernelArgs; - inherit (nixpkgs) syslinux cdrkit; - sources = map (x: x.source) contents; - targets = map (x: x.target) contents; - }; - - ## - # Generate a contents list of runtime libraries for a package. - # This will go away as tool.runtime matures. - libContents = contents: builtins.concatLists (map ( - content: - map (source: { target = "/"; inherit source; }) content.source.runtime.libs or [] - ) contents); - - localIncludesOf = main: derivation { - name = - if typeOf main == "path" - then "${baseNameOf (toString main)}-local-includes" - else "local-includes"; - system = currentSystem; - preferLocalBuild = true; - builder = "${nixpkgs.perl}/bin/perl"; - args = [ ./find-local-includes.pl ]; - inherit main; - }; - - ## - # Merge an attr between two sets. - mergeAttr = - name: s1: s2: - let - a1 = getAttr name s1; - a2 = getAttr name s2; - type1 = typeOf a1; - type2 = typeOf a2; - in - if type1 == "null" then a2 else if type2 == "null" then a1 else - if type1 != type2 then abort "cannot merge ${name}s of type ${type1} and ${type2}" else - if type1 == "set" then mergeSet a1 a2 else - if type1 == "list" then a1 ++ a2 else - if type1 == "string" then "${a1} ${a2}" else - #if type1 == "int" then add a1 a2 else - abort "cannot merge ${type1} ${name} ${toString a1} ${toString a2}"; - - ## - # Merge two sets together. - mergeSet = s1: s2: - s1 // s2 // (listToAttrs (map - (name: { inherit name; value = mergeAttr name s1 s2; }) - (attrNames (intersectAttrs s1 s2)) - )); - - ## - # Merge a list of sets. - mergeSets = - sets: - if sets == [] then {} else - mergeSet (head sets) (mergeSets (tail sets)); - - newDir = - name: contents: - derivation { - inherit name contents; - system = builtins.currentSystem; - preferLocalBuild = true; - builder = shell; - PATH="${nixpkgs.coreutils}/bin"; - args = [ "-e" "-c" '' - mkdir -p $out ; \ - for i in $contents; do cp -Hr $i $out; done - '' ]; - }; - - ## - # Generate a list of paths from a path and a shell glob. - pathsFromGlob = dir: glob: - let path = toString dir; in - import (derivation { - name = "${baseNameOf path}-glob.nix"; - args = [ "-e" "-O" "nullglob" ./path-from-glob.sh ]; - inherit dir glob path; - preferLocalBuild = true; - }); - - preparePort = import ./prepare-port { inherit nixpkgs; }; - - # Concatenate the named attr found in pkgs. - propagate = attrName: pkgs: - let - pkg = head pkgs; - in - if pkgs == [] then [] else - ( if hasAttr attrName pkg - then getAttr attrName pkg - else [] - ) ++ - (propagate attrName (tail pkgs)); - - - ## - # Replace substring a with substring b in string s. - replaceInString = - a: b: s: - let - al = stringLength a; - bl = stringLength b; - sl = stringLength s; - in - if al == 0 then s else - if sl == 0 then "" else - if ((substring 0 al s) == a) then - b+(replaceInString a b (substring al sl s)) - else - (substring 0 1 s) + (replaceInString a b (substring 1 sl s)); - - shell = nixpkgs.bash + "/bin/sh"; - - # Save some typing when creating derivation that use our shell. - shellDerivation = { script, ... } @ args: - derivation ( (removeAttrs args [ "script" ]) // - { system = builtins.currentSystem; - builder = shell; - args = [ "-e" script ]; - } - ); - - singleton = x: [x]; - - # Bootability is not assured, so its really system image. - systemImage = import ./system-image { inherit nixpkgs; }; - bootImage = systemImage; # get rid of this - - - wildcard = - path: glob: - let - relativePaths = import (shellDerivation { - name = "files.nix"; - PATH="${nixpkgs.coreutils}/bin"; - script = ./wildcard.sh; - inherit path glob; - - }); - in - map (rp: (path+"/${rp}")) relativePaths; - - # Appends string context from another string - addContextFrom = a: b: substring 0 0 a + b; - - # Compares strings not requiring context equality - # Obviously, a workaround but works on all Nix versions - eqStrings = a: b: addContextFrom b a == addContextFrom a b; - - - ## - # Cut a string with a separator and produces a list of strings which were - # separated by this separator. e.g., - # `splitString "." "foo.bar.baz"' returns ["foo" "bar" "baz"]. - # From nixpkgs. - splitString = _sep: _s: - let - sep = addContextFrom _s _sep; - s = addContextFrom _sep _s; - sepLen = stringLength sep; - sLen = stringLength s; - lastSearch = sLen - sepLen; - startWithSep = startAt: - substring startAt sepLen s == sep; - - recurse = index: startAt: - let cutUntil = i: [(substring startAt (i - startAt) s)]; in - if index < lastSearch then - if startWithSep index then - let restartAt = index + sepLen; in - cutUntil index ++ recurse restartAt restartAt - else - recurse (index + 1) startAt - else - cutUntil sLen; - in - recurse 0 0; - ## - # What I thought builtins.match would do. - matchPattern = pat: str: - concatLists ( - map - ( l: - let m = match pat l; in - if m == null then [] else m - ) - (splitString "\n" str) - ); - - ## - # Generate a set of local ("") and system (<>) - # preprocessor include directives from a file. - relativeIncludes = file: - let - matches = pattern: lines: - concatLists (filter (x: x != null) (map (match pattern) lines)); - lines = splitString "\n" (readFile file); - in - { local = matches ''.*#include\s*"([^>]*)".*'' lines; - system = matches ''.*#include\s*<([^>]*)>.*'' lines; - }; - - ## - # Find a file in a set of directories. - findFile' = key: dirs: - if substring 0 1 key == "!" then builtins.trace "found a !key" key else - if dirs == [] then null else - let abs = (builtins.head dirs) +"/${key}"; in - if builtins.pathExists abs then abs - else findFile' key (builtins.tail dirs); - - ## - # Generate a set of relative to absolute include mappings from a file. - # This set includes a mapping from the orginal file basename to its - # absolute path. - # - # The genericClosure primative applies an operation to a list of sets that - # contain the attribute 'key'. This operation returns a similar list of sets, - # and genericClosure appends elements of that list that contain a key - # that does not already exist in the previous set. All sets returned by this - # operation contain a function to resolve the relative path at 'key' into an - # absolute one at 'abs', and a function to parse the absolute path at 'abs' - # into a list of relative includes at 'inc'. GenericClosure discards any set - # with a relative path at 'key' that it has already been seen, and thus due - # to lazy evaulation, no relative path is resolved or parsed twice. - # - # A ! is prepended to the files of the initial set, to differentiate them from - # files with unsolved locations and to satisfy the requirement that strings - # not directly reference store paths in findFile' - includesOfFiles = files: searchPath: - let - concat = sets: - if sets == [] then {} else - let x = head sets; in - (if x.abs == null || substring 0 1 x.key == "!" then {} else { "${x.key}" = x.abs; }) // concat (tail sets); - in - concat (genericClosure { - # Can the startSet really be filled with elements sharing a key? - startSet = map (abs: { key = "!${abs}"; inherit abs; inc = includesOf abs; }) files; - operator = - { key, abs, inc }: if abs == null then [] else let abs' = abs; in - (map - (key: rec { inherit key; abs = (findFile' key searchPath); inc = includesOf abs; }) - inc.system) - ++ - (map - (key: rec { inherit key; abs = (findFile' key (if typeOf abs' == "path" then searchPath ++ [ (dirOf abs') ] else searchPath)); inc = relativeIncludes abs; }) - inc.local); - }); - - ## - # Load expressions from a directory path and apply func. - loadExpressions = func: path: - let - dirSet = builtins.readDir path; - default = - if builtins.hasAttr "default.nix" dirSet - then func (import (path + "/default.nix")) - else {}; - in - default // (builtins.listToAttrs (builtins.filter (x: x != {}) (map - (name: - let - type = builtins.getAttr name dirSet; - more = loadExpressions func (path + "/${name}"); - in - if type == "directory" - then { inherit name; value = more; } - else - if - (type == "regular" || type == "symlink") && - (hasSuffix ".nix" name) - then - { name = dropSuffix ".nix" name; - value = func (import (path+"/${name}")); - } - else { } - ) - (builtins.attrNames dirSet) - ))); - -} diff --git a/tool/prepare-port/builder.sh b/tool/prepare-port/builder.sh deleted file mode 100644 index 3c9255d..0000000 --- a/tool/prepare-port/builder.sh +++ /dev/null @@ -1,10 +0,0 @@ -export PATH= -for i in $initialPath; do - if [ "$i" = / ]; then i=; fi - PATH=$PATH${PATH:+:}$i/bin -done - -mkdir $out - -sed -e "s^@initialPath@^$initialPath^g" \ - < $setup > $out/setup diff --git a/tool/prepare-port/default-builder.sh b/tool/prepare-port/default-builder.sh deleted file mode 100644 index 0f81f60..0000000 --- a/tool/prepare-port/default-builder.sh +++ /dev/null @@ -1,2 +0,0 @@ -source $preparePort/setup -genericBuild diff --git a/tool/prepare-port/default.nix b/tool/prepare-port/default.nix deleted file mode 100644 index 5c6ca44..0000000 --- a/tool/prepare-port/default.nix +++ /dev/null @@ -1,39 +0,0 @@ -{ nixpkgs }: -let - shell = nixpkgs.bash + "/bin/sh"; - - initialPath = - [ nixpkgs.coreutils - nixpkgs.findutils - nixpkgs.diffutils - nixpkgs.gawk - nixpkgs.gnugrep - nixpkgs.gnused - nixpkgs.gnutar - nixpkgs.patch - nixpkgs.gzip - nixpkgs.bzip2 - nixpkgs.xz - ]; -in -{ name -, outputs ? [ "out" ] -, preferLocalBuild ? true -, ... } @ attrs: -derivation (attrs // { - inherit name outputs initialPath; - - preparePort = derivation { - name = "prepare-port"; - system = builtins.currentSystem; - builder = shell; - args = [ "-e" ./builder.sh ]; - setup = ./setup.sh; - inherit initialPath; - }; - - system = builtins.currentSystem; - - builder = attrs.realBuilder or shell; - args = attrs.args or [ "-e" (attrs.builder or ./default-builder.sh) ]; -}) diff --git a/tool/prepare-port/setup.sh b/tool/prepare-port/setup.sh deleted file mode 100644 index e120810..0000000 --- a/tool/prepare-port/setup.sh +++ /dev/null @@ -1,1221 +0,0 @@ -set -eu -set -o pipefail - -if (( "${NIX_DEBUG:-0}" >= 6 )); then - set -x -fi - -: ${outputs:=out} - - -###################################################################### -# Hook handling. - - -# Run all hooks with the specified name in the order in which they -# were added, stopping if any fails (returns a non-zero exit -# code). The hooks for <hookName> are the shell function or variable -# <hookName>, and the values of the shell array ‘<hookName>Hooks’. -runHook() { - local oldOpts="$(shopt -po nounset)" - set -u # May be called from elsewhere, so do `set -u`. - - local hookName="$1" - shift - local hooksSlice="${hookName%Hook}Hooks[@]" - - local hook - # Hack around old bash being bad and thinking empty arrays are - # undefined. - for hook in "_callImplicitHook 0 $hookName" ${!hooksSlice+"${!hooksSlice}"}; do - _eval "$hook" "$@" - set -u # To balance `_eval` - done - - eval "${oldOpts}" - return 0 -} - - -# Run all hooks with the specified name, until one succeeds (returns a -# zero exit code). If none succeed, return a non-zero exit code. -runOneHook() { - local oldOpts="$(shopt -po nounset)" - set -u # May be called from elsewhere, so do `set -u`. - - local hookName="$1" - shift - local hooksSlice="${hookName%Hook}Hooks[@]" - - local hook ret=1 - # Hack around old bash like above - for hook in "_callImplicitHook 1 $hookName" ${!hooksSlice+"${!hooksSlice}"}; do - if _eval "$hook" "$@"; then - ret=0 - break - fi - set -u # To balance `_eval` - done - - eval "${oldOpts}" - return "$ret" -} - - -# Run the named hook, either by calling the function with that name or -# by evaluating the variable with that name. This allows convenient -# setting of hooks both from Nix expressions (as attributes / -# environment variables) and from shell scripts (as functions). If you -# want to allow multiple hooks, use runHook instead. -_callImplicitHook() { - set -u - local def="$1" - local hookName="$2" - case "$(type -t "$hookName")" in - (function|alias|builtin) - set +u - "$hookName";; - (file) - set +u - source "$hookName";; - (keyword) :;; - (*) if [ -z "${!hookName:-}" ]; then - return "$def"; - else - set +u - eval "${!hookName}" - fi;; - esac - # `_eval` expects hook to need nounset disable and leave it - # disabled anyways, so Ok to to delegate. The alternative of a - # return trap is no good because it would affect nested returns. -} - - -# A function wrapper around ‘eval’ that ensures that ‘return’ inside -# hooks exits the hook, not the caller. Also will only pass args if -# command can take them -_eval() { - if [ "$(type -t "$1")" = function ]; then - set +u - "$@" # including args - else - set +u - eval "$1" - fi - # `run*Hook` reenables `set -u` -} - - -###################################################################### -# Logging. - -# Obsolete. -stopNest() { true; } -header() { echo "$1"; } -closeNest() { true; } - -# Prints a command such that all word splits are unambiguous. We need -# to split the command in three parts because the middle format string -# will be, and must be, repeated for each argument. The first argument -# goes before the ':' and is just for convenience. -echoCmd() { - printf "%s:" "$1" - shift - printf ' %q' "$@" - echo -} - - -###################################################################### -# Error handling. - -exitHandler() { - exitCode="$?" - set +e - - if [ -n "${showBuildStats:-}" ]; then - times > "$NIX_BUILD_TOP/.times" - local -a times=($(cat "$NIX_BUILD_TOP/.times")) - # Print the following statistics: - # - user time for the shell - # - system time for the shell - # - user time for all child processes - # - system time for all child processes - echo "build time elapsed: " "${times[@]}" - fi - - if (( "$exitCode" != 0 )); then - runHook failureHook - - # If the builder had a non-zero exit code and - # $succeedOnFailure is set, create the file - # ‘$out/nix-support/failed’ to signal failure, and exit - # normally. Otherwise, return the original exit code. - if [ -n "${succeedOnFailure:-}" ]; then - echo "build failed with exit code $exitCode (ignored)" - mkdir -p "$out/nix-support" - printf "%s" "$exitCode" > "$out/nix-support/failed" - exit 0 - fi - - else - runHook exitHook - fi - - exit "$exitCode" -} - -trap "exitHandler" EXIT - - -###################################################################### -# Helper functions. - - -addToSearchPathWithCustomDelimiter() { - local delimiter="$1" - local varName="$2" - local dir="$3" - if [ -d "$dir" ]; then - export "${varName}=${!varName:+${!varName}${delimiter}}${dir}" - fi -} - -addToSearchPath() { - addToSearchPathWithCustomDelimiter ":" "$@" -} - -# Add $1/lib* into rpaths. -# The function is used in multiple-outputs.sh hook, -# so it is defined here but tried after the hook. -_addRpathPrefix() { - if [ "${NIX_NO_SELF_RPATH:-0}" != 1 ]; then - export NIX_LDFLAGS="-rpath $1/lib $NIX_LDFLAGS" - if [ -n "${NIX_LIB64_IN_SELF_RPATH:-}" ]; then - export NIX_LDFLAGS="-rpath $1/lib64 $NIX_LDFLAGS" - fi - if [ -n "${NIX_LIB32_IN_SELF_RPATH:-}" ]; then - export NIX_LDFLAGS="-rpath $1/lib32 $NIX_LDFLAGS" - fi - fi -} - -# Return success if the specified file is an ELF object. -isELF() { - local fn="$1" - local fd - local magic - exec {fd}< "$fn" - read -r -n 4 -u "$fd" magic - exec {fd}<&- - if [ "$magic" = $'\177ELF' ]; then return 0; else return 1; fi -} - -# Return success if the specified file is a script (i.e. starts with -# "#!"). -isScript() { - local fn="$1" - local fd - local magic - exec {fd}< "$fn" - read -r -n 2 -u "$fd" magic - exec {fd}<&- - if [[ "$magic" =~ \#! ]]; then return 0; else return 1; fi -} - -# printf unfortunately will print a trailing newline regardless -printLines() { - (( "$#" > 0 )) || return 0 - printf '%s\n' "$@" -} - -printWords() { - (( "$#" > 0 )) || return 0 - printf '%s ' "$@" -} - -###################################################################### -# Initialisation. - - -# Set a fallback default value for SOURCE_DATE_EPOCH, used by some -# build tools to provide a deterministic substitute for the "current" -# time. Note that 1 = 1970-01-01 00:00:01. We don't use 0 because it -# confuses some applications. -export SOURCE_DATE_EPOCH -: ${SOURCE_DATE_EPOCH:=1} - - -# Wildcard expansions that don't match should expand to an empty list. -# This ensures that, for instance, "for i in *; do ...; done" does the -# right thing. -shopt -s nullglob - - -# Set up the initial path. -PATH= -HOST_PATH= -for i in $initialPath; do - if [ "$i" = / ]; then i=; fi - addToSearchPath PATH "$i/bin" - - # For backward compatibility, we add initial path to HOST_PATH so - # it can be used in auto patch-shebangs. Unfortunately this will - # not work with cross compilation. - if [ -z "${strictDeps-}" ]; then - addToSearchPath HOST_PATH "$i/bin" - fi -done - -if (( "${NIX_DEBUG:-0}" >= 1 )); then - echo "initial path: $PATH" -fi - - -# Check that the pre-hook initialised SHELL. -if [ -z "${SHELL:-}" ]; then echo "SHELL not set"; exit 1; fi -BASH="$SHELL" -export CONFIG_SHELL="$SHELL" - - -# Execute the pre-hook. -if [ -z "${shell:-}" ]; then export shell="$SHELL"; fi -runHook preHook - - -# Allow the caller to augment buildInputs (it's not always possible to -# do this before the call to setup.sh, since the PATH is empty at that -# point; here we have a basic Unix environment). -runHook addInputsHook - - -# Package accumulators - -# shellcheck disable=SC2034 -declare -a pkgsBuildBuild pkgsBuildHost pkgsBuildTarget -declare -a pkgsHostHost pkgsHostTarget -declare -a pkgsTargetTarget - -declare -ra pkgBuildAccumVars=(pkgsBuildBuild pkgsBuildHost pkgsBuildTarget) -declare -ra pkgHostAccumVars=(pkgsHostHost pkgsHostTarget) -declare -ra pkgTargetAccumVars=(pkgsTargetTarget) - -declare -ra pkgAccumVarVars=(pkgBuildAccumVars pkgHostAccumVars pkgTargetAccumVars) - - -# Hooks - -declare -a envBuildBuildHooks envBuildHostHooks envBuildTargetHooks -declare -a envHostHostHooks envHostTargetHooks -declare -a envTargetTargetHooks - -declare -ra pkgBuildHookVars=(envBuildBuildHook envBuildHostHook envBuildTargetHook) -declare -ra pkgHostHookVars=(envHostHostHook envHostTargetHook) -declare -ra pkgTargetHookVars=(envTargetTargetHook) - -declare -ra pkgHookVarVars=(pkgBuildHookVars pkgHostHookVars pkgTargetHookVars) - -# Add env hooks for all sorts of deps with the specified host offset. -addEnvHooks() { - local depHostOffset="$1" - shift - local pkgHookVarsSlice="${pkgHookVarVars[$depHostOffset + 1]}[@]" - local pkgHookVar - for pkgHookVar in "${!pkgHookVarsSlice}"; do - eval "${pkgHookVar}s"'+=("$@")' - done -} - - -# Propagated dep files - -declare -ra propagatedBuildDepFiles=( - propagated-build-build-deps - propagated-native-build-inputs # Legacy name for back-compat - propagated-build-target-deps -) -declare -ra propagatedHostDepFiles=( - propagated-host-host-deps - propagated-build-inputs # Legacy name for back-compat -) -declare -ra propagatedTargetDepFiles=( - propagated-target-target-deps -) -declare -ra propagatedDepFilesVars=( - propagatedBuildDepFiles - propagatedHostDepFiles - propagatedTargetDepFiles -) - -# Platform offsets: build = -1, host = 0, target = 1 -declare -ra allPlatOffsets=(-1 0 1) - - -# Mutually-recursively find all build inputs. See the dependency section of the -# stdenv chapter of the Nixpkgs manual for the specification this algorithm -# implements. -findInputs() { - local -r pkg="$1" - local -ri hostOffset="$2" - local -ri targetOffset="$3" - - # Sanity check - (( "$hostOffset" <= "$targetOffset" )) || exit -1 - - local varVar="${pkgAccumVarVars[$hostOffset + 1]}" - local varRef="$varVar[\$targetOffset - \$hostOffset]" - local var="${!varRef}" - unset -v varVar varRef - - # TODO(@Ericson2314): Restore using associative array once Darwin - # nix-shell doesn't use impure bash. This should replace the O(n) - # case with an O(1) hash map lookup, assuming bash is implemented - # well :D. - local varSlice="$var[*]" - # ${..-} to hack around old bash empty array problem - case "${!varSlice-}" in - *" $pkg "*) return 0 ;; - esac - unset -v varSlice - - eval "$var"'+=("$pkg")' - - if ! [ -e "$pkg" ]; then - echo "build input $pkg does not exist" >&2 - exit 1 - fi - - # The current package's host and target offset together - # provide a <=-preserving homomorphism from the relative - # offsets to current offset - function mapOffset() { - local -ri inputOffset="$1" - if (( "$inputOffset" <= 0 )); then - local -ri outputOffset="$inputOffset + $hostOffset" - else - local -ri outputOffset="$inputOffset - 1 + $targetOffset" - fi - echo "$outputOffset" - } - - # Host offset relative to that of the package whose immediate - # dependencies we are currently exploring. - local -i relHostOffset - for relHostOffset in "${allPlatOffsets[@]}"; do - # `+ 1` so we start at 0 for valid index - local files="${propagatedDepFilesVars[$relHostOffset + 1]}" - - # Host offset relative to the package currently being - # built---as absolute an offset as will be used. - local -i hostOffsetNext - hostOffsetNext="$(mapOffset relHostOffset)" - - # Ensure we're in bounds relative to the package currently - # being built. - [[ "${allPlatOffsets[*]}" = *"$hostOffsetNext"* ]] || continue - - # Target offset relative to the *host* offset of the package - # whose immediate dependencies we are currently exploring. - local -i relTargetOffset - for relTargetOffset in "${allPlatOffsets[@]}"; do - (( "$relHostOffset" <= "$relTargetOffset" )) || continue - - local fileRef="${files}[$relTargetOffset - $relHostOffset]" - local file="${!fileRef}" - unset -v fileRef - - # Target offset relative to the package currently being - # built. - local -i targetOffsetNext - targetOffsetNext="$(mapOffset relTargetOffset)" - - # Once again, ensure we're in bounds relative to the - # package currently being built. - [[ "${allPlatOffsets[*]}" = *"$targetOffsetNext"* ]] || continue - - [[ -f "$pkg/nix-support/$file" ]] || continue - - local pkgNext - for pkgNext in $(< "$pkg/nix-support/$file"); do - findInputs "$pkgNext" "$hostOffsetNext" "$targetOffsetNext" - done - done - done -} - -# Make sure all are at least defined as empty -: ${depsBuildBuild=} ${depsBuildBuildPropagated=} -: ${nativeBuildInputs=} ${propagatedNativeBuildInputs=} ${defaultNativeBuildInputs=} -: ${depsBuildTarget=} ${depsBuildTargetPropagated=} -: ${depsHostHost=} ${depsHostHostPropagated=} -: ${buildInputs=} ${propagatedBuildInputs=} ${defaultBuildInputs=} -: ${depsTargetTarget=} ${depsTargetTargetPropagated=} - -for pkg in $depsBuildBuild $depsBuildBuildPropagated; do - findInputs "$pkg" -1 -1 -done -for pkg in $nativeBuildInputs $propagatedNativeBuildInputs; do - findInputs "$pkg" -1 0 -done -for pkg in $depsBuildTarget $depsBuildTargetPropagated; do - findInputs "$pkg" -1 1 -done -for pkg in $depsHostHost $depsHostHostPropagated; do - findInputs "$pkg" 0 0 -done -for pkg in $buildInputs $propagatedBuildInputs ; do - findInputs "$pkg" 0 1 -done -for pkg in $depsTargetTarget $depsTargetTargetPropagated; do - findInputs "$pkg" 1 1 -done -# Default inputs must be processed last -for pkg in $defaultNativeBuildInputs; do - findInputs "$pkg" -1 0 -done -for pkg in $defaultBuildInputs; do - findInputs "$pkg" 0 1 -done - -# Add package to the future PATH and run setup hooks -activatePackage() { - local pkg="$1" - local -ri hostOffset="$2" - local -ri targetOffset="$3" - - # Sanity check - (( "$hostOffset" <= "$targetOffset" )) || exit -1 - - if [ -f "$pkg" ]; then - local oldOpts="$(shopt -po nounset)" - set +u - source "$pkg" - eval "$oldOpts" - fi - - # Only dependencies whose host platform is guaranteed to match the - # build platform are included here. That would be `depsBuild*`, - # and legacy `nativeBuildInputs`, in general. If we aren't cross - # compiling, however, everything can be put on the PATH. To ease - # the transition, we do include everything in thatcase. - # - # TODO(@Ericson2314): Don't special-case native compilation - if [[ ( -z "${strictDeps-}" || "$hostOffset" -le -1 ) && -d "$pkg/bin" ]]; then - addToSearchPath _PATH "$pkg/bin" - fi - - if [[ "$hostOffset" -eq 0 && -d "$pkg/bin" ]]; then - addToSearchPath _HOST_PATH "$pkg/bin" - fi - - if [[ -f "$pkg/nix-support/setup-hook" ]]; then - local oldOpts="$(shopt -po nounset)" - set +u - source "$pkg/nix-support/setup-hook" - eval "$oldOpts" - fi -} - -_activatePkgs() { - local -i hostOffset targetOffset - local pkg - - for hostOffset in "${allPlatOffsets[@]}"; do - local pkgsVar="${pkgAccumVarVars[$hostOffset + 1]}" - for targetOffset in "${allPlatOffsets[@]}"; do - (( "$hostOffset" <= "$targetOffset" )) || continue - local pkgsRef="${pkgsVar}[$targetOffset - $hostOffset]" - local pkgsSlice="${!pkgsRef}[@]" - for pkg in ${!pkgsSlice+"${!pkgsSlice}"}; do - activatePackage "$pkg" "$hostOffset" "$targetOffset" - done - done - done -} - -# Run the package setup hooks and build _PATH -_activatePkgs - -# Set the relevant environment variables to point to the build inputs -# found above. -# -# These `depOffset`s, beyond indexing the arrays, also tell the env -# hook what sort of dependency (ignoring propagatedness) is being -# passed to the env hook. In a real language, we'd append a closure -# with this information to the relevant env hook array, but bash -# doesn't have closures, so it's easier to just pass this in. -_addToEnv() { - local -i depHostOffset depTargetOffset - local pkg - - for depHostOffset in "${allPlatOffsets[@]}"; do - local hookVar="${pkgHookVarVars[$depHostOffset + 1]}" - local pkgsVar="${pkgAccumVarVars[$depHostOffset + 1]}" - for depTargetOffset in "${allPlatOffsets[@]}"; do - (( "$depHostOffset" <= "$depTargetOffset" )) || continue - local hookRef="${hookVar}[$depTargetOffset - $depHostOffset]" - if [[ -z "${strictDeps-}" ]]; then - - # Keep track of which packages we have visited before. - local visitedPkgs="" - - # Apply environment hooks to all packages during native - # compilation to ease the transition. - # - # TODO(@Ericson2314): Don't special-case native compilation - for pkg in \ - ${pkgsBuildBuild+"${pkgsBuildBuild[@]}"} \ - ${pkgsBuildHost+"${pkgsBuildHost[@]}"} \ - ${pkgsBuildTarget+"${pkgsBuildTarget[@]}"} \ - ${pkgsHostHost+"${pkgsHostHost[@]}"} \ - ${pkgsHostTarget+"${pkgsHostTarget[@]}"} \ - ${pkgsTargetTarget+"${pkgsTargetTarget[@]}"} - do - if [[ "$visitedPkgs" = *"$pkg"* ]]; then - continue - fi - runHook "${!hookRef}" "$pkg" - visitedPkgs+=" $pkg" - done - else - local pkgsRef="${pkgsVar}[$depTargetOffset - $depHostOffset]" - local pkgsSlice="${!pkgsRef}[@]" - for pkg in ${!pkgsSlice+"${!pkgsSlice}"}; do - runHook "${!hookRef}" "$pkg" - done - fi - done - done -} - -# Run the package-specific hooks set by the setup-hook scripts. -_addToEnv - - -# Set the TZ (timezone) environment variable, otherwise commands like -# `date' will complain (e.g., `Tue Mar 9 10:01:47 Local time zone must -# be set--see zic manual page 2004'). -export TZ=UTC - - -if [ "${useTempPrefix:-}" = 1 ]; then - prefix="$NIX_BUILD_TOP/tmp_prefix"; -fi - - -PATH="${_PATH-}${_PATH:+${PATH:+:}}$PATH" -HOST_PATH="${_HOST_PATH-}${_HOST_PATH:+${HOST_PATH:+:}}$HOST_PATH" -if (( "${NIX_DEBUG:-0}" >= 1 )); then - echo "final path: $PATH" - echo "final host path: $HOST_PATH" -fi - -unset _PATH -unset _HOST_PATH - - -# Make GNU Make produce nested output. -export NIX_INDENT_MAKE=1 - - -# Normalize the NIX_BUILD_CORES variable. The value might be 0, which -# means that we're supposed to try and auto-detect the number of -# available CPU cores at run-time. - -if [ -z "${NIX_BUILD_CORES:-}" ]; then - NIX_BUILD_CORES="1" -elif [ "$NIX_BUILD_CORES" -le 0 ]; then - NIX_BUILD_CORES=$(nproc 2>/dev/null || true) - if expr >/dev/null 2>&1 "$NIX_BUILD_CORES" : "^[0-9][0-9]*$"; then - : - else - NIX_BUILD_CORES="1" - fi -fi -export NIX_BUILD_CORES - - -# Prevent SSL libraries from using certificates in /etc/ssl, unless set explicitly. -# Leave it in impure shells for convenience. -if [ -z "${NIX_SSL_CERT_FILE:-}" ] && [ "${IN_NIX_SHELL:-}" != "impure" ]; then - export NIX_SSL_CERT_FILE=/no-cert-file.crt -fi -# Another variant left for compatibility. -if [ -z "${SSL_CERT_FILE:-}" ] && [ "${IN_NIX_SHELL:-}" != "impure" ]; then - export SSL_CERT_FILE=/no-cert-file.crt -fi - - -###################################################################### -# Textual substitution functions. - - -substituteStream() { - local var=$1 - local description=$2 - shift 2 - - while (( "$#" )); do - case "$1" in - --replace) - pattern="$2" - replacement="$3" - shift 3 - local savedvar - savedvar="${!var}" - eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}' - if [ "$pattern" != "$replacement" ]; then - if [ "${!var}" == "$savedvar" ]; then - echo "substituteStream(): WARNING: pattern '$pattern' doesn't match anything in $description" >&2 - fi - fi - ;; - - --subst-var) - local varName="$2" - shift 2 - # check if the used nix attribute name is a valid bash name - if ! [[ "$varName" =~ ^[a-zA-Z_][a-zA-Z0-9_]*$ ]]; then - echo "substituteStream(): ERROR: substitution variables must be valid Bash names, \"$varName\" isn't." >&2 - return 1 - fi - if [ -z ${!varName+x} ]; then - echo "substituteStream(): ERROR: variable \$$varName is unset" >&2 - return 1 - fi - pattern="@$varName@" - replacement="${!varName}" - eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}' - ;; - - --subst-var-by) - pattern="@$2@" - replacement="$3" - eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}' - shift 3 - ;; - - *) - echo "substituteStream(): ERROR: Invalid command line argument: $1" >&2 - return 1 - ;; - esac - done - - printf "%s" "${!var}" -} - -consumeEntire() { - # read returns non-0 on EOF, so we want read to fail - if IFS='' read -r -N 0 $1; then - echo "consumeEntire(): ERROR: Input null bytes, won't process" >&2 - return 1 - fi -} - -substitute() { - local input="$1" - local output="$2" - shift 2 - - if [ ! -f "$input" ]; then - echo "substitute(): ERROR: file '$input' does not exist" >&2 - return 1 - fi - - local content - consumeEntire content < "$input" - - if [ -e "$output" ]; then chmod +w "$output"; fi - substituteStream content "file '$input'" "$@" > "$output" -} - -substituteInPlace() { - local fileName="$1" - shift - substitute "$fileName" "$fileName" "$@" -} - -_allFlags() { - for varName in $(awk 'BEGIN { for (v in ENVIRON) if (v ~ /^[a-z][a-zA-Z0-9_]*$/) print v }'); do - if (( "${NIX_DEBUG:-0}" >= 1 )); then - printf "@%s@ -> %q\n" "${varName}" "${!varName}" - fi - args+=("--subst-var" "$varName") - done -} - -substituteAllStream() { - local -a args=() - _allFlags - - substituteStream "$1" "$2" "${args[@]}" -} - -# Substitute all environment variables that start with a lowercase character and -# are valid Bash names. -substituteAll() { - local input="$1" - local output="$2" - - local -a args=() - _allFlags - - substitute "$input" "$output" "${args[@]}" -} - - -substituteAllInPlace() { - local fileName="$1" - shift - substituteAll "$fileName" "$fileName" "$@" -} - - -###################################################################### -# What follows is the generic builder. - - -# This function is useful for debugging broken Nix builds. It dumps -# all environment variables to a file `env-vars' in the build -# directory. If the build fails and the `-K' option is used, you can -# then go to the build directory and source in `env-vars' to reproduce -# the environment used for building. -dumpVars() { - if [ "${noDumpEnvVars:-0}" != 1 ]; then - export > "$NIX_BUILD_TOP/env-vars" || true - fi -} - - -# Utility function: echo the base name of the given path, with the -# prefix `HASH-' removed, if present. -stripHash() { - local strippedName - # On separate line for `set -e` - strippedName="$(basename "$1")" - if echo "$strippedName" | grep -q '^[a-z0-9]\{32\}-'; then - echo "$strippedName" | cut -c34- - else - echo "$strippedName" - fi -} - - -unpackCmdHooks+=(_defaultUnpack) -_defaultUnpack() { - local fn="$1" - - if [ -d "$fn" ]; then - - # We can't preserve hardlinks because they may have been - # introduced by store optimization, which might break things - # in the build. - cp -pr --reflink=auto -- "$fn" "$(stripHash "$fn")" - - else - - case "$fn" in - *.tar.xz | *.tar.lzma | *.txz) - # Don't rely on tar knowing about .xz. - xz -d < "$fn" | tar xf - ${tarFlags} - ;; - *.tar | *.tar.* | *.tgz | *.tbz2 | *.tbz) - # GNU tar can automatically select the decompression method - # (info "(tar) gzip"). - tar xf "$fn" ${tarFlags} - ;; - *) - return 1 - ;; - esac - - fi -} - - -unpackFile() { - curSrc="$1" - header "unpacking source archive $curSrc" 3 - if ! runOneHook unpackCmd "$curSrc"; then - echo "do not know how to unpack source archive $curSrc" - exit 1 - fi -} - - -unpackPhase() { - runHook preUnpack - - if [ -z "${srcs:-}" ]; then - if [ -z "${src:-}" ]; then - # shellcheck disable=SC2016 - echo 'variable $src or $srcs should point to the source' - exit 1 - fi - srcs="$src" - fi - - # To determine the source directory created by unpacking the - # source archives, we record the contents of the current - # directory, then look below which directory got added. Yeah, - # it's rather hacky. - local dirsBefore="" - for i in *; do - if [ -d "$i" ]; then - dirsBefore="$dirsBefore $i " - fi - done - - # Unpack all source archives. - for i in $srcs; do - unpackFile "$i" - done - - # Find the source directory. - - # set to empty if unset - : ${sourceRoot=} - - if [ -n "${setSourceRoot:-}" ]; then - runOneHook setSourceRoot - elif [ -z "$sourceRoot" ]; then - for i in *; do - if [ -d "$i" ]; then - case $dirsBefore in - *\ $i\ *) - ;; - *) - if [ -n "$sourceRoot" ]; then - echo "unpacker produced multiple directories" - exit 1 - fi - sourceRoot="$i" - ;; - esac - fi - done - fi - - if [ -z "$sourceRoot" ]; then - echo "unpacker appears to have produced no directories" - exit 1 - fi - - echo "source root is $sourceRoot" - - # By default, add write permission to the sources. This is often - # necessary when sources have been copied from other store - # locations. - if [ "${dontMakeSourcesWritable:-0}" != 1 ]; then - chmod -R u+w -- "$sourceRoot" - fi - - runHook postUnpack -} - - -patchPhase() { - runHook prePatch - - for i in ${patches:-}; do - header "applying patch $i" 3 - local uncompress=cat - case "$i" in - *.gz) - uncompress="gzip -d" - ;; - *.bz2) - uncompress="bzip2 -d" - ;; - *.xz) - uncompress="xz -d" - ;; - *.lzma) - uncompress="lzma -d" - ;; - esac - # "2>&1" is a hack to make patch fail if the decompressor fails (nonexistent patch, etc.) - # shellcheck disable=SC2086 - $uncompress < "$i" 2>&1 | patch ${patchFlags:--p1} - done - - runHook postPatch -} - - -fixLibtool() { - sed -i -e 's^eval sys_lib_.*search_path=.*^^' "$1" -} - - -buildPhase() { - runHook preBuild - runHook postBuild -} - - -checkPhase() { - runHook preCheck - - if [[ -z "${foundMakefile:-}" ]]; then - echo "no Makefile or custom buildPhase, doing nothing" - runHook postCheck - return - fi - - if [[ -z "${checkTarget:-}" ]]; then - #TODO(@oxij): should flagsArray influence make -n? - if make -n ${makefile:+-f $makefile} check >/dev/null 2>&1; then - checkTarget=check - elif make -n ${makefile:+-f $makefile} test >/dev/null 2>&1; then - checkTarget=test - fi - fi - - if [[ -z "${checkTarget:-}" ]]; then - echo "no check/test target in ${makefile:-Makefile}, doing nothing" - else - # Old bash empty array hack - # shellcheck disable=SC2086 - local flagsArray=( - ${enableParallelChecking:+-j${NIX_BUILD_CORES} -l${NIX_BUILD_CORES}} - SHELL=$SHELL - $makeFlags ${makeFlagsArray+"${makeFlagsArray[@]}"} - ${checkFlags:-VERBOSE=y} ${checkFlagsArray+"${checkFlagsArray[@]}"} - ${checkTarget} - ) - - echoCmd 'check flags' "${flagsArray[@]}" - make ${makefile:+-f $makefile} "${flagsArray[@]}" - - unset flagsArray - fi - - runHook postCheck -} - - -installPhase() { - runHook preInstall - - if [ -n "$source" ]; then - mkdir -p "$source" - fi - - cp -r ./* "$source" - - runHook postInstall -} - - -# The fixup phase performs generic, package-independent stuff, like -# stripping binaries, running patchelf and setting -# propagated-build-inputs. -fixupPhase() { - # Make sure everything is writable so "strip" et al. work. - local output - for output in $outputs; do - if [ -e "${!output}" ]; then chmod -R u+w "${!output}"; fi - done - - runHook preFixup - - # Apply fixup to each output. - local output - for output in $outputs; do - prefix="${!output}" runHook fixupOutput - done - - - # Propagate dependencies & setup hook into the development output. - declare -ra flatVars=( - # Build - depsBuildBuildPropagated - propagatedNativeBuildInputs - depsBuildTargetPropagated - # Host - depsHostHostPropagated - propagatedBuildInputs - # Target - depsTargetTargetPropagated - ) - declare -ra flatFiles=( - "${propagatedBuildDepFiles[@]}" - "${propagatedHostDepFiles[@]}" - "${propagatedTargetDepFiles[@]}" - ) - - local propagatedInputsIndex - for propagatedInputsIndex in "${!flatVars[@]}"; do - local propagatedInputsSlice="${flatVars[$propagatedInputsIndex]}[@]" - local propagatedInputsFile="${flatFiles[$propagatedInputsIndex]}" - - [[ "${!propagatedInputsSlice}" ]] || continue - - mkdir -p "${!outputDev}/nix-support" - # shellcheck disable=SC2086 - printWords ${!propagatedInputsSlice} > "${!outputDev}/nix-support/$propagatedInputsFile" - done - - - if [ -n "${setupHook:-}" ]; then - mkdir -p "${!outputDev}/nix-support" - substituteAll "$setupHook" "${!outputDev}/nix-support/setup-hook" - fi - - # TODO(@Ericson2314): Remove after https://github.com/NixOS/nixpkgs/pull/31414 - if [ -n "${setupHooks:-}" ]; then - mkdir -p "${!outputDev}/nix-support" - local hook - for hook in $setupHooks; do - local content - consumeEntire content < "$hook" - substituteAllStream content "file '$hook'" >> "${!outputDev}/nix-support/setup-hook" - unset -v content - done - unset -v hook - fi - - # Propagate user-env packages into the output with binaries, TODO? - - if [ -n "${propagatedUserEnvPkgs:-}" ]; then - mkdir -p "${!outputBin}/nix-support" - # shellcheck disable=SC2086 - printWords $propagatedUserEnvPkgs > "${!outputBin}/nix-support/propagated-user-env-packages" - fi - - runHook postFixup -} - - -installCheckPhase() { - runHook preInstallCheck - - if [[ -z "${foundMakefile:-}" ]]; then - echo "no Makefile or custom buildPhase, doing nothing" - #TODO(@oxij): should flagsArray influence make -n? - elif [[ -z "${installCheckTarget:-}" ]] \ - && ! make -n ${makefile:+-f $makefile} ${installCheckTarget:-installcheck} >/dev/null 2>&1; then - echo "no installcheck target in ${makefile:-Makefile}, doing nothing" - else - # Old bash empty array hack - # shellcheck disable=SC2086 - local flagsArray=( - ${enableParallelChecking:+-j${NIX_BUILD_CORES} -l${NIX_BUILD_CORES}} - SHELL=$SHELL - $makeFlags ${makeFlagsArray+"${makeFlagsArray[@]}"} - $installCheckFlags ${installCheckFlagsArray+"${installCheckFlagsArray[@]}"} - ${installCheckTarget:-installcheck} - ) - - echoCmd 'installcheck flags' "${flagsArray[@]}" - make ${makefile:+-f $makefile} "${flagsArray[@]}" - unset flagsArray - fi - - runHook postInstallCheck -} - - -distPhase() { - runHook preDist - - # Old bash empty array hack - # shellcheck disable=SC2086 - local flagsArray=( - $distFlags ${distFlagsArray+"${distFlagsArray[@]}"} ${distTarget:-dist} - ) - - echo 'dist flags: %q' "${flagsArray[@]}" - make ${makefile:+-f $makefile} "${flagsArray[@]}" - - if [ "${dontCopyDist:-0}" != 1 ]; then - mkdir -p "$out/tarballs" - - # Note: don't quote $tarballs, since we explicitly permit - # wildcards in there. - # shellcheck disable=SC2086 - cp -pvd ${tarballs:-*.tar.gz} "$out/tarballs" - fi - - runHook postDist -} - - -showPhaseHeader() { - local phase="$1" - case "$phase" in - unpackPhase) header "unpacking sources";; - patchPhase) header "patching sources";; - configurePhase) header "configuring";; - buildPhase) header "building";; - checkPhase) header "running tests";; - installPhase) header "installing";; - fixupPhase) header "post-installation fixup";; - installCheckPhase) header "running install tests";; - *) header "$phase";; - esac -} - - -genericBuild() { - header "preparing $out" - - if [ -f "${buildCommandPath:-}" ]; then - local oldOpts="$(shopt -po nounset)" - set +u - source "$buildCommandPath" - eval "$oldOpts" - return - fi - if [ -n "${buildCommand:-}" ]; then - local oldOpts="$(shopt -po nounset)" - set +u - eval "$buildCommand" - eval "$oldOpts" - return - fi - - if [ -z "$phases" ]; then - phases="unpackPhase patchPhase buildPhase installPhase" - fi - - - for curPhase in $phases; do - if [[ -n $NIX_LOG_FD ]]; then - echo "@nix { \"action\": \"setPhase\", \"phase\": \"$curPhase\" }" >&$NIX_LOG_FD - fi - - showPhaseHeader "$curPhase" - dumpVars - - # Evaluate the variable named $curPhase if it exists, otherwise the - # function named $curPhase. - local oldOpts="$(shopt -po nounset)" - set +u - eval "${!curPhase:-$curPhase}" - eval "$oldOpts" - - if [ "$curPhase" = unpackPhase ]; then - cd "${sourceRoot:-.}" - fi - done -} - - -# Execute the post-hooks. -runHook postHook - - -# Execute the global user hook (defined through the Nixpkgs -# configuration option ‘stdenv.userHook’). This can be used to set -# global compiler optimisation flags, for instance. -runHook userHook - - -dumpVars - -# Disable nounset for nix-shell. -set +u diff --git a/toolchain.nix b/toolchain.nix deleted file mode 100644 index 038d9ab..0000000 --- a/toolchain.nix +++ /dev/null @@ -1,68 +0,0 @@ -{ nixpkgs ? import <nixpkgs> {} }: with nixpkgs; - -let - genodeVersion = "19.05"; - glibcVersion = (builtins.parseDrvName stdenv.glibc.name).version; - -in -stdenv.mkDerivation rec { - name = "genode-toolchain-${genodeVersion}"; - version = genodeVersion; - - src = - if stdenv.isx86_64 then - fetchurl { - url = "https://downloads.sourceforge.net/project/genode/genode-toolchain/${genodeVersion}/genode-toolchain-${genodeVersion}-x86_64.tar.xz"; - sha256 = "036czy21zk7fvz1y1p67q3d5hgg8rb8grwabgrvzgdsqcv2ls6l9"; - } - else abort "no toolchain for ${stdenv.system}"; - - buildInputs = [ patchelf ]; - - dontPatchELF = true; - - # installPhase is disabled for now - phases = "unpackPhase fixupPhase"; - - unpackPhase = '' - mkdir -p $out - - echo "unpacking $src..." - tar xf $src --strip-components=5 -C $out - ''; - - installPhase = '' - cd $out/bin - for platform in arm x86 ; do - dest="$"$platform"/bin" - eval dest=$"$dest" - - mkdir -p $dest - - for b in genode-$platform-* ; do - eval ln -s $b $dest/$\{b#genode-$platform-\} - done - - done - cd - - ''; - - fixupPhase = '' - interp=${stdenv.glibc.out}/lib/ld-${glibcVersion}.so - if [ ! -f "$interp" ] ; then - echo new interpreter $interp does not exist, - echo cannot patch binaries - exit 1 - fi - - for f in $(find $out); do - if [ -f "$f" ] && patchelf "$f" 2> /dev/null; then - patchelf --set-interpreter $interp \ - --set-rpath $out/lib:${stdenv.glibc.out}/lib:${zlib.out}/lib \ - "$f" || true - fi - done - ''; - - passthru = { libc = stdenv.glibc; }; -} diff --git a/upstream b/upstream deleted file mode 160000 index b15148c..0000000 --- a/upstream +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b15148c7283a278ee3fbfeda34a6a34a39ad761c diff --git a/upstream.nix b/upstream.nix deleted file mode 100644 index f528ff3..0000000 --- a/upstream.nix +++ /dev/null @@ -1,60 +0,0 @@ -{ nixpkgs ? import <nixpkgs> {} }: - -let - inherit (nixpkgs) stdenv fetchgit git tup pkg-config; - - toolchain = import ./toolchain.nix { inherit nixpkgs; }; - version = "19.07-322-gfe24051cd"; -in -stdenv.mkDerivation { - name = "genode"; - outputs = [ "out" "dev" ]; - inherit version; - - src = fetchgit { - url = "git://depot.h4ck.me/srv/git/genode"; - rev = "fe24051cd811d5e769104ffd7228d35a72a3d93c"; - sha256 = "09wl7q1xc7fvnj8zcb4ix1ipqzxrgp6sbdsqp92r2gxqkadyrpxc"; - }; - - nativeBuildInputs = - [ toolchain - stdenv.glibc.dev - git tup pkg-config - ]; - - configurePhase = - '' - # Populate the SDK headers - mkdir -p $out $dev/include $dev/pkg-config $dev/lib - cp -r repos/base/src/ld $dev/ld - cp -r repos/base/include $dev/include/base - cp -r repos/os/include $dev/include/os - - # Use specialized build configuration - substitute configs/nix-x86_64.config tup.config \ - --replace @NIX_DEV_OUTPUT@ $dev \ - --replace @NIX_DEPOT_VERSION@ ${version} \ - - # Scan repository and generate script - mkdir lib - tup init - tup generate buildPhase.sh - - # Redirect SDK artifacts - rm -r depot lib - ln -s $out depot - ln -s $dev/pkg-config pkg-config - ln -s $dev/lib lib - ''; - - buildPhase = - '' - local HOST_LIBC=${stdenv.glibc.dev} - set -v - source buildPhase.sh - ''; - - # Use "genode-base.pc" when not building internals - installPhase = "rm $dev/pkg-config/base.pc"; -} diff --git a/vm/fetchers/Tuprules.tup b/vm/fetchers/Tuprules.tup deleted file mode 100644 index d4de327..0000000 --- a/vm/fetchers/Tuprules.tup +++ /dev/null @@ -1,29 +0,0 @@ -ifeq ($(URL),) -error URL not defined -endif - -ifeq ($(SHA256),) -error SHA256 not defined -endif - -PKG_DEPENDS += \ - @(PUBLIC_SRC_VFS) \ - @(PUBLIC_SRC_LIBC) \ - @(PUBLIC_SRC_INIT) \ - @(PUBLIC_SRC_LIBPNG) \ - @(PUBLIC_SRC_LIBSSL) \ - @(PUBLIC_SRC_LIBCRYPTO) \ - @(PUBLIC_SRC_MENU_VIEW) \ - @(PUBLIC_SRC_REPORT_ROM) \ - @(PUBLIC_SRC_VFS_LWIP) \ - @(PUBLIC_SRC_ZLIB) \ - _/raw/vbox_install_x86_64 \ - _/src/fetch_and_copy \ - -: $(TUP_CWD)/runtime.in |> ^ SED %o^ \ - sed \ - -e 's|@URL@|$(URL)|' \ - -e 's|@SHA256@|$(SHA256)|' \ - %f > %o |> %B - -: runtime |> !collect_pkg_runtime |> {package} diff --git a/vm/fetchers/alpine_x86_64/Tupfile b/vm/fetchers/alpine_x86_64/Tupfile deleted file mode 100644 index 20b0871..0000000 --- a/vm/fetchers/alpine_x86_64/Tupfile +++ /dev/null @@ -1,4 +0,0 @@ -TARGET_NAME = fetch_alpine_x86_64 -URL = http://dl-cdn.alpinelinux.org/alpine/v3.9/releases/x86_64/alpine-virt-3.9.3-x86_64.iso -SHA256 = 98e2eb7cfe74ede72d99cfd574a3c5e85a9aca5743d786abc9bbe7e0923f211b -include_rules diff --git a/vm/fetchers/freebsd_12_amd64/Tupfile b/vm/fetchers/freebsd_12_amd64/Tupfile deleted file mode 100644 index 496a464..0000000 --- a/vm/fetchers/freebsd_12_amd64/Tupfile +++ /dev/null @@ -1,4 +0,0 @@ -TARGET_NAME = fetch_freebsd_12_amd64 -URL = https://download.freebsd.org/ftp/releases/amd64/amd64/ISO-IMAGES/12.0/FreeBSD-12.0-RELEASE-amd64-bootonly.iso -SHA256 = 5964301f5b9c7f9cb7dab297452ce9583848cf200f2b582470b6d7c971c15ce7 -include_rules diff --git a/vm/fetchers/nixos_x86_64/Tupfile b/vm/fetchers/nixos_x86_64/Tupfile deleted file mode 100644 index 3e46753..0000000 --- a/vm/fetchers/nixos_x86_64/Tupfile +++ /dev/null @@ -1,4 +0,0 @@ -TARGET_NAME = fetch_nixos_x86_64 -URL = https://releases.nixos.org/nixos/19.03/nixos-19.03.172348.89354141608/nixos-minimal-19.03.172348.89354141608-x86_64-linux.iso -SHA256 = 4d9b4de081d5e0bbe3c526aa93113710e2974791fd9b62851dc52d7a36366514 -include_rules diff --git a/vm/fetchers/openbsd_amd64/Tupfile b/vm/fetchers/openbsd_amd64/Tupfile deleted file mode 100644 index 6711a71..0000000 --- a/vm/fetchers/openbsd_amd64/Tupfile +++ /dev/null @@ -1,4 +0,0 @@ -TARGET_NAME = fetch_openbsd_amd64 -URL = https://cdn.openbsd.org/pub/OpenBSD/6.5/amd64/install65.iso -SHA256 = 38d1f8cadd502f1c27bf05c5abde6cc505dd28f3f34f8a941048ff9a54f9f608 -include_rules diff --git a/vm/fetchers/runtime.in b/vm/fetchers/runtime.in deleted file mode 100644 index 8fd3cf5..0000000 --- a/vm/fetchers/runtime.in +++ /dev/null @@ -1,109 +0,0 @@ -<runtime ram="24M" caps="768" binary="init"> - - <requires> - <file_system label="fonts"/> - <file_system label="target"/> - <nic/> - <nitpicker/> - </requires> - - <content> - <rom label="fetch_and_copy"/> - <rom label="init"/> - <rom label="libc.lib.so"/> - <rom label="libcrypto.lib.so"/> - <rom label="libm.lib.so"/> - <rom label="libpng.lib.so"/> - <rom label="libssl.lib.so"/> - <rom label="machine.vdi"/> - <rom label="menu_view"/> - <rom label="menu_view_styles.tar"/> - <rom label="machine.vbox"/> - <rom label="report_rom"/> - <rom label="vfs.lib.so"/> - <rom label="vfs_lwip.lib.so"/> - <rom label="zlib.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"/> - <service name="Nic"/> - </parent-provides> - - <default-route> - <any-service> <parent/> </any-service> - </default-route> - - <default caps="128"/> - - <start name="report_rom"> - <resource name="RAM" quantum="1M"/> - <provides> - <service name="Report"/> - <service name="ROM"/> - </provides> - <config> - <policy label="dialog" report="dialog"/> - </config> - </start> - - <start name="menu_view" caps="256"> - <resource name="RAM" quantum="8M"/> - <config> - <libc stderr="/dev/log"/> - <vfs> - <tar name="menu_view_styles.tar" /> - <dir name="dev"> <log/> </dir> - <dir name="fonts"> <fs label="fonts"/> </dir> - </vfs> - </config> - <route> - <service name="File_system" label="fonts"> - <parent label="fonts"/> </service> - <service name="ROM" label="dialog"> - <child name="report_rom" label="dialog"/> </service> - <any-service> <parent/> </any-service> - </route> - </start> - - <start name="fetch_and_copy" caps="256"> - <resource name="RAM" quantum="16M"/> - <config> - <libc stdout="/dev/log" stderr="/dev/log" socket="/socket" rtc="/dev/rtc"/> - <vfs> - <dir name="dev"> - <inline name="rtc">2018-01-01 00:01</inline> - <log/> <zero name="random"/> - </dir> - <dir name="socket"> <lwip dhcp="yes"/> </dir> - <dir name="target"> <fs label="target"/> </dir> - <dir name="rom"> - <rom name="machine.vbox"/> - <rom name="machine.vdi"/> - </dir> - </vfs> - <fetch url="@URL@" - path="/target/installer.iso" - sha256="@SHA256@"/> - <copy from="/rom/machine.vbox" to="/target/machine.vbox"/> - <copy from="/rom/machine.vdi" to="/target/machine.vdi"/> - </config> - <route> - <service name="File_system" label="target"> - <parent label="target"/> </service> - <service name="Report" label="dialog"> - <child name="report_rom" label="dialog"/> </service> - <any-service> <parent/> </any-service> - </route> - </start> - </config> - -</runtime> diff --git a/vm/fetchers/trueos/Tupfile b/vm/fetchers/trueos/Tupfile deleted file mode 100644 index e681c8c..0000000 --- a/vm/fetchers/trueos/Tupfile +++ /dev/null @@ -1,4 +0,0 @@ -TARGET_NAME = trueos -URL = https://pkg.trueos.org/iso/18.12/TrueOS-Stable-x64-18.12.iso -SHA256 = 0c0a986a2340224c07a4cf96325b5eb6e5d3ded8fbed44a6ea2f7ba765177846 -include_rules diff --git a/vm/fetchers/ubuntu_x86_64/Tupfile b/vm/fetchers/ubuntu_x86_64/Tupfile deleted file mode 100644 index 550eb43..0000000 --- a/vm/fetchers/ubuntu_x86_64/Tupfile +++ /dev/null @@ -1,4 +0,0 @@ -TARGET_NAME = fetch_ubuntu_x86_64 -URL = http://archive.ubuntu.com/ubuntu/dists/disco/main/installer-amd64/current/images/netboot/mini.iso -SHA256 = 9c80874dbd5f583b32819921c2f44c0fe96050cfd77be1ed38738cb2ea3339eb -include_rules diff --git a/vm/openbsd/openbsd-65-base.pub b/vm/openbsd/openbsd-65-base.pub deleted file mode 100644 index 9ccf334..0000000 --- a/vm/openbsd/openbsd-65-base.pub +++ /dev/null @@ -1,2 +0,0 @@ -untrusted comment: openbsd 6.5 base public key -RWSZaRmt1LEQT9CtPygf9CvONu8kYPTlVEJdysNoUR62/NkeWgdkc3zY diff --git a/vm/openbsd/version.tup b/vm/openbsd/version.tup deleted file mode 100644 index 20dc315..0000000 --- a/vm/openbsd/version.tup +++ /dev/null @@ -1,4 +0,0 @@ -MAJOR = 6 -MINOR = 5 -RAW_VERSION = $(MAJOR).$(MINOR) -VERSION = $(MAJOR)$(MINOR) diff --git a/vm/openbsd_seoul_installer/Tupfile b/vm/openbsd_seoul_installer/Tupfile deleted file mode 100644 index f727334..0000000 --- a/vm/openbsd_seoul_installer/Tupfile +++ /dev/null @@ -1,18 +0,0 @@ -TARGET_NAME = openbsd_seoul_nova_installer -IMAGE_TYPE = miniroot -IMAGE_NAME = $(IMAGE_TYPE)65.fs - -include_rules - - -PKG_DEPENDS += \ - @(PUBLIC_SRC_BASE_NOVA) \ - @(PUBLIC_SRC_INIT) \ - @(PUBLIC_SRC_ROM_BLOCK) \ - @(PUBLIC_SRC_SEOUL_NOVA) \ - _/raw/openbsd-miniroot-i386 \ - -: ../seoul_installer_runtime.in |> sed 's/@IMAGE_NAME@/$(IMAGE_NAME)/' %f > %o |> runtime -: runtime |> !collect_pkg_runtime |> - -include &(PKG_RULES) diff --git a/vm/seoul-nova/Tupfile b/vm/seoul-nova/Tupfile deleted file mode 100644 index 56d8764..0000000 --- a/vm/seoul-nova/Tupfile +++ /dev/null @@ -1,15 +0,0 @@ -TARGET_NAME = seoul-nova -include_rules - -: vm_seoul.cfg |> !collect_raw |> - -PKG_DEPENDS += \ - @(PUBLIC_SRC_BASE_NOVA) \ - @(PUBLIC_SRC_INIT) \ - @(PUBLIC_SRC_NIT_FB) \ - @(PUBLIC_SRC_SEOUL_NOVA) \ - _/raw/$(TARGET_NAME) \ - -: runtime |> !collect_pkg_runtime |> - -include &(RAW_RULES) diff --git a/vm/seoul-nova/runtime b/vm/seoul-nova/runtime deleted file mode 100644 index 9ee01bb..0000000 --- a/vm/seoul-nova/runtime +++ /dev/null @@ -1,83 +0,0 @@ -<runtime ram="512M" caps="2200" binary="init"> - - <requires> - <block label="primary"/> - <block label="secondary"/> - <nic/> - <nitpicker/> - <rm/> - <rom label="platform_info"/> - <rtc/> - </requires> - - <content> - <rom label="init"/> - <rom label="nit_fb"/> - <rom label="seoul"/> - <rom label="timer"/> - <rom label="vm_seoul.cfg"/> - </content> - - <config verbose="yes" prio_levels="2"> - - <parent-provides> - <service name="ROM"/> - <service name="PD"/> - <service name="RM"/> - <service name="CPU"/> - <service name="LOG"/> - <service name="Block"/> - <service name="File_system"/> - <service name="Nitpicker"/> - <service name="Rtc"/> - <service name="Nic"/> - </parent-provides> - - <default caps="100"/> - - <start name="timer"> - <resource name="RAM" quantum="1M"/> - <provides><service name="Timer"/></provides> - <config/> - <route> - <service name="ROM" label="platform_info"> - <parent label="platform_info"/> </service> - <any-service> <parent/> </any-service> - </route> - </start> - - <start name="nit_fb" priority="0"> - <resource name="RAM" quantum="8M" /> - <provides> - <service name="Framebuffer" /> <service name="Input" /> - </provides> - <config initial_width="720" initial_height="480"/> - <route> - <service name="Nitpicker"> <parent label=""/> </service> - <any-service> <parent/> </any-service> - </route> - </start> - - <start name="seoul" priority="-1" caps="200" ld="no"> - <binary name="seoul"/> - <resource name="RAM" quantum="8G"/> - <route> - <service name="ROM" label="platform_info"> - <parent label="platform_info"/> </service> - <service name="Timer"> - <child name="timer"/> </service> - <service name="Framebuffer"> - <child name="nit_fb"/> </service> - <service name="Input"> - <child name="nit_fb"/> </service> - <service name="Block"> - <parent label="primary"/> </service> - <service name="Block" label="VirtualDisk 1"> - <parent label="secondary"/></service> - <any-service> <parent/> </any-service> - </route> - <configfile name="vm_seoul.cfg"/> - </start> - </config> - -</runtime> diff --git a/vm/seoul-nova/vm_seoul.cfg b/vm/seoul-nova/vm_seoul.cfg deleted file mode 100644 index a0f3569..0000000 --- a/vm/seoul-nova/vm_seoul.cfg +++ /dev/null @@ -1,39 +0,0 @@ -<config colocate="1"> - <machine> - <mem start="0x0" end="0x9a000"/> - <mem start="0x100000" end="0xfffff000"/> - <!--<ioio/>--> - <nullio io_base="0x80" /> - <pic io_base="0x20" elcr_base="0x4d0"/> - <pic io_base="0xa0" irq="2" elcr_base="0x4d1"/> - <pit io_base="0x40" irq="0"/> - <scp io_port_a="0x92" io_port_b="0x61"/> - <kbc io_base="0x60" irq_kbd="1" irq_aux="12"/> - <keyb ps2_port="0" host_keyboard="0x10000"/> - <mouse ps2_port="1" host_mouse="0x10001"/> - <rtc io_base="0x70" irq="8"/> - <serial io_base="0x3f8" irq="0x4" host_serial="0x4711"/> - <hostsink host_dev="0x4712" buffer="80"/> - <vga io_base="0x03c0"/> - - <vbios_disk/> - <vbios_keyboard host_keyboard="0x10000"/> - <vbios_mem/> - <vbios_time/> - <vbios_reset/> - - <msi/> - <ioapic/> - <pcihostbridge bus_num="0" bus_count="0x10" io_base="0xcf8" - mem_base="0xe0000000"/> - <pmtimer io_port="0x8000"/> - - <vcpu/> <halifax/> <vbios/> <lapic/> - - <ahci mem="0xe0800000" irq="14" bdf="0x30"/> - <drive sigma0drive="0" controller="0" port="0"/> - <drive sigma0drive="1" controller="0" port="1"/> - <rtl8029 irq="9" port="0x300"/> - </machine> - <multiboot/> -</config> diff --git a/vm/seoul_alpine_test/Tupfile b/vm/seoul_alpine_test/Tupfile deleted file mode 100644 index becbea0..0000000 --- a/vm/seoul_alpine_test/Tupfile +++ /dev/null @@ -1,17 +0,0 @@ -TARGET_NAME = seoul_alpine_test -IMAGE_NAME = alpine-virt-3.9.3-x86.iso - -include_rules - -PKG_DEPENDS += \ - @(PUBLIC_SRC_BASE_NOVA) \ - @(PUBLIC_SRC_INIT) \ - @(PUBLIC_SRC_ROM_BLOCK) \ - @(PUBLIC_SRC_TERMINAL) \ - _/raw/alpine-virt-x86 \ - _/src/seoul-nova \ - -: ../seoul_test_runtime.in |> sed 's/@IMAGE_NAME@/$(IMAGE_NAME)/' %f > %o |> runtime -: runtime |> !collect_pkg_runtime |> - -include &(PKG_RULES) diff --git a/vm/seoul_installer_runtime.in b/vm/seoul_installer_runtime.in deleted file mode 100644 index 2c3a014..0000000 --- a/vm/seoul_installer_runtime.in +++ /dev/null @@ -1,115 +0,0 @@ -<runtime ram="1380M" caps="2200" binary="init"> - - <requires> - <block label="target"/> - <nic/> - <nitpicker/> - <rm/> - <rom label="platform_info"/> - <rtc/> - </requires> - - <content> - <rom label="@IMAGE_NAME@"/> - <rom label="init"/> - <rom label="rom_block"/> - <rom label="seoul"/> - <rom label="timer"/> - </content> - - <config verbose="yes" prio_levels="2"> - - <parent-provides> - <service name="ROM"/> - <service name="PD"/> - <service name="RM"/> - <service name="CPU"/> - <service name="LOG"/> - <service name="Block"/> - <service name="File_system"/> - <service name="Nitpicker"/> - <service name="Rtc"/> - <service name="Nic"/> - </parent-provides> - - <default caps="100"/> - - <start name="timer"> - <resource name="RAM" quantum="1M"/> - <provides><service name="Timer"/></provides> - <config/> - <route> - <service name="ROM" label="platform_info"> - <parent label="platform_info"/> </service> - <any-service> <parent/> </any-service> - </route> - </start> - - <start name="rom_block" priority="-1"> - <resource name="RAM" quantum="2M" /> - <provides><service name="Block"/></provides> - <config file="@IMAGE_NAME@" block_size="512"/> - <route> - <any-service> <parent/> </any-service> - </route> - </start> - - <start name="seoul" priority="-1" caps="200" ld="no"> - <binary name="seoul"/> - <resource name="RAM" quantum="4G"/> - <config colocate="1"> - <machine> - <mem start="0x0" end="0x9a000"/> - <mem start="0x100000" end="0xfffff000"/> - <!--<ioio/>--> - <nullio io_base="0x80" /> - <pic io_base="0x20" elcr_base="0x4d0"/> - <pic io_base="0xa0" irq="2" elcr_base="0x4d1"/> - <pit io_base="0x40" irq="0"/> - <scp io_port_a="0x92" io_port_b="0x61"/> - <kbc io_base="0x60" irq_kbd="1" irq_aux="12"/> - <keyb ps2_port="0" host_keyboard="0x10000"/> - <mouse ps2_port="1" host_mouse="0x10001"/> - <rtc io_base="0x70" irq="8"/> - <serial io_base="0x3f8" irq="0x4" host_serial="0x4711"/> - <hostsink host_dev="0x4712" buffer="80"/> - <vga io_base="0x03c0"/> - - <vbios_disk/> - <vbios_keyboard host_keyboard="0x10000"/> - <vbios_mem/> - <vbios_time/> - <vbios_reset/> - - <msi/> - <ioapic/> - <pcihostbridge bus_num="0" bus_count="0x10" io_base="0xcf8" - mem_base="0xe0000000"/> - <pmtimer io_port="0x8000"/> - - <vcpu/> <halifax/> <vbios/> <lapic/> - <vcpu/> <halifax/> <vbios/> <lapic/> - - <ahci mem="0xe0800000" irq="14" bdf="0x30"/> - <drive sigma0drive="0" controller="0" port="0"/> - <drive sigma0drive="1" controller="0" port="1"/> - <rtl8029 irq="9" port="0x300"/> - </machine> - <multiboot/> - </config> - <route> - <service name="ROM" label="platform_info"> - <parent label="platform_info"/> </service> - <service name="Block" label_suffix="0"> - <child name="rom_block"/></service> - <service name="Block" label_suffix="1"> - <parent label="target"/></service> - <any-service> - <any-child/> - <parent/> - </any-service> - </route> - </start> - </config> - -</runtime> diff --git a/vm/seoul_openbsd_test/Tupfile b/vm/seoul_openbsd_test/Tupfile deleted file mode 100644 index 543e68d..0000000 --- a/vm/seoul_openbsd_test/Tupfile +++ /dev/null @@ -1,19 +0,0 @@ -TARGET_NAME = seoul_openbsd_test -IMAGE_TYPE = miniroot -include ../openbsd/version.tup -IMAGE_NAME = $(IMAGE_TYPE)$(VERSION).fs - -include_rules - -PKG_DEPENDS += \ - @(PUBLIC_SRC_BASE_NOVA) \ - @(PUBLIC_SRC_INIT) \ - @(PUBLIC_SRC_ROM_BLOCK) \ - @(PUBLIC_SRC_TERMINAL) \ - _/raw/openbsd-$(IMAGE_TYPE)-i386 \ - _/src/seoul-nova - -: ../seoul_test_runtime.in |> sed 's/@IMAGE_NAME@/$(IMAGE_NAME)/' %f > %o |> runtime -: runtime |> !collect_pkg_runtime |> - -include &(PKG_RULES) diff --git a/vm/seoul_test_runtime.in b/vm/seoul_test_runtime.in deleted file mode 100644 index 9813c8f..0000000 --- a/vm/seoul_test_runtime.in +++ /dev/null @@ -1,132 +0,0 @@ -<runtime ram="256M" caps="2200" binary="init"> - - <requires> - <block/> - <file_system label="fonts"/> - <nic/> - <nitpicker/> - <rm/> - <rom label="platform_info"/> - <rtc/> - </requires> - - <content> - <rom label="@IMAGE_NAME@"/> - <rom label="init"/> - <rom label="rom_block"/> - <rom label="seoul"/> - <rom label="timer"/> - <rom label="terminal"/> - </content> - - <config verbose="yes" prio_levels="2"> - - <parent-provides> - <service name="ROM"/> - <service name="PD"/> - <service name="RM"/> - <service name="CPU"/> - <service name="LOG"/> - <service name="Block"/> - <service name="File_system"/> - <service name="Nitpicker"/> - <service name="Rtc"/> - <service name="Nic"/> - </parent-provides> - - <default caps="100"/> - - <start name="timer"> - <resource name="RAM" quantum="1M"/> - <provides><service name="Timer"/></provides> - <config/> - <route> - <service name="ROM" label="platform_info"> - <parent label="platform_info"/> </service> - <any-service> <parent/> </any-service> - </route> - </start> - - <start name="rom_block" priority="-1"> - <resource name="RAM" quantum="2M" /> - <provides><service name="Block"/></provides> - <config file="@IMAGE_NAME@" block_size="512"/> - <route> - <any-service> <parent/> </any-service> - </route> - </start> - - <start name="terminal"> - <resource name="RAM" quantum="8M"/> - <provides> <service name="Terminal"/> </provides> - <config> - <vfs> <dir name="fonts"> <fs label="fonts"/> </dir> </vfs> - </config> - <route> - <service name="File_system"> <parent label="fonts"/> </service> - <any-service> <any-child/> <parent/> </any-service> - </route> - </start> - - <start name="seoul" priority="-1" caps="200" ld="no"> - <binary name="seoul"/> - <resource name="RAM" quantum="4G"/> - <config colocate="1" width="720" height="400"> - <machine> - <mem start="0x0" end="0x9a000"/> - <mem start="0x100000" end="0xfffff000"/> - <!--<ioio/>--> - <nullio io_base="0x80" /> - <pic io_base="0x20" elcr_base="0x4d0"/> - <pic io_base="0xa0" irq="2" elcr_base="0x4d1"/> - <pit io_base="0x40" irq="0"/> - <scp io_port_a="0x92" io_port_b="0x61"/> - <kbc io_base="0x60" irq_kbd="1" irq_aux="12"/> - <keyb ps2_port="0" host_keyboard="0x10000"/> - <mouse ps2_port="1" host_mouse="0x10001"/> - <rtc io_base="0x70" irq="8"/> - <serial io_base="0x3f8" irq="0x4" host_serial="0x4711"/> - <terminal host_dev="0x4712"/> - <vga io_base="0x03c0"/> - - <vbios_disk/> - <vbios_keyboard host_keyboard="0x10000"/> - <vbios_mem/> - <vbios_time/> - <vbios_reset/> - - <msi/> - <ioapic/> - <pcihostbridge bus_num="0" bus_count="0x10" io_base="0xcf8" - mem_base="0xe0000000"/> - <pmtimer io_port="0x8000"/> - - <vcpu/> <halifax/> <vbios/> <lapic/> - <vcpu/> <halifax/> <vbios/> <lapic/> - - <ahci mem="0xe0800000" irq="14" bdf="0x30"/> - <drive sigma0drive="0" controller="0" port="0"/> - <drive sigma0drive="1" controller="0" port="1"/> - - <!-- <rtl8029 irq="9" port="0x300" /> --> - <virtio_net/> - <virtio_block/> - </machine> - <multiboot/> - </config> - <route> - <service name="ROM" label="platform_info"> - <parent label="platform_info"/> </service> - <service name="Block" label_suffix="0"> - <child name="rom_block"/></service> - <service name="Block" label_suffix="1"> - <parent/></service> - <any-service> - <any-child/> - <parent/> - </any-service> - </route> - </start> - </config> - -</runtime> diff --git a/vm/vbox5-nova/Tupfile b/vm/vbox5-nova/Tupfile deleted file mode 100644 index 574367e..0000000 --- a/vm/vbox5-nova/Tupfile +++ /dev/null @@ -1,21 +0,0 @@ -TARGET_NAME = vbox5-nova -include_rules - -: foreach machine.vbox primary.vmdk secondary.vmdk |> !collect_raw |> - -PKG_DEPENDS += \ - @(PUBLIC_SRC_INIT) \ - @(PUBLIC_SRC_BASE_NOVA) \ - @(PUBLIC_SRC_LIBC) \ - @(PUBLIC_SRC_LIBICONV) \ - @(PUBLIC_SRC_NIT_FB) \ - @(PUBLIC_SRC_POSIX) \ - @(PUBLIC_SRC_STDCXX) \ - @(PUBLIC_SRC_VBOX_NOVA) \ - @(PUBLIC_SRC_VFS) \ - @(PUBLIC_SRC_ZLIB) \ - _/raw/$(TARGET_NAME) \ - -: runtime |> !collect_pkg_runtime |> - -include &(RAW_RULES) diff --git a/vm/vbox5-nova/machine.vbox b/vm/vbox5-nova/machine.vbox deleted file mode 100644 index 42d0501..0000000 --- a/vm/vbox5-nova/machine.vbox +++ /dev/null @@ -1,62 +0,0 @@ -<?xml version="1.0"?> -<VirtualBox xmlns="http://www.virtualbox.org/" version="1.14-freebsd"> - <Machine uuid="{37ab43a5-38d8-4491-93f5-5b0b077f5c32}" name="ubuntu_16_04_64" OSType="Ubuntu_64" snapshotFolder="Snapshots" lastStateChange="2018-01-23T18:40:00Z"> - <MediaRegistry> - <HardDisks> - <HardDisk uuid="{42f50c88-42b0-41ed-bc76-28cf026f052c}" location="/primary.vmdk" format="VMDK" type="Normal"/> - </HardDisks> - <HardDisks> - <HardDisk uuid="{8e1b4241-2e6b-417d-8495-3afbaaecac87}" location="/secondary.vmdk" format="VMDK" type="Normal"/> - </HardDisks> - </MediaRegistry> - <Hardware> - <CPU count="4"> - <PAE enabled="true"/> - <LongMode enabled="true"/> - <HardwareVirtExLargePages enabled="false"/> - </CPU> - <Memory RAMSize="1024"/> - <HID Pointing="USBTablet"/> - <Display VRAMSize="20"/> - <RemoteDisplay enabled="false"/> - <BIOS> - <IOAPIC enabled="true"/> - </BIOS> - <USB> - <Controllers> - <Controller name="OHCI" type="OHCI"/> - </Controllers> - </USB> - <Network> - <Adapter slot="0" enabled="true" MACAddress="0800271D7901" cable="true" type="82540EM"> - <BridgedInterface/> - </Adapter> - <Adapter slot="1" enabled="true" MACAddress="0800271D7902" cable="true" type="82540EM"> - <BridgedInterface/> - </Adapter> - </Network> - <UART> - <Port slot="0" enabled="false" IOBase="0x3f8" IRQ="4" hostMode="Disconnected"/> - <Port slot="1" enabled="false" IOBase="0x2f8" IRQ="3" hostMode="Disconnected"/> - </UART> - <LPT> - <Port slot="0" enabled="false" IOBase="0x378" IRQ="7"/> - <Port slot="1" enabled="false" IOBase="0x378" IRQ="7"/> - </LPT> - <AudioAdapter controller="HDA" driver="OSS" enabled="false"/> - <RTC localOrUTC="UTC"/> - <SharedFolders> - </SharedFolders> - </Hardware> - <StorageControllers> - <StorageController name="SATA" type="AHCI" PortCount="4" useHostIOCache="true" Bootable="true" IDE0MasterEmulationPort="0" IDE0SlaveEmulationPort="1" IDE1MasterEmulationPort="2" IDE1SlaveEmulationPort="3"> - <AttachedDevice type="HardDisk" port="0" device="0"> - <Image uuid="{42f50c88-42b0-41ed-bc76-28cf026f052c}"/> - </AttachedDevice> - <AttachedDevice type="HardDisk" port="1" device="0"> - <Image uuid="{8e1b4241-2e6b-417d-8495-3afbaaecac87}"/> - </AttachedDevice> - </StorageController> - </StorageControllers> - </Machine> -</VirtualBox> diff --git a/vm/vbox5-nova/primary.vmdk b/vm/vbox5-nova/primary.vmdk deleted file mode 100644 index d18a3e7..0000000 --- a/vm/vbox5-nova/primary.vmdk +++ /dev/null @@ -1,21 +0,0 @@ -# Disk DescriptorFile -version=1 -CID=bca55ee1 -parentCID=ffffffff -createType="fullDevice" - -# Extent description -RW 16777216 FLAT "/dev/sda" 0 - -# The disk Data Base -#DDB - -ddb.virtualHWVersion = "4" -ddb.adapterType="ide" -ddb.geometry.cylinders="16383" -ddb.geometry.heads="16" -ddb.geometry.sectors="63" -ddb.uuid.image="42f50c88-42b0-41ed-bc76-28cf026f052c" -ddb.uuid.parent="00000000-0000-0000-0000-000000000000" -ddb.uuid.modification="00000000-0000-0000-0000-000000000000" -ddb.uuid.parentmodification="00000000-0000-0000-0000-000000000000" diff --git a/vm/vbox5-nova/runtime b/vm/vbox5-nova/runtime deleted file mode 100644 index 5835bc4..0000000 --- a/vm/vbox5-nova/runtime +++ /dev/null @@ -1,126 +0,0 @@ -<runtime ram="1600M" caps="1500" binary="init"> - - <requires> - <block label="primary"/> - <block label="secondary"/> - <nic label="0"/> - <nic label="1"/> - <nitpicker/> - <report/> - <report label="shape"/> - <rm/> - <rom label="platform_info"/> - <rom label="usb_devices"/> - <rtc/> - <usb/> - </requires> - - <content> - <rom label="init"/> - <rom label="libc.lib.so"/> - <rom label="libc_pipe.lib.so"/> - <rom label="libc_terminal.lib.so"/> - <rom label="libiconv.lib.so"/> - <rom label="libm.lib.so"/> - <rom label="nit_fb"/> - <rom label="qemu-usb.lib.so"/> - <rom label="stdcxx.lib.so"/> - <rom label="timer"/> - <rom label="vfs.lib.so"/> - <rom label="virtualbox5-nova"/> - <rom label="machine.vbox"/> - <rom label="primary.vmdk"/> - <rom label="secondary.vmdk"/> - </content> - - <config verbose="yes" prio_levels="2"> - - <parent-provides> - <service name="ROM"/> - <service name="PD"/> - <service name="RM"/> - <service name="CPU"/> - <service name="LOG"/> - <service name="Block"/> - <service name="Nitpicker"/> - <service name="Rtc"/> - <service name="Report"/> - <service name="Usb"/> - <service name="Nic"/> - </parent-provides> - - <default-route> <any-service> <parent/> <any-child/> </any-service> </default-route> - - <default caps="100"/> - - <start name="timer"> - <resource name="RAM" quantum="1M"/> - <provides><service name="Timer"/></provides> - <config/> - <route> - <service name="ROM" label="platform_info"> - <parent label="platform_info"/> </service> - <any-service> <parent/> </any-service> - </route> - </start> - - <start name="nit_fb" priority="0"> - <resource name="RAM" quantum="8M" /> - <provides> - <service name="Framebuffer" /> <service name="Input" /> - </provides> - <config initial_width="848" initial_height="480" /> - <route> - <service name="Nitpicker"> <parent label=""/> </service> - <any-service> <parent/> </any-service> - </route> - </start> - - <start name="vbox" priority="-1" caps="1000"> - <binary name="virtualbox5-nova" /> - <resource name="RAM" quantum="2G"/> - <exit propagate="yes"/> - <config vbox_file="machine.vbox" xhci="no" vm_name="linux"> - <vfs> - <rom name="machine.vbox"/> - <rom name="primary.vmdk"/> - <rom name="secondary.vmdk"/> - <dir name="dev"> - <block name="sda" label="primary"/> - <block name="sdb" label="secondary"/> - <log/> - <rtc/> - </dir> - </vfs> - <libc stdout="/dev/log" stderr="/dev/log" rtc="/dev/rtc"/> - </config> - <route> - <service name="Audio_out"> - <parent/> </service> - <service name="ROM" label="usb_devices"> - <parent label="usb_devices"/> </service> - <service name="ROM" label="platform_info"> - <parent label="platform_info"/> </service> - <service name="Block" label_suffix="primary"> - <parent label="primary"/> </service> - <service name="Block" label_suffix="secondary"> - <parent label="secondary"/> </service> - <service name="Nic" label_suffix="0"> - <parent label="0"/> </service> - <service name="Nic" label_suffix="1"> - <parent label="1"/> </service> - <service name="Report" label="shape"> - <parent label="shape"/> </service> - <service name="ROM" label="clipboard"> - <parent label="clipboard"/> </service> - <service name="Report" label="clipboard"> - <parent label="clipboard"/> </service> - <any-service> - <parent/> <any-child/> - </any-service> - </route> - </start> - -</config> - -</runtime> diff --git a/vm/vbox5-nova/secondary.vmdk b/vm/vbox5-nova/secondary.vmdk deleted file mode 100644 index d4a5cf1..0000000 --- a/vm/vbox5-nova/secondary.vmdk +++ /dev/null @@ -1,21 +0,0 @@ -# Disk DescriptorFile -version=1 -CID=57915c32 -parentCID=ffffffff -createType="fullDevice" - -# Extent description -RW 16777216 FLAT "/dev/sdb" 0 - -# The disk Data Base -#DDB - -ddb.virtualHWVersion = "4" -ddb.adapterType="ide" -ddb.geometry.cylinders="16383" -ddb.geometry.heads="16" -ddb.geometry.sectors="63" -ddb.uuid.image="8e1b4241-2e6b-417d-8495-3afbaaecac87" -ddb.uuid.parent="00000000-0000-0000-0000-000000000000" -ddb.uuid.modification="00000000-0000-0000-0000-000000000000" -ddb.uuid.parentmodification="00000000-0000-0000-0000-000000000000" diff --git a/vm/vbox_install_x86_64/Tupfile b/vm/vbox_install_x86_64/Tupfile deleted file mode 100644 index aeb670d..0000000 --- a/vm/vbox_install_x86_64/Tupfile +++ /dev/null @@ -1,5 +0,0 @@ -RAW_NAME = vbox_install_x86_64 -include_rules -: machine.vbox |> !collect_raw |> -: machine.vdi |> !collect_raw |> -include &(RAW_RULES) diff --git a/vm/vbox_install_x86_64/machine.vbox b/vm/vbox_install_x86_64/machine.vbox deleted file mode 100644 index 9761ad2..0000000 --- a/vm/vbox_install_x86_64/machine.vbox +++ /dev/null @@ -1,60 +0,0 @@ -<?xml version="1.0"?> -<VirtualBox xmlns="http://www.virtualbox.org/" version="1.14-freebsd"> - <Machine uuid="{37ab43a5-38d8-4491-93f5-5b0b077f5c32}" name="ubuntu_16_04_64" OSType="Ubuntu_64" snapshotFolder="Snapshots" lastStateChange="2018-01-23T18:40:00Z"> - <MediaRegistry> - <HardDisks> - <HardDisk uuid="{a90a16bf-f724-4321-99df-5498d6e4b796}" location="machine.vdi" format="VDI" type="Normal"/> - </HardDisks> - <DVDImages> - <Image uuid="{81763434-9a51-49e8-9444-528a5a28c4bc}" location="installer.iso"/> - </DVDImages> - </MediaRegistry> - <Hardware> - <CPU count="4"> - <PAE enabled="true"/> - <LongMode enabled="true"/> - <HardwareVirtExLargePages enabled="false"/> - </CPU> - <Memory RAMSize="2048"/> - <HID Pointing="USBTablet"/> - <Display VRAMSize="20"/> - <RemoteDisplay enabled="false"/> - <BIOS> - <IOAPIC enabled="true"/> - </BIOS> - <USB> - <Controllers> - <Controller name="OHCI" type="OHCI"/> - </Controllers> - </USB> - <Network> - <Adapter slot="0" enabled="true" MACAddress="0800271D7901" cable="true" type="82540EM"> - <BridgedInterface/> - </Adapter> - </Network> - <UART> - <Port slot="0" enabled="false" IOBase="0x3f8" IRQ="4" hostMode="Disconnected"/> - <Port slot="1" enabled="false" IOBase="0x2f8" IRQ="3" hostMode="Disconnected"/> - </UART> - <LPT> - <Port slot="0" enabled="false" IOBase="0x378" IRQ="7"/> - <Port slot="1" enabled="false" IOBase="0x378" IRQ="7"/> - </LPT> - <AudioAdapter controller="HDA" driver="OSS" enabled="false"/> - <RTC localOrUTC="UTC"/> - <SharedFolders> - <SharedFolder name="shared" hostPath="/shared" writable="true" autoMount="true"/> - </SharedFolders> - </Hardware> - <StorageControllers> - <StorageController name="SATA" type="AHCI" PortCount="4" useHostIOCache="true" Bootable="true" IDE0MasterEmulationPort="0" IDE0SlaveEmulationPort="1" IDE1MasterEmulationPort="2" IDE1SlaveEmulationPort="3"> - <AttachedDevice type="HardDisk" port="0" device="0"> - <Image uuid="{a90a16bf-f724-4321-99df-5498d6e4b796}"/> - </AttachedDevice> - <AttachedDevice passthrough="false" type="DVD" port="3" device="0"> - <Image uuid="{81763434-9a51-49e8-9444-528a5a28c4bc}"/> - </AttachedDevice> - </StorageController> - </StorageControllers> - </Machine> -</VirtualBox> diff --git a/vm/vbox_install_x86_64/machine.vdi b/vm/vbox_install_x86_64/machine.vdi deleted file mode 100644 index 9cafe07..0000000 Binary files a/vm/vbox_install_x86_64/machine.vdi and /dev/null differ