If you are getting the module insertion error in kernel , “version magic ‘2.6.35 SMP mod_unload ‘ should be ‘2.6.35 SMP preempt mod_unload”, while loading even a simple character driver , then rebuild your kernel by enabling preempt option , then build the driver module and try inserting . Set following option in kernel configContinue reading “[Linux driver]Module insertion error – “version magic ‘2.6.35 SMP mod_unload ‘ should be ‘2.6.35 SMP preempt mod_unload””
Monthly Archives: July 2013
[C][Bash]How to get the bash environment variables from a C program?
C program can use getenv function , which searches the environment list to find the environment variable name, and returns a pointer to the corresponding value string, for getting the bash environment variables. eg: /*This C program is to show that how to get bash variables */ #include <stdio.h>#include <stdlib.h> int main(void){ printf(” %s\n”Continue reading “[C][Bash]How to get the bash environment variables from a C program?”
[U-boot]How to redirect prints to serial console in uboot
In uboot , there is environment variable called stdout . Set its value to serial setenv stdout serial Refer common/console.c in uboot directory
[U-Boot]overlapping section error in u-boot compilation
Error in u-boot compilation “section .bootpg lma 0xeffff000 overlaps previous sections” Reason – The text base address macro , CONFIG_SYS_TEXT_BASE is using default value . Solution – Define the macro CONFIG_SYS_TEXT_BASE This macro may be defined under some compiler directives. So search for this macro in the config file (eg: include/configs/board_name.h) . If it is thereContinue reading “[U-Boot]overlapping section error in u-boot compilation”