tegra-flash-init: add dump of partition table to logs

to help with debugging layout mismatch problems in case
of an error.

Signed-off-by: Matt Madison <matt@madison.systems>
This commit is contained in:
Matt Madison
2022-12-30 09:05:38 -08:00
parent 14c644bdc6
commit cda6115e56
2 changed files with 4 additions and 2 deletions

View File

@@ -8,7 +8,7 @@ mount -t configfs configfs -o nosuid,nodev,noexec /sys/kernel/config
[ ! /usr/sbin/wd_keepalive ] || /usr/sbin/wd_keepalive &
sernum=$(cat /sys/devices/platform/efuse-burn/ecid 2>/dev/null)
[ -n "$sernum" ] || sernum=$(cat /sys/module/tegra_fuse/tegra_chip_uid 2>/dev/null)
[ -n "$sernum" ] || sernum=$(cat /sys/module/tegra_fuse/parameters/tegra_chip_uid 2>/dev/null)
if [ -n "$sernum" ]; then
# Restricted to 8 characters for the ID_MODEL tag
sernum=$(printf "%x" "$sernum" | tail -c8)
@@ -163,6 +163,8 @@ else
if setup_usb_export /dev/$dev $dev 2>&1 > /tmp/flashpkg/flashpkg/logs/export-$dev.log; then
if wait_for_connect 2>&1 >> /tmp/flashpkg/flashpkg/logs/export-$dev.log; then
if wait_for_disconnect 2>&1 >> /tmp/flashpkg/flashpkg/logs/export-$dev.log; then
sgdisk /dev/$dev --verify 2>&1 >> /tmp/flashpkg/flashpkg/logs/export-$dev.log
sgdisk /dev/$dev --print 2>&1 >> /tmp/flashpkg/flashpkg/logs/export-$dev.log
continue
fi
fi

View File

@@ -25,5 +25,5 @@ do_install() {
}
FILES:${PN} = "/"
RDEPENDS:${PN} = "util-linux-blkdiscard tegra-flash-reboot mtd-utils e2fsprogs-mke2fs libusbgx-tegra-initrd-flash watchdog-keepalive"
RDEPENDS:${PN} = "util-linux-blkdiscard tegra-flash-reboot mtd-utils e2fsprogs-mke2fs libusbgx-tegra-initrd-flash watchdog-keepalive gptfdisk"
RRECOMMENDS:${PN} = "kernel-module-spi-tegra114 kernel-module-loop"