feat(scripts): add liminix-oriented scripts
Some checks failed
lint / check (push) Successful in 24s
Check meta / check_meta (pull_request) Failing after 20s
build configuration / build_storage01 (pull_request) Failing after 42s
build configuration / build_compute01 (pull_request) Failing after 43s
build configuration / build_vault01 (pull_request) Failing after 42s
Check meta / check_dns (pull_request) Failing after 1m3s
build configuration / build_web01 (pull_request) Failing after 38s
build configuration / build_web02 (pull_request) Failing after 39s
build configuration / build_rescue01 (pull_request) Failing after 38s
build configuration / push_to_cache (pull_request) Has been skipped
Some checks failed
lint / check (push) Successful in 24s
Check meta / check_meta (pull_request) Failing after 20s
build configuration / build_storage01 (pull_request) Failing after 42s
build configuration / build_compute01 (pull_request) Failing after 43s
build configuration / build_vault01 (pull_request) Failing after 42s
Check meta / check_dns (pull_request) Failing after 1m3s
build configuration / build_web01 (pull_request) Failing after 38s
build configuration / build_web02 (pull_request) Failing after 39s
build configuration / build_rescue01 (pull_request) Failing after 38s
build configuration / push_to_cache (pull_request) Has been skipped
- extraction for manual recovery via nandwrite - liminix rebuild to interactively develop the AP Signed-off-by: Ryan Lahfa <ryan@dgnum.eu>
This commit is contained in:
parent
c4d9d6d000
commit
04cb0a9f04
2 changed files with 54 additions and 0 deletions
12
scripts/extract-firmware-from-zyxel-nwa-fit.sh
Executable file
12
scripts/extract-firmware-from-zyxel-nwa-fit.sh
Executable file
|
@ -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_image_path> <firmware_output_file>"
|
||||
}
|
||||
|
||||
ZYXEL_NWA_FIT="$1"
|
||||
FIRMWARE_OUTPUT="$2"
|
||||
|
||||
dumpimage -T flat_dt -p 0 $ZYXEL_NWA_FIT -o $FIRMWARE_OUTPUT
|
42
scripts/liminix-rebuild.sh
Executable file
42
scripts/liminix-rebuild.sh
Executable file
|
@ -0,0 +1,42 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
ssh_command=${SSH_COMMAND-ssh}
|
||||
|
||||
reboot="reboot"
|
||||
|
||||
case "$1" in
|
||||
"--no-reboot")
|
||||
unset reboot
|
||||
shift
|
||||
;;
|
||||
"--fast")
|
||||
reboot="soft"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
|
||||
target_host=$1
|
||||
shift
|
||||
|
||||
if [ -z "$target_host" ] ; then
|
||||
echo Usage: liminix-rebuild \[--no-reboot\] target-host params
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if toplevel="$@"; then
|
||||
echo systemConfiguration $toplevel
|
||||
min-copy-closure $target_host $toplevel
|
||||
$ssh_command $target_host $toplevel/bin/install
|
||||
case "$reboot" in
|
||||
reboot)
|
||||
$ssh_command $target_host "sync; source /etc/profile; reboot"
|
||||
;;
|
||||
soft)
|
||||
$ssh_command $target_host $toplevel/bin/restart-services
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
else
|
||||
echo Rebuild failed
|
||||
fi
|
Loading…
Reference in a new issue