Added OBSW Watchdog #67

Merged
meierj merged 20 commits from mueller/added-watchdog into develop 2021-07-31 08:51:56 +02:00
Showing only changes of commit 1e6ea91438 - Show all commits

View File

@ -591,6 +591,10 @@ More detailed information about the used q7s commands can be found in the Q7S us
## Launching an application at start-up
You can also do the steps performed here on a host computer inside the `q7s-rootfs` directory
of the [Q7S base repository](https://egit.irs.uni-stuttgart.de/eive/q7s-base). This might
be more convenient while also allowing to update all images at once with the finished `rootfs.xdi`.
Load the root partiton from the flash memory (there are to nor-flash memories and each flash holds
two xdi images). Note: It is not possible to modify the currently loaded root partition, e.g.
creating directories. To do this, the parition needs to be mounted.
@ -616,7 +620,7 @@ creating directories. To do this, the parition needs to be mounted.
chmod +x application
```
5. Create systemd service in /lib/systemd/system. The following shows an example service.
5. Create systemd service in `/etc/systemd/system`. The following shows an example service.
```sh
cat > example.service
@ -634,12 +638,20 @@ creating directories. To do this, the parition needs to be mounted.
[Install]
WantedBy=multi-user.target
```
6. Enable the service. This is normally done with systemctl enable. However, this is not possible
when the service is created for a mounted root partition. Therefore create a symlink as follows.
6. Enable the service. This is normally done with `systemctl enable <service>` which would create
a symlink in the `multi-user.target.wants` directory. However, this is not possible
when the service is created for a mounted root partition. It is also not possible during run
time because symlinks can't be created in a read-only filesystem. Therefore, relative symlinks
are used like this:
```sh
ln -s '/tmp/the-mounted-xdi-image/lib/systemd/system/example.service' '/tmp/the-mounted-xdi-image/etc/systemd/system/multi-user.target.wants/example.service'
cd etc/systemd/system/multi-user.target.wants/
ln -s ../example.service example.service
```
You can check the symlinnks with `ls -l`
7. The modified root partition is written back when the partion is locked again.
```sh
writeprotect 0 0 1