Skip to main content

Posts

Effective Linux Kernel Search Trick here

I was wondering how to search a big kernel source for my specific keywords. Here I found out some of the combination. Also there may be lot of ways to do the same things, that's the beauty of Linux. Here we go 1. looking for MCS8142_SPI_FLASH in kernel use find . -name "*.c" | xargs grep "MCS8142_SPI_FLASH" | more And here is the output. ./drivers/mtd/devices/mcs8142.c: mtd = mtd_concat_create(mtd_con,NO_OF_BANKS,"MCS8142 _SPI_FLASH"); similar way you can grep for a particular struct from kernel source; eg; find . -name "*.c" | xargs grep "struct jffs_node" | more 2. looking for MTD flag is set from .config file here is the command grep MTD .config | grep =y output CONFIG_MTD=y CONFIG_MTD_DEBUG=y CONFIG_MTD_PARTITIONS=y CONFIG_MTD_CHAR=y CONFIG_MTD_BLOCK=y CONFIG_MTD_MAP_BANK_WIDTH_1=y CONFIG_MTD_MAP_BANK_WIDTH_2=y CONFIG_MTD_MAP_BANK_WIDTH_4=y CONFIG_MTD_CFI_I1=y CONFIG_MTD_CFI_I2=y CONFIG_MTD_MCS8142_SPI_FLASH=y E...

Five mysteries of the universe

The things that look so trivial, and so many times go unnoticed, when one begins to question them, it feels strange and maybe even threatening. Or exciting ?-) clipped from www.guardian.co.uk Five mysteries of the universe there are scientific phenomena that defy explanation 1 The missing universe Everything in the universe is either mass or energy, but there's not enough of either 96% of the cosmos is missing "dark energy" and "dark matter" 2 Life Next time you see a tree, ask yourself why that is alive when your wooden dining table is not. 3 Death Here's the flip side: in biology, things eventually die, but there's no good explanation for it switching genes on and off controls ageing, but if our theory is right, those switches shouldn't have survived natural selection 4 Sex almost everything in biology uses sexual reproduction rather than asexual cloning sex is a highly inefficient way to reproduce At the moment, sex only seems to exist to give ...

Kernel Programming Five Things to Keep in Mind before you start

Things to keep in mind for kernel programming If you want to hack Linux kernel and do some programs, before you start keep some points in mind First and very basic point to make you feel relax with linux kernel , as, kernel is nothing but a program as like other programs, which includes memory management, process scheduling, system management and all you need to work in. 1. In kernel space you do not have leisure of GLIBc library, ie you can not use printf also you have printk in kernel space. 2. Limited stack - you have limited stack space in kernel so do not make unnecessary variables declared, as tomorrow you may be going to add some new features. In user space you have almost unlimited stack so you will be little worried about how many variables you are using. 3. In kernel space no memory protection is there, as in user space if some memory corruption occurs kernel will trap and send signal. In kernel space there is no-one to trap memory corruption, it is like you are directly ...

Building Kernel for Embedded Linux with ARM board

I am giving general steps for building embedded linux for ARM board. Building kernel for embedded linux 1. Download kernel untar it using bz2 format is more compressed than gz ;bz2 - tar -xvjx linux-x.x.x GNU zip fromat gz - tar -xvzf linux-x.x.x 2. Configure kernel Before you make build the kernel configure it. Linux kernel provides lot of features and almost all driver support. All the features are not required for our embedded application. Select the required features, like processor type if your board have USB support select the USB support. If your board have SATA support select the requried module. one can configure linux kernel using make config - text based configuration make menuconfig - menu based configuration make xconfig - x11 based configuration make gconfig - gtk+ based configuration If you are new to configuration you can start with make defconfig - creates default configuration and kept in root folder as .config file. The flags which are set in this file are with CONF...

Good Linux PDF Books Links Collection

I was busy doing testing, so could not get time on exploring things around, now will be regular here, Got one more good link collection which contains the linux related documents http://www.pdf-search-engine.com/understanding-linux-kernel-pdf.html One more link I like is Its collection of Free Computer Books Free online Books site buy online books free,This site contain free online books on computer science and software engineering. Books on C C++ Java web programming, Languages. Do you know that you can change the color of you command prompt in windows, well how to get command prompt? its easy, click on start button on you windows and in run menu type cmd, hit enter, you are in DOS command prompt. To change the color just type "color f2" as one example you can try out more combination. Keep updating.

Reading is by no means a passive activity

'Reading a good book prepares you for real life. Scientists have found that, far from being a way to avoid reality" Reading a good book is also a good way to stimulate your mind, relax you, educate you and many other things. There is still nothing better than relaxing with a good book. clipped from www.guardian.co.uk Reading Bridget Jones could improve your love life, new study shows t's the news we've all been waiting for: reading a good book prepares you for real life. Scientists have found that, far from being a way to avoid reality could make you better able to cope with similar situations in the real world A brain-imaging study carried out by psychologists at Washington University used functional magnetic resonance imaging to track brain activity as participants read short stories, finding that reading is by no means a passive activity Instead, as participants read from a 1940s text about the daily activities of a young boy, activity in different brain regions in...

Indian couple invent fuel-less, battery-less auto engine

Kolkata couple invent fuel-less, battery-less auto engine. Interesting that the advances/new technology are able to gain support, instead of being bought out by a petrol car manufacturer and left idle on the bench. clipped from economictimes.indiatimes.com Kolkata couple invent fuel-less, battery-less auto engine KOLKATA: Kanishk Sinha, 30, and his wife Lipika, 25, chose to do something different from looking for jobs—they invented a fuel-less environment-friendly auto engine. "This engine is switched on by a chemical reaction between zinc and oxygen; hence it is pollution-free. This technology also increases the durability of the engine," Kanishk Sinha, chairman of the Jasper Motor Vehicle company, told reporters. "A water pump can run for five years without any interruption on this engine and a four-wheeler car can run 450,000 km," said Sinha. The young couple established the company registered in the US five years ago with Rs.1 billion (Rs.100 crore) raised...