From 48688594bfb8568e9146dcd175c63e770adb73a2 Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Fri, 5 Jul 2024 12:23:07 +0200 Subject: [PATCH] Add a heartbeat counter to check the kernel --- lagarto-ox.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lagarto-ox.nix b/lagarto-ox.nix index 83da2dc..1eddbdc 100644 --- a/lagarto-ox.nix +++ b/lagarto-ox.nix @@ -79,6 +79,15 @@ # Avoid zstd as we don't have the tools in "cucu" machine compressor = "gzip"; kernelModules = [ ]; + + # Write a counter to the DMA region, so we can check the kernel is not + # dead. Monitor from the host with: + # while [ 1 ]; do xxd -s $((0x1bfff0000 - 0x60000000)) \ + # -l 4 /dev/qdma34000-MM-1; sleep 0.2; done + preDeviceCommands = '' + echo "Creating a heartbeat counter at 0x1bfff0000" + hb=0; while [ 1 ]; do let hb=$hb+1; devmem 0x1bfff0000 32 $hb; done & + ''; }; loader = {