omapreg_debug

Overview

Author

Mansoor Ahamed : mansoor.ahamed@ti.com

Description

It is possible to access the system space locations from userspace using tools like devmem2. But there are certain regions which could be written / read only in supervisor mode. This tool provides a DebugFS interface using which user can read / write to any system space.

Build

Please make sure DebugFS support is enabled in the kernel. This could done during kernel configuration (i.e. make menuconfig) from "Kernel hacking ---> *? Debug Filesystem"

Build the kernel uImage (or zimage) first and then build the omapreg_module.

The build script build.sh could be used to build the omapreg_debug module.

Before that, modify the KDIR variable in the build script to point your kernel source directory.

Run ./build.sh to build the module

The output module file "omapreg_debug.ko" should be available in the project root folder (where the omapreg_debug.c is present).

Usage

* Make sure sysfs is mounted. If not follow steps below to mount it.

cd /

mkdir /sys

mount -t sysfs sysfs sys

* Make sure DebugFS is mounted. If not follow steps below to mount it.

cd /

mount -t debugfs null /sys/kernel/debug

* Now you should see the omapreg_debug entry in the following location