Friday, July 26, 2013

Thermal management

I have been working  as intern for thermal management project , I like to share what i have been learned Thermal management


The generic thermal management uses a concept of cooling states. 

The intent of a cooling state is to define thermal modes for supporting devices. 

The higher the cooling state, the lower the device/platform temperature would be. 

This can be used for both passive and active cooling devices.

  • Passive cooling -  does not use a fan or other means of forced-air cooling.  Relies on      natural convection cooling.
  •  Active cooling -   uses a fan directly mounted onto the heat sink for forced-air cooling.   

                         
sysfs driver will redirect all the control requests to the appropriate cooling device driver when the user application sets anew cooling new state. 

It is up to the cooling device driver to  implement the actual cooling control.

Thermal management in user space would imply that all the policy decisions will be taken from user space and the kernel’s job would be only to facilitate those decisions.

Tuesday, June 25, 2013

Creating the Module

First, find the source that your current Linux kernel was compiled from. You can save the mymodule.c in any one of the folder under staging or drivers directory


mymodule.c


#include <linux/module.h>
#include <linux/config.h>
#include <linux/init.h>

static int __init mymodule_init(void)
{
 printk ("My module worked!\n");
        return 0;
}

static void __exit mymodule_exit(void)
{
 printk ("Unloading my module.\n");
        return;
}

module_init(mymodule_init);
module_exit(mymodule_exit);

MODULE_LICENSE("GPL");

Edit the Makefile in the same directory. Add this line
obj-m += mymodule.o
Compile your module:
 # make -C [top directory of your kernel source] SUBDIRS=$PWD modules
Load the module:
 # insmod ./mymodule.o
And check to see if your message printed out:
# dmesg
At the end of the output:
My module worked!
Now remove the kernel module:
 # rmmod mymodule
Check the output of dmesg again, you could see the output:
 Unloading my module.


Wednesday, June 12, 2013

Makefile and Kconfig


make file

Define the files to be built and and link to other files,  Makefiles within the kernel are kbuild Makefiles that use the kbuild infrastructure, these make  evaluates to either y (for built-in) or m (for module) If it is neither y nor m, then the file will not be compiled nor linked.


Kconfig

Every entry has its own dependencies. These dependencies are used
to determine the visibility of an entry. Any child entry is only
visible if its parent entry is also visible.

Menu entries
------------

Most entries define a config option; all other entries help to organize
them. A single configuration option is defined like this:

config MODVERSIONS
bool "Set version information on all module symbols"
depends on MODULES
help

 Usually, modules have to be recompiled whenever you switch to a new kernel.

Every line starts with a key word and can be followed by multiple
arguments.  "config" starts a new config entry. The following lines
define attributes for this config option. Attributes can be the type of
the config option, input prompt, dependencies, help text and default
values. A config option can be defined multiple times with the same
name, but every definition can have only a single input prompt and the
type must not conflict.

https://www.kernel.org/doc/Documentation/kbuild/kconfig-language.txt

Wednesday, May 29, 2013

My First Career



Hi ,I am well known as Hema , Right from the college days I am interested in Open source.I have started my career in a start-up where i learn about the work nature, Time consumption , etc.. I have taken a break form the IT field , thinking of something different to do.

I want to contribute in opensource, I tried something in KDE plasma center but never created a patch nor written a code to contribute.

I came to knew about OPW from Madhu. Where i have learned  lot of things in opensource.

I like to share what i have learn from this OPW