blob: 538b424ed459c61a61bc27313f2d8f0208a59f6f [file] [log] [blame]
# Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
description "Chromium OS debug daemon"
author "chromium-os-dev@chromium.org"
start on started ui
stop on stopping ui or starting halt or starting reboot
respawn
pre-start script
TRACING=/sys/kernel/debug/tracing
# NB: check for tracing dir in case the kernel config changes
if [ -d "${TRACING}" ]; then
# enable debugfs-access write access for systrace helper
for file in buffer_size_kb set_event trace trace_clock trace_marker \
tracing_on; do
chgrp debugfs-access ${TRACING}/${file} && chmod g+w ${TRACING}/${file}
done
fi
# NB: only on exynos5
MALI_HWC_ENABLE=/sys/class/misc/mali0/device/hwc_enable
if [ -f "${MALI_HWC_ENABLE}" ]; then
chgrp debugd ${MALI_HWC_ENABLE} && chmod g+w ${MALI_HWC_ENABLE}
fi
end script
exec /sbin/debugd