비글본시작하기
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| 비글본시작하기 [2012/01/06 08:00] – 119.192.238.152 | 비글본시작하기 [2018/07/18 14:10] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 10: | Line 10: | ||
| | | ||
| + | |||
| + | 커널 모듈 만들기 | ||
| + | |||
| + | |||
| + | #include < | ||
| + | static int __init hello_init(void) | ||
| + | { | ||
| + | printk(KERN_INFO "Hello Example Init\n" | ||
| + | return 0; | ||
| + | } | ||
| + | static void __exit hello_exit(void) | ||
| + | { | ||
| + | printk(KERN_INFO "Hello Example Exit\n" | ||
| + | } | ||
| + | module_init(hello_init); | ||
| + | module_exit(hello_exit); | ||
| + | MODULE_AUTHOR(" | ||
| + | MODULE_DESCRIPTION(" | ||
| + | MODULE_LICENSE(" | ||
| + | |||
| + | |||
| + | |||
| + | obj-m := hello.o | ||
| + | |||
| + | |||
| + | #!/bin/bash | ||
| + | export SYSROOTS=${HOME}/ | ||
| + | export PATH=${PATH}: | ||
| + | export ARCH=arm | ||
| + | export CROSS_COMPILE=arm-angstrom-linux-gnueabi- | ||
| + | export KERNELDIR=${SYSROOTS}/ | ||
| + | make -C ${KERNELDIR} M=$(pwd) modules | ||
| + | |||
| + | |||
| + | insmod hello.ko | ||
| + | |||
| + | http:// | ||
비글본시작하기.1325836817.txt.gz · Last modified: 2018/07/18 14:09 (external edit)