mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-12-21 19:31:55 +00:00
Some checks failed
Build OpenWrt/uCentral images / build (cig_wf186h) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cig_wf186w) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cig_wf188n) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cig_wf189) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cig_wf196) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cybertan_eww631-a1) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cybertan_eww631-b1) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap101) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap102) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap104) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap105) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap111) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap112) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_oap101) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_oap101-6e) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_oap101e) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_oap101e-6e) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4x) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4x_2) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4x_3) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4x_w) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4xe) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4xi) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4xi_w) (push) Has been cancelled
Build OpenWrt/uCentral images / build (indio_um-305ax) (push) Has been cancelled
Build OpenWrt/uCentral images / build (sercomm_ap72tip) (push) Has been cancelled
Build OpenWrt/uCentral images / build (sonicfi_rap630c-311g) (push) Has been cancelled
Build OpenWrt/uCentral images / build (sonicfi_rap630w-211g) (push) Has been cancelled
Build OpenWrt/uCentral images / build (sonicfi_rap630w-311g) (push) Has been cancelled
Build OpenWrt/uCentral images / build (udaya_a6-id2) (push) Has been cancelled
Build OpenWrt/uCentral images / build (udaya_a6-od2) (push) Has been cancelled
Build OpenWrt/uCentral images / build (wallys_dr5018) (push) Has been cancelled
Build OpenWrt/uCentral images / build (wallys_dr6018) (push) Has been cancelled
Build OpenWrt/uCentral images / build (wallys_dr6018-v4) (push) Has been cancelled
Build OpenWrt/uCentral images / build (yuncore_ax820) (push) Has been cancelled
Build OpenWrt/uCentral images / build (yuncore_ax840) (push) Has been cancelled
Build OpenWrt/uCentral images / build (yuncore_fap640) (push) Has been cancelled
Build OpenWrt/uCentral images / build (yuncore_fap650) (push) Has been cancelled
Build OpenWrt/uCentral images / build (yuncore_fap655) (push) Has been cancelled
Build OpenWrt/uCentral images / trigger-testing (push) Has been cancelled
Build OpenWrt/uCentral images / create-x64_vm-ami (push) Has been cancelled
Signed-off-by: John Crispin <john@phrozen.org>
111 lines
5.1 KiB
Bash
111 lines
5.1 KiB
Bash
#!/bin/sh
|
|
: '
|
|
Copyright (c) 2020, The Linux Foundation. All rights reserved.
|
|
|
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
purpose with or without fee is hereby granted, provided that the above
|
|
copyright notice and this permission notice appear in all copies.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
'
|
|
|
|
SERVER=$(fw_printenv serverip | cut -c10-24);
|
|
TIMESTAMP=$(date +%Y%m%d%H%M%S)
|
|
|
|
if [ ! -n "$SERVER" ]; then
|
|
printf "%s\n" "Wrong configuaration SERVER = $SERVER" > /dev/console
|
|
exit 0
|
|
fi
|
|
|
|
if [ -e /sys/bus/pci/devices/0002:00:00.0/0002:01:00.0/devcoredump/data ] && [ "$ACTION" = add ]; then
|
|
FILENAME="qcn9224-pci0-q6dump-$TIMESTAMP.bin"
|
|
DUMPPATH="/sys/bus/pci/devices/0002:00:00.0/0002:01:00.0/devcoredump/data"
|
|
fi
|
|
|
|
if [ -e /sys/devices/platform/soc/c000000.wifi1/devcoredump/data ] && [ "$ACTION" = add ]; then
|
|
FILENAME="IPQ8074-m3dump-$TIMESTAMP.bin"
|
|
DUMPPATH="/sys/devices/platform/soc/c000000.wifi1/devcoredump/data"
|
|
fi
|
|
|
|
if [ -e /sys/devices/platform/soc/c000000.wifi/devcoredump/data ] && [ "$ACTION" = add ]; then
|
|
FILENAME="IPQ6018-m3dump-$TIMESTAMP.bin"
|
|
DUMPPATH="/sys/devices/platform/soc/c000000.wifi/devcoredump/data"
|
|
fi
|
|
|
|
if [ -e /sys/bus/pci/devices/0000:01:00.0/devcoredump/data ] && [ "$ACTION" = add ]; then
|
|
FILENAME="qcn9000-pci0-q6dump-$TIMESTAMP.bin"
|
|
DUMPPATH="/sys/bus/pci/devices/0000:01:00.0/devcoredump/data"
|
|
fi
|
|
|
|
if [ -e /sys/bus/pci/devices/0001:01:00.0/devcoredump/data ] && [ "$ACTION" = add ]; then
|
|
FILENAME="qcn9000-pci1-q6dump-$TIMESTAMP.bin"
|
|
DUMPPATH="/sys/bus/pci/devices/0001:01:00.0/devcoredump/data"
|
|
fi
|
|
|
|
if [ -e /sys/bus/pci/devices/0003:01:00.0/devcoredump/data ] && [ "$ACTION" = add ]; then
|
|
FILENAME="qcn9000-pci0-q6dump-$TIMESTAMP.bin"
|
|
DUMPPATH="/sys/bus/pci/devices/0003:01:00.0/devcoredump/data"
|
|
fi
|
|
|
|
if [ -e /sys/bus/pci/devices/0004:01:00.0/devcoredump/data ] && [ "$ACTION" = add ]; then
|
|
FILENAME="qcn9000-pci1-q6dump-$TIMESTAMP.bin"
|
|
DUMPPATH="/sys/bus/pci/devices/0004:01:00.0/devcoredump/data"
|
|
fi
|
|
|
|
if [ -e /sys/devices/platform/soc/soc:wifi1@c000000/devcoredump/data ] && [ "$ACTION" = add ]; then
|
|
FILENAME="qcn9100_1-q6dump-$TIMESTAMP.bin"
|
|
DUMPPATH="/sys/devices/platform/soc/soc:wifi1@c000000/devcoredump/data"
|
|
fi
|
|
|
|
if [ -e /sys/devices/platform/soc/soc:wifi2@c000000/devcoredump/data ] && [ "$ACTION" = add ]; then
|
|
FILENAME="qcn9100_2-q6dump-$TIMESTAMP.bin"
|
|
DUMPPATH="/sys/devices/platform/soc/soc:wifi2@c000000/devcoredump/data"
|
|
fi
|
|
|
|
if [ -e /sys/devices/platform/soc@0/cd00000.remoteproc/remoteproc/remoteproc0/devcoredump/data ] && [ "$ACTION" = add ]; then
|
|
FILENAME="IPQ9574-q6dump-$TIMESTAMP.bin"
|
|
DUMPPATH="/sys/devices/platform/soc@0/cd00000.remoteproc/remoteproc/remoteproc0/devcoredump/data"
|
|
fi
|
|
|
|
if [ -e /sys/devices/platform/soc@0/d100000.remoteproc/remoteproc/remoteproc0/devcoredump/data ] && [ "$ACTION" = add ]; then
|
|
FILENAME="IPQ5332-q6dump-$TIMESTAMP.bin"
|
|
DUMPPATH="/sys/devices/platform/soc@0/d100000.remoteproc/remoteproc/remoteproc0/devcoredump/data"
|
|
fi
|
|
|
|
# Collect IPQ5332 Internal Radio's Coredump
|
|
if [ -e /sys/devices/platform/soc@0/d100000.remoteproc/d100000.remoteproc:remoteproc_pd4/d100000.remoteproc:remoteproc_pd4:remoteproc_pd1/remoteproc/remoteproc2/devcoredump/data ] && [ "$ACTION" = add ]; then
|
|
FILENAME="ipq5332-q6dump-$TIMESTAMP.bin"
|
|
DUMPPATH="/sys/devices/platform/soc@0/d100000.remoteproc/d100000.remoteproc:remoteproc_pd4/d100000.remoteproc:remoteproc_pd4:remoteproc_pd1/remoteproc/remoteproc2/devcoredump/data"
|
|
fi
|
|
|
|
# Collect QCN6432 External Radio's Coredump
|
|
if [ -e /sys/devices/platform/soc@0/d100000.remoteproc/d100000.remoteproc:remoteproc_pd4/d100000.remoteproc:remoteproc_pd4:remoteproc_pd1/remoteproc/remoteproc3/devcoredump/data ] && [ "$ACTION" = add ]; then
|
|
FILENAME="qcn6432-q6dump-$TIMESTAMP.bin"
|
|
DUMPPATH="/sys/devices/platform/soc@0/d100000.remoteproc/d100000.remoteproc:remoteproc_pd4/d100000.remoteproc:remoteproc_pd4:remoteproc_pd1/remoteproc/remoteproc3/devcoredump/data"
|
|
fi
|
|
|
|
# Collect QCN6432 External Radio's Coredump
|
|
if [ -e /sys/devices/platform/soc@0/d100000.remoteproc/d100000.remoteproc:remoteproc_pd4/d100000.remoteproc:remoteproc_pd4:remoteproc_pd1/remoteproc/remoteproc4/devcoredump/data ] && [ "$ACTION" = add ]; then
|
|
FILENAME="qcn6432-q6dump-$TIMESTAMP.bin"
|
|
DUMPPATH="/sys/devices/platform/soc@0/d100000.remoteproc/d100000.remoteproc:remoteproc_pd4/d100000.remoteproc:remoteproc_pd4:remoteproc_pd1/remoteproc/remoteproc4/devcoredump/data"
|
|
fi
|
|
|
|
if [ -n "$FILENAME" ]; then
|
|
printf "%s\n" "Collecting dump_data in $SERVER" > /dev/console
|
|
$(tftp -l $DUMPPATH -r $FILENAME -p $SERVER 2>&1)
|
|
if [ $? -eq 0 ]; then
|
|
printf "%s\n" "$FILENAME collected in $SERVER" \
|
|
> /dev/console
|
|
else
|
|
printf "%s\n" "$FILENAME collection failed in $SERVER" \
|
|
> /dev/console
|
|
fi
|
|
echo 1 > $DUMPPATH
|
|
fi
|