From 1a02b80f77a18bdbac6aa1a24e1ecfaf174105f2 Mon Sep 17 00:00:00 2001
From: Holger Paradies <retabell@gmx.de>
Date: Sun, 25 Feb 2024 11:07:43 +0100
Subject: Check initrd.img size

---
 auto/functions/livebuild-hacks | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/auto/functions/livebuild-hacks b/auto/functions/livebuild-hacks
index 6ba721f..ca4b587 100644
--- a/auto/functions/livebuild-hacks
+++ b/auto/functions/livebuild-hacks
@@ -136,3 +136,12 @@ if [ "$current_script" = "binary_grub2" ]; then
 	}
 fi
 
+if [ "$current_script" = "binary_checksums" ]; then
+    echo "HOOK: livebuild-hacks@binary_checksums: check for initrd.img"
+    if [ -s binary/live/initrd.img ];then
+        KINITRDSIZE=$(stat -c %s "binary/live/initrd.img")
+        echo "INFO: initrd size=$KINITRDSIZE"
+    else
+        echo "E: no initrd found"
+    fi
+fi
-- 
cgit v1.0