ohhhhhhhhhhh (exclude linux-extra-rootfs.img build artifact)

This commit is contained in:
Linehu
2026-10-01 23:13:42 +08:00
parent 737a2cb0db
commit 1074962546
533 changed files with 133239 additions and 5460 deletions
+18
View File
@@ -0,0 +1,18 @@
#!/usr/bin/env bash
# Dump the first 64 bytes of one lib inside extra-rootfs (native img).
set -uo pipefail
IMG="${1:?img}"
NAME="${2:?libname}"
L=$(losetup --find --show --partscan "$IMG")
sleep 0.3
M=$(mktemp -d)
mount -o ro "${L}p1" "$M" || { echo ESP_FAIL; exit 1; }
R=$(mktemp -d)
mount -o loop,ro "$M/boot/linux-extra-rootfs.img" "$R" || { echo EXTRA_FAIL; exit 1; }
echo "=== $NAME in extra-rootfs ==="
od -A d -t x1 -N 64 "$R/usr/lib/$NAME"
echo "=== readelf ==="
readelf -h "$R/usr/lib/$NAME" 2>&1 | grep -E 'Class|Type|Entry|headers|Number of section' || true
umount "$R"; rmdir "$R"
umount "$M"; rmdir "$M"
losetup -d "$L"