Skip to content

Latest commit

 

History

History
65 lines (59 loc) · 1.82 KB

kernel.org

File metadata and controls

65 lines (59 loc) · 1.82 KB

Linux Kernel Dev

Building on arch

https://wiki.archlinux.org/index.php/Kernel_Compilation_From_Source

building on meego

obs

build through obs

https://www.nixuopen.org/blog/2010/11/developing-for-meego-part-2/

build manual

quilt

copy series and .patches to linux-2.6.XX/patches if a patch for getting to 2.6.XX.Y needing to be applied cat patch-2.6.XX.Y | patch -p1 then quilt push

oldconfig

make mrproper copy boot/config-X to linux-2.6.XX.config make oldconfig

compile

make && make modules su make modules_install && make install

from vanilla

modules

compilation

If your kernel source tree is located in, say, your ~/kernel-2.6 directory, the make command required to build your module (typed in the directory containing the module source and makefile) would be: make -C ~/kernel-2.6 M=`pwd` modules

(-C switches directory before starting build process/looking at makefiles) (M= is used in the kernel’s makefile to specify the directory of an external module to build)

backtraces

For grabbing kernel backtraces:

$ sudo -s

ioctl

calling from userspace

man 2 ioctl

Usage is ioctl(int file_descriptor, int request_id, …) file_descriptor can be return from open() call

Figuring out request_id is from fs/nm/ioctl.h Need to get which function id is being used by looking at strace Then match id to function symbol usually in fs/nm/ioctl.c and find the appropriate way the header generates the id (maybe using _IOW)

rest copied from userspace using copy_from_user function

kernel debug

netconsole

http://mindplusplus.wordpress.com/2010/03/06/using-netconsole-on-linux/ http://sarah.thesharps.us/2009-02-22-09-00

ITP

In Target probe (need further research)

kdump/kdb

(need further research)

ACPI “ERST”