mirror of https://github.com/OpenIPC/firmware.git
[no ci] add switch_debug function to profile (#1074)
parent
e32a4f8564
commit
7d31a4654b
|
@ -49,6 +49,17 @@ show_wlan() {
|
|||
grep -r '$1..=' /etc/wireless | cut -d '"' -f 4 | sort | grep -e $(fw_printenv -n soc) -e generic
|
||||
}
|
||||
|
||||
switch_debug() {
|
||||
[ "$1" = "on" ] && action='+' report='enabled' || action='-' report='disabled'
|
||||
mount | grep -q 'debugfs' || mount -t debugfs none /sys/kernel/debug
|
||||
echo "${action}p" > /sys/kernel/debug/dynamic_debug/control
|
||||
for entry in mmc_core avpu squashfs mtdblock; do
|
||||
echo "module $entry -p" > /sys/kernel/debug/dynamic_debug/control
|
||||
done
|
||||
echo "file fs/sysfs/file.c -p" > /sys/kernel/debug/dynamic_debug/control
|
||||
echo "Dynamic debug for all files has been $report."
|
||||
}
|
||||
|
||||
# Source configuration files from /etc/profile.d
|
||||
for i in /etc/profile.d/*.sh; do
|
||||
[ -r "$i" ] && . $i
|
||||
|
|
Loading…
Reference in New Issue