puts "\nTesting connection to local IPFS daemon...\n" exec curl http://127.0.0.1:5001/version >& /dev/null # If this fails it will crash the script and print an ugly message. # The code to handle this condition is just as ugly. proc depot_user {} { return ehmry } create_boot_directory source ${genode_dir}/repos/base/run/platform_drv.inc set ip_stack "lwip" # # Download test PDF file # if {![file exist bin/test.pdf]} { set pdf_url "http://genode.org/documentation/genode-foundations-17-05.pdf" catch { exec wget $pdf_url -O bin/test.pdf } } source ${genode_dir}/repos/ipfs/run/ipfs.inc proc pdf_config {} { return { } } proc pdf_config_cid {} { set configfile [run_dir]/config set fh [open $configfile "WRONLY CREAT TRUNC"] puts $fh [pdf_config] close $fh return [ipfs_ingest $configfile] } set viewer_cid [ipfs_cid_from_depot \ [depot_user]/src/init \ [depot_user]/pkg/pdf_view \ ] set pdf_cid [ipfs_ingest bin/test.pdf] set root_cid [ipfs_merge $viewer_cid [pdf_config_cid] $pdf_cid] if {$root_cid == ""} { exit -1 } puts "root_cid is $root_cid" append build_components { drivers/nic } build $build_components set fb_drv "fb_drv" if {[have_include "image/uefi"]} { set fb_drv "fb_boot_drv" } import_from_depot \ [depot_user]/pkg/[drivers_interactive_pkg] \ [depot_user]/pkg/wm \ [depot_user]/src/[base_src] \ [depot_user]/src/goipfs_proxy \ [depot_user]/src/init \ [depot_user]/src/ipfs_fs \ [depot_user]/src/ipfs_rom \ [depot_user]/src/ipld_fs_store \ [depot_user]/src/ipld_replicate \ [depot_user]/src/libc \ [depot_user]/src/nitpicker \ [depot_user]/src/vfs \ [depot_user]/src/vfs_lwip \ append config { } append_platform_drv_config append_if [have_spec framebuffer] config { } append_if [have_spec ps2] config { } append_if [have_spec sdl] config { } append config { } install_config $config set fd [open [run_dir]/genode/focus w] puts $fd "" close $fd append boot_modules { } [nic_drv_binary] { } build_boot_image $boot_modules run_genode_until forever