The Linux power management mechanism distinguishes between three sleep states: Standby, Suspend-to-RAM (STR) and hibernation. They have increasing energy saving and wake up latency, although in practise STR saves more energy and has very similar wake up latency as the Standby mode. STR needs to be supported by the platform hardware. Main memory needs to be refreshed to preserve [...]
1) Kernel command line arguments Add 'init=/bin/bash no_console_suspend' to boot to a basic shell and keep the console output while the suspend is happening. 2) Mount proc and sys: mount -t proc /proc proc mount -t sysfs /sys sys 3) Prepare the wake up source: Any wake up source is valid, like a GPIO: echo [...]
I had created a root filesystem for an ARM target using rootstock, with something like: sudo rootstock –fqdn karmic –login ubuntu –password ubuntu –imagesize 4G –dist karmic –serial ttyS0 –seed ubuntu-desktop,openssh-server Once I decompress it into my NFS server root and I tried booting my target (loading the kernel via TFTP), I was surprised by a [...]
Overview ftrace is a tracing facility built into the Linux kernel. It originated in the real time enhancements efforts and is now merged into mainstream. However not all features are supported by all architectures. This overview is based around the x86 architecture as the rest will slowly catchup feature wise. General settings Mount the debugfs [...]
Interrupt affinity Individual IRQs can be assigned to individual processors to handle it. Interrupts are generally shared evenly between CPUs which means delays while writing new data and instruction caches and conflicts with other running processes. Time critical IRQs should be dedicated to a CPU. cat /proc/interrupts Show which CPUs all IRQs [...]
Every driver has an entry point function, minimaly defined as: static __init mydriver_init( void ) { return platform_driver_register(&my_driver); } module_init(mydriver_init); The __init macro is used to describe the function as only being required during initialisation time, so that the kernel can remove this function and release its memory after initialization. To recover memory used by [...]
Linux includes a set of defines in include/linux/autoconf.h after configuration which is included with every file. Eclipse misses this and grays out code which is actually being built. Configure the kernel (for example with make xconfig) to create include/linux/autoconf.h Start eclipse with -vmargs -Xmx512M or more to avoid memory issues. Create a new Makefile C project. In [...]
Install vpnc, sudo apt-get install vpnc network-manager-vpnc Try a manual connect, sudo vpnc And provide the login details: IPSec gateway example.com IPSec ID my-group IPSec secret my-group-pwd IKE Authmode hybrid Xauth username my-username Xauth password my-password Copy the configuration into a new profile sudo cp /etc/vpnc/example.conf /etc/vpnc/myprofile.conf And edit it with your details. You may [...]
Applications You will need a gdb client running on the host and a gdb server running on the target from your cross compilation toolkit. On the target: arch-gdbserver local_ip:local_port my_app my_args gdbserver can also attach to a running process with the –attach parameter. On the host: arch-gdb –symbols=my_apptarget extended-remote target_ip:remote_portCtrl-Cbt Graphical GDB DDD and Insight [...]
Just because I keep forgetting… dpkg-scanpackages directory /dev/null | gzip -9c > directory/Packages.gz