report_dump: replace noux by plain bash

This patch also introduces the use of the RTC for creating directory
names and increases the rate of snapshot creation from 10 seconds to
one minute to make sure that directories are named differently when
reading the RTC clock at granularity of minutes.

Issue #3696
This commit is contained in:
Norman Feske 2020-03-26 16:01:06 +01:00 committed by Christian Helmuth
parent e8fb7ad470
commit d6bdeed38f
2 changed files with 89 additions and 25 deletions

View File

@ -1,7 +1,8 @@
_/src/noux
_/src/bash-minimal
_/src/coreutils
_/src/libc
_/src/posix
_/src/init
_/src/vfs
_/src/vfs_pipe
_/src/fs_rom

View File

@ -1,16 +1,39 @@
<runtime ram="50M" caps="1000" binary="noux">
<runtime ram="80M" caps="1000" binary="init">
<requires>
<file_system label="report" writeable="no"/>
<file_system label="target" writeable="yes"/>
<timer/>
<rtc/>
</requires>
<config stdin="/dev/null" stdout="/dev/log" stderr="/dev/log">
<fstab>
<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="Rtc"/>
</parent-provides>
<default-route> <any-service> <parent/> <any-child/> </any-service> </default-route>
<default caps="100"/>
<start name="vfs" caps="150">
<resource name="RAM" quantum="12M"/>
<provides><service name="File_system"/></provides>
<config>
<vfs>
<tar name="bash-minimal.tar" />
<tar name="coreutils.tar" />
<dir name="dev"> <zero/> <null/> <log/> </dir>
<dir name="dev">
<zero/> <null/> <log/> <rtc/>
<dir name="pipe"> <pipe/> </dir>
</dir>
<dir name="rw"> <fs label="target"/> </dir>
<dir name="report"> <fs label="report"/> </dir>
<dir name="tmp"> <ram /> </dir>
@ -19,27 +42,67 @@
export VERSION=`printf "%(%T)T"`
mkdir "/rw/$VERSION"
cp -r /report/* "/rw/$VERSION/"
sleep 10
sleep 60
done
</inline>
</fstab>
<start name="/bin/bash">
<arg value="--login" />
<env name="HOME" value="/" />
<env name="TERM" value="screen" />
</vfs>
<policy label_prefix="vfs_rom" root="/"/>
<default-policy root="/" writeable="yes"/>
</config>
<route>
<service name="File_system" label="target"> <parent label="target"/> </service>
<service name="File_system" label="report"> <parent label="report"/> </service>
<any-service> <parent/> </any-service>
</route>
</start>
<start name="vfs_rom">
<resource name="RAM" quantum="16M"/>
<binary name="fs_rom"/>
<provides> <service name="ROM"/> </provides>
<config/>
<route>
<service name="File_system"> <child name="vfs"/> </service>
<any-service> <parent/> </any-service>
</route>
</start>
<start name="/bin/bash" caps="450">
<resource name="RAM" quantum="28M" />
<exit propagate="yes"/>
<config>
<libc stdin="/dev/null" stdout="/dev/null"
stderr="/dev/log" rtc="/dev/rtc" pipe="/dev/pipe"/>
<vfs> <fs/> </vfs>
<arg value="bash"/>
<arg value="--login"/>
<env key="TERM" value="screen"/>
<env key="PATH" value="/bin" />
<env key="HOME" value="/" />
</config>
<route>
<service name="File_system"> <child name="vfs"/> </service>
<service name="ROM" label_suffix=".lib.so"> <parent/> </service>
<service name="ROM" label_last="/bin/bash"> <child name="vfs_rom"/> </service>
<service name="ROM" label_prefix="/bin"> <child name="vfs_rom"/> </service>
<any-service> <parent/> <any-child/> </any-service>
</route>
</start>
</config>
<content>
<rom label="ld.lib.so"/>
<rom label="libc.lib.so"/>
<rom label="libm.lib.so"/>
<rom label="noux"/>
<rom label="libc_noux.lib.so"/>
<rom label="init"/>
<rom label="fs_rom"/>
<rom label="posix.lib.so"/>
<rom label="bash-minimal.tar"/>
<rom label="coreutils.tar"/>
<rom label="vfs"/>
<rom label="vfs.lib.so"/>
<rom label="vfs_pipe.lib.so"/>
</content>
</runtime>