Remove stale port of testu01
The build errors remained unattended since almost a year. Fixes #171
This commit is contained in:
@@ -1,99 +0,0 @@
|
|||||||
/* include/config.h. Generated from config.h.in by configure. */
|
|
||||||
/* include/config.h.in. Generated from configure.ac by autoheader. */
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
|
||||||
#define HAVE_DLFCN_H 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have the `erf' function. */
|
|
||||||
#define HAVE_ERF 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <gmp.h> header file. */
|
|
||||||
#define HAVE_GMP_H 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
|
||||||
#define HAVE_INTTYPES_H 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have the `lgamma' function. */
|
|
||||||
#define HAVE_LGAMMA 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have the `log1p' function. */
|
|
||||||
#define HAVE_LOG1P 1
|
|
||||||
|
|
||||||
/* Define to 1 if the system has the type `long long'. */
|
|
||||||
#define HAVE_LONG_LONG 1
|
|
||||||
|
|
||||||
/* Define when Mathematica is installed */
|
|
||||||
#undef HAVE_MATHEMATICA
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <memory.h> header file. */
|
|
||||||
#define HAVE_MEMORY_H 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have the `random' function. */
|
|
||||||
#define HAVE_RANDOM 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <stdint.h> header file. */
|
|
||||||
#define HAVE_STDINT_H 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
|
||||||
#define HAVE_STDLIB_H 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <strings.h> header file. */
|
|
||||||
#define HAVE_STRINGS_H 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <string.h> header file. */
|
|
||||||
#define HAVE_STRING_H 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
|
||||||
#define HAVE_SYS_STAT_H 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
|
||||||
#define HAVE_SYS_TYPES_H 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <sys/utsname.h> header file. */
|
|
||||||
#define HAVE_SYS_UTSNAME_H 1
|
|
||||||
|
|
||||||
/* Define to 1 if the system has the type `uint32_t'. */
|
|
||||||
#define HAVE_UINT32_T 1
|
|
||||||
|
|
||||||
/* Define to 1 if the system has the type `uint8_t'. */
|
|
||||||
#define HAVE_UINT8_T 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <unistd.h> header file. */
|
|
||||||
#define HAVE_UNISTD_H 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <windows.h> header file. */
|
|
||||||
/* #undef HAVE_WINDOWS_H */
|
|
||||||
|
|
||||||
/* Name of package */
|
|
||||||
#define PACKAGE "testu01"
|
|
||||||
|
|
||||||
/* Define to the address where bug reports for this package should be sent. */
|
|
||||||
#define PACKAGE_BUGREPORT "lecuyer@iro.umontreal.ca"
|
|
||||||
|
|
||||||
/* Define to the full name of this package. */
|
|
||||||
#define PACKAGE_NAME "TestU01"
|
|
||||||
|
|
||||||
/* Define to the full name and version of this package. */
|
|
||||||
#define PACKAGE_STRING "TestU01 1.2.3"
|
|
||||||
|
|
||||||
/* Define to the one symbol short name of this package. */
|
|
||||||
#define PACKAGE_TARNAME "testu01"
|
|
||||||
|
|
||||||
/* Define to the version of this package. */
|
|
||||||
#define PACKAGE_VERSION "1.2.3"
|
|
||||||
|
|
||||||
/* Define to 1 if you have the ANSI C header files. */
|
|
||||||
#define STDC_HEADERS 1
|
|
||||||
|
|
||||||
/* Version number of package */
|
|
||||||
#define VERSION "1.2.3"
|
|
||||||
|
|
||||||
/* Define to 1 if your processor stores words with the most significant byte
|
|
||||||
first (like Motorola and SPARC, unlike Intel and VAX). */
|
|
||||||
/* #undef WORDS_BIGENDIAN */
|
|
||||||
|
|
||||||
/* Define to empty if `const' does not conform to ANSI C. */
|
|
||||||
/* #undef const */
|
|
||||||
|
|
||||||
/* Define to `unsigned int' if <sys/types.h> does not define. */
|
|
||||||
/* #undef size_t */
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
/* include/gdefconf.h. Generated from gdefconf.h.in by configure. */
|
|
||||||
/* gdef.h for ANSI C */
|
|
||||||
#ifndef GDEFCONF_H
|
|
||||||
#define GDEFCONF_H
|
|
||||||
|
|
||||||
/* #undef HAVE_LEBOOL */
|
|
||||||
|
|
||||||
#define HAVE_LONG_LONG 1
|
|
||||||
|
|
||||||
#define HAVE_ERF 1
|
|
||||||
|
|
||||||
#define HAVE_RANDOM 1
|
|
||||||
|
|
||||||
#define HAVE_LGAMMA 1
|
|
||||||
|
|
||||||
#define HAVE_GMP_H 1
|
|
||||||
|
|
||||||
#undef HAVE_MATHEMATICA
|
|
||||||
|
|
||||||
#define HAVE_SYS_UTSNAME_H 1
|
|
||||||
|
|
||||||
#define HAVE_UNISTD_H 1
|
|
||||||
|
|
||||||
#define HAVE_STDINT_H 1
|
|
||||||
|
|
||||||
#define HAVE_UINT32_T 1
|
|
||||||
|
|
||||||
#define HAVE_UINT8_T 1
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
INC_DIR += \
|
|
||||||
$(call select_from_ports,testu01)/include/testu01 \
|
|
||||||
$(call select_from_repositories,include/testu01)
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
include $(call select_from_repositories,lib/import/import-testu01.mk)
|
|
||||||
|
|
||||||
TESTU01_DIR = $(call select_from_ports,testu01)
|
|
||||||
TESTU01_SRC_DIR = $(TESTU01_DIR)/src/lib/testu01/TestU01-1.2.3
|
|
||||||
|
|
||||||
LIBS += libc
|
|
||||||
|
|
||||||
CC_WARN += -Wno-unused-variable -Wno-maybe-uninitialized -Wno-return-type
|
|
||||||
|
|
||||||
TESTU01_SRC_C = unif01.c ulcg.c umrg.c ucarry.c utaus.c ugfsr.c uinv.c uquad.c ucubic.c ulec.c utezuka.c umarsa.c uweyl.c uknuth.c uwu.c unumrec.c uvaria.c usoft.c ugranger.c ucrypto.c ufile.c udeng.c utouzin.c uautomata.c uxorshift.c ubrent.c rijndael-alg-fst.c tu01_sha1.c scatter.c swrite.c sres.c smultin.c sknuth.c smarsa.c sstring.c svaria.c snpair.c swalk.c sentrop.c sspectral.c scomp.c sspacings.c vectorsF2.c bbattery.c ffam.c fcong.c ffsr.c ftab.c fres.c fcho.c fmultin.c fmarsa.c fknuth.c fwalk.c fstring.c fspectral.c fvaria.c fnpair.c
|
|
||||||
PROBDIST_SRC_C = fmass.c fdist.c fbar.c finv.c gofs.c gofw.c statcoll.c wdist.c
|
|
||||||
MYLIB_SRC_C = addstr.c bitset.c mystr.c num.c num2.c tables.c util.c
|
|
||||||
|
|
||||||
EXAMPLES_SRC_C = mrg32k3a.c xorshift.c
|
|
||||||
|
|
||||||
SRC_C = $(TESTU01_SRC_C) $(PROBDIST_SRC_C) $(MYLIB_SRC_C) $(EXAMPLES_SRC_C)
|
|
||||||
|
|
||||||
SRC_CC = genode_chrono.cc genode_gdef.cc
|
|
||||||
|
|
||||||
vpath %.cc $(REP_DIR)/src/lib/testu01
|
|
||||||
vpath %.c $(TESTU01_SRC_DIR)/testu01
|
|
||||||
vpath %.c $(TESTU01_SRC_DIR)/probdist
|
|
||||||
vpath %.c $(TESTU01_SRC_DIR)/mylib
|
|
||||||
vpath %.c $(TESTU01_SRC_DIR)/examples
|
|
||||||
|
|
||||||
CC_CXX_WARN_STRICT =
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
b8791d6cfc4416dbc436130c4e755fe3cfcb157d
|
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
LICENSE := other
|
|
||||||
VERSION := 1.2.3
|
|
||||||
DOWNLOADS := testu01.archive
|
|
||||||
|
|
||||||
URL(testu01) := http://www.iro.umontreal.ca/~simardr/testu01/TestU01.zip
|
|
||||||
SHA(testu01) := eee829985b7a41427e224dbc3d2592dc88444dfab0acd269190c4ea83ab1a037
|
|
||||||
DIR(testu01) := src/lib/testu01
|
|
||||||
|
|
||||||
TESTU01_DIR := src/lib/testu01/TestU01-1.2.3
|
|
||||||
|
|
||||||
testu01_includes = $(addprefix $(TESTU01_DIR)/testu01/,\
|
|
||||||
unif01.h ulcg.h umrg.h ucarry.h utaus.h ugfsr.h uinv.h uquad.h ucubic.h ulec.h utezuka.h umarsa.h uweyl.h uknuth.h uwu.h unumrec.h uvaria.h usoft.h ugranger.h ucrypto.h ufile.h udeng.h utouzin.h uautomata.h uxorshift.h ubrent.h rijndael-alg-fst.h tu01_sha1.h scatter.h swrite.h sres.h smultin.h sknuth.h smarsa.h sstring.h svaria.h snpair.h swalk.h sentrop.h sspectral.h scomp.h sspacings.h vectorsF2.h bbattery.h ffam.h fcong.h ffsr.h ftab.h fres.h fcho.h fmultin.h fmarsa.h fknuth.h fwalk.h fstring.h fspectral.h fvaria.h fnpair.h)
|
|
||||||
|
|
||||||
probdist_includes = $(addprefix $(TESTU01_DIR)/probdist/,\
|
|
||||||
fmass.h fdist.h fbar.h finv.h gofs.h gofw.h statcoll.h wdist.h)
|
|
||||||
|
|
||||||
mylib_includes = $(addprefix $(TESTU01_DIR)/mylib/,\
|
|
||||||
gdef.h addstr.h bitset.h chrono.h mystr.h num.h num2.h tables.h util.h)
|
|
||||||
|
|
||||||
DIRS := include/testu01
|
|
||||||
DIR_CONTENT(include/testu01) = $(generated_headers)
|
|
||||||
|
|
||||||
generated_headers = $(testu01_includes) $(probdist_includes) $(mylib_includes)
|
|
||||||
|
|
||||||
_dirs: $(generated_headers)
|
|
||||||
|
|
||||||
$(generated_headers): $(DOWNLOADS)
|
|
||||||
|
|
||||||
%.h: %.tex tcode
|
|
||||||
@$(MSG_GENERATE)$(notdir $@)
|
|
||||||
$(VERBOSE)mkdir -p include/testu01
|
|
||||||
$(VERBOSE)./tcode $< $@
|
|
||||||
|
|
||||||
%.tex: $(DOWNLOADS)
|
|
||||||
|
|
||||||
tcode: $(TESTU01_DIR)/mylib/tcode.c
|
|
||||||
@$(MSG_GENERATE)$(notdir $@)
|
|
||||||
$(VERBOSE)$(CC) -o $@ $<
|
|
||||||
|
|
||||||
tcode.c: $(DOWNLOADS)
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
set test_name "testu01_alphabit"
|
|
||||||
|
|
||||||
source ${genode_dir}/repos/world/run/jitterentropy_testu01.inc
|
|
||||||
|
|
||||||
run_genode_until "child \"${test_name}\" exited with exit value 0" 600
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
set test_name "testu01_rabbit"
|
|
||||||
|
|
||||||
source ${genode_dir}/repos/world/run/jitterentropy_testu01.inc
|
|
||||||
|
|
||||||
run_genode_until "child \"${test_name}\" exited with exit value 0" 1200
|
|
||||||
@@ -1,71 +0,0 @@
|
|||||||
#
|
|
||||||
# \brief Jitterentropy TestU01 tests
|
|
||||||
# \author Emery Hemingway
|
|
||||||
# \date 2015-12-11
|
|
||||||
#
|
|
||||||
|
|
||||||
#
|
|
||||||
# Configuration variables
|
|
||||||
#
|
|
||||||
# $test_name
|
|
||||||
#
|
|
||||||
|
|
||||||
set build_components {
|
|
||||||
core init timer
|
|
||||||
lib/vfs/jitterentropy
|
|
||||||
}
|
|
||||||
|
|
||||||
lappend build_components test/$test_name
|
|
||||||
|
|
||||||
build $build_components
|
|
||||||
|
|
||||||
create_boot_directory
|
|
||||||
|
|
||||||
set config {
|
|
||||||
<config>
|
|
||||||
<default caps="128"/>
|
|
||||||
<parent-provides>
|
|
||||||
<service name="CPU"/>
|
|
||||||
<service name="LOG"/>
|
|
||||||
<service name="PD"/>
|
|
||||||
<service name="RM"/>
|
|
||||||
<service name="ROM"/>
|
|
||||||
<service name="SIGNAL"/>
|
|
||||||
</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>
|
|
||||||
</start>
|
|
||||||
<start name="}
|
|
||||||
append config $test_name
|
|
||||||
append config {">
|
|
||||||
<exit propagate="yes"/>
|
|
||||||
<resource name="RAM" quantum="1G"/>
|
|
||||||
<config file="/jitterentropy">
|
|
||||||
<libc stdout="/log" stderr="/log"/>
|
|
||||||
<vfs> <log/> <jitterentropy/> </vfs>
|
|
||||||
</config>
|
|
||||||
</start>
|
|
||||||
</config>
|
|
||||||
}
|
|
||||||
|
|
||||||
install_config $config
|
|
||||||
|
|
||||||
# generic modules
|
|
||||||
set boot_modules {
|
|
||||||
core init timer
|
|
||||||
ld.lib.so libc.lib.so vfs.lib.so libm.lib.so
|
|
||||||
vfs_jitterentropy.lib.so
|
|
||||||
}
|
|
||||||
|
|
||||||
lappend boot_modules $test_name
|
|
||||||
|
|
||||||
build_boot_image $boot_modules
|
|
||||||
|
|
||||||
append qemu_args " -nographic"
|
|
||||||
|
|
||||||
# vi: set ft=tcl :
|
|
||||||
@@ -1,121 +0,0 @@
|
|||||||
#include <genode_init.h>
|
|
||||||
#include <base/printf.h>
|
|
||||||
|
|
||||||
Genode::Allocator *_heap = nullptr;
|
|
||||||
Timer::Connection *_timer = nullptr;
|
|
||||||
|
|
||||||
|
|
||||||
void testu01_init(Genode::Allocator &heap, Timer::Connection &timer)
|
|
||||||
{
|
|
||||||
_heap = &heap;
|
|
||||||
_timer = &timer;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* XXX: should be the CPU session time, but the timer works for now */
|
|
||||||
static void Heure (unsigned long *tsec, unsigned long *tusec)
|
|
||||||
{
|
|
||||||
if (!_timer)
|
|
||||||
Genode::error("library not initialized with 'testu01_init'!");
|
|
||||||
|
|
||||||
unsigned long ms = _timer->elapsed_ms();
|
|
||||||
|
|
||||||
*tsec = ms / 1000;
|
|
||||||
*tusec = ms * 1000;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
extern "C" {
|
|
||||||
|
|
||||||
#include "chrono.h"
|
|
||||||
#include <num.h>
|
|
||||||
#include <util.h>
|
|
||||||
|
|
||||||
void chrono_Init (chrono_Chrono *C) {
|
|
||||||
Heure(&C->second, &C->microsec); }
|
|
||||||
|
|
||||||
|
|
||||||
chrono_Chrono * chrono_Create (void)
|
|
||||||
{
|
|
||||||
if (!_heap)
|
|
||||||
Genode::error("library not initialized with 'testu01_init'!");
|
|
||||||
|
|
||||||
chrono_Chrono *C = new (*_heap) chrono_Chrono;
|
|
||||||
Heure(&C->second, &C->microsec);
|
|
||||||
return C;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void chrono_Delete (chrono_Chrono *C) { destroy(*_heap, C); }
|
|
||||||
|
|
||||||
|
|
||||||
double chrono_Val (chrono_Chrono *C, chrono_TimeFormat Unit)
|
|
||||||
{
|
|
||||||
double temps; /* Time elapsed, in seconds */
|
|
||||||
chrono_Chrono now;
|
|
||||||
Heure (&now.second, &now.microsec);
|
|
||||||
temps = (((double) now.microsec - (double) C->microsec) / 1.E+6 +
|
|
||||||
(double) now.second) - (double) C->second;
|
|
||||||
|
|
||||||
switch (Unit) {
|
|
||||||
case chrono_sec:
|
|
||||||
return temps;
|
|
||||||
case chrono_min:
|
|
||||||
return temps * 1.666666667E-2;
|
|
||||||
case chrono_hours:
|
|
||||||
return temps * 2.777777778E-4;
|
|
||||||
case chrono_days:
|
|
||||||
return temps * 1.157407407E-5;
|
|
||||||
case chrono_hms:
|
|
||||||
util_Error ("chrono_Val : hms is a wrong arg for chrono_TimeUnit");
|
|
||||||
}
|
|
||||||
return 0.0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void chrono_Write (chrono_Chrono * C, chrono_TimeFormat Form)
|
|
||||||
{
|
|
||||||
long centieme;
|
|
||||||
long minute;
|
|
||||||
long heure;
|
|
||||||
long seconde;
|
|
||||||
double temps;
|
|
||||||
if (Form != chrono_hms)
|
|
||||||
temps = chrono_Val (C, Form);
|
|
||||||
else
|
|
||||||
temps = 0.0;
|
|
||||||
switch (Form) {
|
|
||||||
case chrono_sec:
|
|
||||||
num_WriteD (temps, 10, 2, 1);
|
|
||||||
printf (" seconds");
|
|
||||||
break;
|
|
||||||
case chrono_min:
|
|
||||||
num_WriteD (temps, 10, 2, 1);
|
|
||||||
printf (" minutes");
|
|
||||||
break;
|
|
||||||
case chrono_hours:
|
|
||||||
num_WriteD (temps, 10, 2, 1);
|
|
||||||
printf (" hours");
|
|
||||||
break;
|
|
||||||
case chrono_days:
|
|
||||||
num_WriteD (temps, 10, 2, 1);
|
|
||||||
printf (" days");
|
|
||||||
break;
|
|
||||||
case chrono_hms:
|
|
||||||
temps = chrono_Val (C, chrono_sec);
|
|
||||||
heure = (long) (temps * 2.777777778E-4);
|
|
||||||
if (heure > 0)
|
|
||||||
temps -= (double) (heure) * 3600.0;
|
|
||||||
minute = (long) (temps * 1.666666667E-2);
|
|
||||||
if (minute > 0)
|
|
||||||
temps -= (double) (minute) * 60.0;
|
|
||||||
seconde = (long) (temps);
|
|
||||||
centieme = (long) (100.0 * (temps - (double) (seconde)));
|
|
||||||
printf ("%02ld:", heure);
|
|
||||||
printf ("%02ld:", minute);
|
|
||||||
printf ("%02ld.", seconde);
|
|
||||||
printf ("%02ld", centieme);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
#include <base/attached_rom_dataspace.h>
|
|
||||||
|
|
||||||
extern "C" {
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
void gdef_GetHostName (char machine[], int n)
|
|
||||||
{
|
|
||||||
if (n) *machine = '\0';
|
|
||||||
}
|
|
||||||
|
|
||||||
void gdef_WriteHostName (void) { }
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,45 +0,0 @@
|
|||||||
#include <testu01/genode_init.h>
|
|
||||||
|
|
||||||
#include <base/attached_rom_dataspace.h>
|
|
||||||
#include <libc/component.h>
|
|
||||||
#include <base/heap.h>
|
|
||||||
#include <base/log.h>
|
|
||||||
|
|
||||||
extern "C" {
|
|
||||||
#include "bbattery.h"
|
|
||||||
}
|
|
||||||
|
|
||||||
void Libc::Component::construct(Libc::Env &env)
|
|
||||||
{
|
|
||||||
using namespace Genode;
|
|
||||||
|
|
||||||
Attached_rom_dataspace config_rom(env, "config");
|
|
||||||
Xml_node const config = config_rom.xml();
|
|
||||||
|
|
||||||
enum {
|
|
||||||
MIN_NBITS = 500,
|
|
||||||
DEFAULT_NBITS = 1U << 20
|
|
||||||
};
|
|
||||||
|
|
||||||
unsigned nbits = max((unsigned)MIN_NBITS,
|
|
||||||
config.attribute_value("nbits", (unsigned)DEFAULT_NBITS));
|
|
||||||
String<128> file;
|
|
||||||
|
|
||||||
try {
|
|
||||||
config.attribute("file").value(&file);
|
|
||||||
} catch (...) {
|
|
||||||
error("'file' not declared in config");
|
|
||||||
env.parent().exit(~0);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Heap heap(env.pd(), env.rm());
|
|
||||||
Timer::Connection timer(env);
|
|
||||||
|
|
||||||
testu01_init(heap, timer);
|
|
||||||
|
|
||||||
Libc::with_libc([&] () {
|
|
||||||
bbattery_AlphabitFile((char *)file.string(), nbits); });
|
|
||||||
|
|
||||||
env.parent().exit(0);
|
|
||||||
}
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
TARGET = testu01_alphabit
|
|
||||||
LIBS += testu01 libc libm
|
|
||||||
SRC_CC = main.cc
|
|
||||||
|
|
||||||
CC_CXX_WARN_STRICT =
|
|
||||||
@@ -1,51 +0,0 @@
|
|||||||
#include <testu01/genode_init.h>
|
|
||||||
|
|
||||||
#include <base/attached_rom_dataspace.h>
|
|
||||||
#include <libc/component.h>
|
|
||||||
#include <base/heap.h>
|
|
||||||
#include <base/log.h>
|
|
||||||
|
|
||||||
extern "C" {
|
|
||||||
#include "gdef.h"
|
|
||||||
#include "swrite.h"
|
|
||||||
#include "bbattery.h"
|
|
||||||
}
|
|
||||||
|
|
||||||
/* This is a big one */
|
|
||||||
Genode::size_t Libc::Component::stack_size() { return 64*1024*sizeof(Genode::addr_t); }
|
|
||||||
|
|
||||||
|
|
||||||
void Libc::Component::construct(Libc::Env &env)
|
|
||||||
{
|
|
||||||
using namespace Genode;
|
|
||||||
|
|
||||||
Attached_rom_dataspace config_rom(env, "config");
|
|
||||||
Xml_node const config = config_rom.xml();
|
|
||||||
|
|
||||||
enum {
|
|
||||||
MIN_NBITS = 500,
|
|
||||||
DEFAULT_NBITS = 1U << 20
|
|
||||||
};
|
|
||||||
|
|
||||||
unsigned nbits = max((unsigned)MIN_NBITS,
|
|
||||||
config.attribute_value("nbits", (unsigned)DEFAULT_NBITS));
|
|
||||||
String<128> file;
|
|
||||||
|
|
||||||
try {
|
|
||||||
config.attribute("file").value(&file);
|
|
||||||
} catch (...) {
|
|
||||||
error("'file' not declared in config");
|
|
||||||
env.parent().exit(~0);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Heap heap(env.pd(), env.rm());
|
|
||||||
Timer::Connection timer(env);
|
|
||||||
|
|
||||||
testu01_init(heap, timer);
|
|
||||||
|
|
||||||
Libc::with_libc([&] () {
|
|
||||||
bbattery_RabbitFile((char *)file.string(), nbits); });
|
|
||||||
|
|
||||||
env.parent().exit(0);
|
|
||||||
}
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
TARGET = testu01_rabbit
|
|
||||||
LIBS += testu01 libc libm
|
|
||||||
SRC_CC = main.cc
|
|
||||||
|
|
||||||
CC_CXX_WARN_STRICT =
|
|
||||||
Reference in New Issue
Block a user