summaryrefslogtreecommitdiff
path: root/cleopatre
diff options
context:
space:
mode:
Diffstat (limited to 'cleopatre')
-rwxr-xr-xcleopatre/application/fw_wd/S99trace15
-rw-r--r--cleopatre/buildroot/target/device/Spidcom/scr310/busybox.config2
-rw-r--r--cleopatre/buildroot/target/device/Spidcom/spk300/busybox.config2
-rw-r--r--cleopatre/buildroot/target/device/Spidcom/spk300g/busybox.config2
-rw-r--r--cleopatre/buildroot/target/device/Spidcom/spk310/busybox.config2
-rw-r--r--cleopatre/buildroot/target/device/Spidcom/spr300/busybox.config2
-rw-r--r--cleopatre/buildroot/target/device/Spidcom/spr310/busybox.config2
7 files changed, 18 insertions, 9 deletions
diff --git a/cleopatre/application/fw_wd/S99trace b/cleopatre/application/fw_wd/S99trace
index e300c42a92..56ae7a290e 100755
--- a/cleopatre/application/fw_wd/S99trace
+++ b/cleopatre/application/fw_wd/S99trace
@@ -8,6 +8,10 @@ TRACE_REBOOT=true
TRACE_FOLDER=/usr/local/trace/
# Trace basename.
TRACE_BASENAME=trace_
+# Header of the last trace, uncompressed.
+TRACE_HEADER_PATH=${TRACE_FOLDER}/last_head_trace.txt
+# Number of lines to store in the uncompressed trace.
+TRACE_HEADER_LINE=3
# Load personnalize preferences.
test -f /etc/default/trace && . /etc/default/trace
@@ -38,10 +42,15 @@ else
new_trace_digit=$(expr $new_trace_digit + 1)
fi
-# Sleep for the watchdog, get trace, get files and execute commands and reboot
-# if required.
+# Sleep for the watchdog, get trace (uncompressed, then compressed), get files
+# and execute commands and reboot if required.
(fw_wd && \
- (cat /dev/trace && \
+ rm -f ${TRACE_HEADER_PATH} && \
+ head -n ${TRACE_HEADER_LINE} /dev/trace > ${TRACE_HEADER_PATH} && \
+ echo "Full trace available in ${TRACE_FOLDER}/${TRACE_BASENAME}${new_trace_digit}.gz" \
+ >> ${TRACE_HEADER_PATH} && \
+ (head -n ${TRACE_HEADER_LINE} ${TRACE_FOLDER}/last_head_trace.txt && \
+ cat /dev/trace && \
IFSOLD=$IFS
IFS=":" && for i in $TRACE_FILES
do
diff --git a/cleopatre/buildroot/target/device/Spidcom/scr310/busybox.config b/cleopatre/buildroot/target/device/Spidcom/scr310/busybox.config
index 358e4eaad0..832baaa1a7 100644
--- a/cleopatre/buildroot/target/device/Spidcom/scr310/busybox.config
+++ b/cleopatre/buildroot/target/device/Spidcom/scr310/busybox.config
@@ -176,7 +176,7 @@ CONFIG_EXPR=y
# CONFIG_EXPR_MATH_SUPPORT_64 is not set
CONFIG_FALSE=y
# CONFIG_FOLD is not set
-# CONFIG_HEAD is not set
+CONFIG_HEAD=y
# CONFIG_FEATURE_FANCY_HEAD is not set
# CONFIG_HOSTID is not set
CONFIG_ID=y
diff --git a/cleopatre/buildroot/target/device/Spidcom/spk300/busybox.config b/cleopatre/buildroot/target/device/Spidcom/spk300/busybox.config
index 358e4eaad0..832baaa1a7 100644
--- a/cleopatre/buildroot/target/device/Spidcom/spk300/busybox.config
+++ b/cleopatre/buildroot/target/device/Spidcom/spk300/busybox.config
@@ -176,7 +176,7 @@ CONFIG_EXPR=y
# CONFIG_EXPR_MATH_SUPPORT_64 is not set
CONFIG_FALSE=y
# CONFIG_FOLD is not set
-# CONFIG_HEAD is not set
+CONFIG_HEAD=y
# CONFIG_FEATURE_FANCY_HEAD is not set
# CONFIG_HOSTID is not set
CONFIG_ID=y
diff --git a/cleopatre/buildroot/target/device/Spidcom/spk300g/busybox.config b/cleopatre/buildroot/target/device/Spidcom/spk300g/busybox.config
index 358e4eaad0..832baaa1a7 100644
--- a/cleopatre/buildroot/target/device/Spidcom/spk300g/busybox.config
+++ b/cleopatre/buildroot/target/device/Spidcom/spk300g/busybox.config
@@ -176,7 +176,7 @@ CONFIG_EXPR=y
# CONFIG_EXPR_MATH_SUPPORT_64 is not set
CONFIG_FALSE=y
# CONFIG_FOLD is not set
-# CONFIG_HEAD is not set
+CONFIG_HEAD=y
# CONFIG_FEATURE_FANCY_HEAD is not set
# CONFIG_HOSTID is not set
CONFIG_ID=y
diff --git a/cleopatre/buildroot/target/device/Spidcom/spk310/busybox.config b/cleopatre/buildroot/target/device/Spidcom/spk310/busybox.config
index 358e4eaad0..832baaa1a7 100644
--- a/cleopatre/buildroot/target/device/Spidcom/spk310/busybox.config
+++ b/cleopatre/buildroot/target/device/Spidcom/spk310/busybox.config
@@ -176,7 +176,7 @@ CONFIG_EXPR=y
# CONFIG_EXPR_MATH_SUPPORT_64 is not set
CONFIG_FALSE=y
# CONFIG_FOLD is not set
-# CONFIG_HEAD is not set
+CONFIG_HEAD=y
# CONFIG_FEATURE_FANCY_HEAD is not set
# CONFIG_HOSTID is not set
CONFIG_ID=y
diff --git a/cleopatre/buildroot/target/device/Spidcom/spr300/busybox.config b/cleopatre/buildroot/target/device/Spidcom/spr300/busybox.config
index 358e4eaad0..832baaa1a7 100644
--- a/cleopatre/buildroot/target/device/Spidcom/spr300/busybox.config
+++ b/cleopatre/buildroot/target/device/Spidcom/spr300/busybox.config
@@ -176,7 +176,7 @@ CONFIG_EXPR=y
# CONFIG_EXPR_MATH_SUPPORT_64 is not set
CONFIG_FALSE=y
# CONFIG_FOLD is not set
-# CONFIG_HEAD is not set
+CONFIG_HEAD=y
# CONFIG_FEATURE_FANCY_HEAD is not set
# CONFIG_HOSTID is not set
CONFIG_ID=y
diff --git a/cleopatre/buildroot/target/device/Spidcom/spr310/busybox.config b/cleopatre/buildroot/target/device/Spidcom/spr310/busybox.config
index 358e4eaad0..832baaa1a7 100644
--- a/cleopatre/buildroot/target/device/Spidcom/spr310/busybox.config
+++ b/cleopatre/buildroot/target/device/Spidcom/spr310/busybox.config
@@ -176,7 +176,7 @@ CONFIG_EXPR=y
# CONFIG_EXPR_MATH_SUPPORT_64 is not set
CONFIG_FALSE=y
# CONFIG_FOLD is not set
-# CONFIG_HEAD is not set
+CONFIG_HEAD=y
# CONFIG_FEATURE_FANCY_HEAD is not set
# CONFIG_HOSTID is not set
CONFIG_ID=y