From 31488162d68b5da0f9ce9f9bd4e62beee53d8463 Mon Sep 17 00:00:00 2001 From: Ryan Lahfa Date: Sun, 8 Dec 2024 23:41:44 +0100 Subject: [PATCH] feat(scripts/liminix): make it easy to extract the firmware part of the Zyxel NWA FIT image This is useful when reflashing the system from scratch in the levitation mode. Note that doing this will reset the UBI counter to zero, this is bad for wear leveling. Signed-off-by: Ryan Lahfa --- scripts/extract-firmware-from-zyxel-nwa-fit.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 scripts/extract-firmware-from-zyxel-nwa-fit.sh diff --git a/scripts/extract-firmware-from-zyxel-nwa-fit.sh b/scripts/extract-firmware-from-zyxel-nwa-fit.sh new file mode 100755 index 0000000..12a8cd2 --- /dev/null +++ b/scripts/extract-firmware-from-zyxel-nwa-fit.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env nix-shell +#!nix-shell -i bash -p ubootTools + +usage() { + echo "extract the firmware part to write it manually from a Zyxel NWA FIT image" + echo "$0 " +} + +ZYXEL_NWA_FIT="$1" +FIRMWARE_OUTPUT="$2" + +dumpimage -T flat_dt -p 0 $ZYXEL_NWA_FIT -o $FIRMWARE_OUTPUT