User Tools

Site Tools


비글본시작하기

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next 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 <linux/module.h>
 +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("Chris Hallinan");
 +MODULE_DESCRIPTION("Hello World Example");
 +MODULE_LICENSE("GPL");
 +
 +
 +
 +obj-m := hello.o
 +
 +
 +#!/bin/bash
 +export SYSROOTS=${HOME}/angstrom-setup-scripts/build/tmp-angstrom_2008_1/sysroots
 +export PATH=${PATH}:${SYSROOTS}/i686-linux/usr/armv7a/bin
 +export ARCH=arm
 +export CROSS_COMPILE=arm-angstrom-linux-gnueabi-
 +export KERNELDIR=${SYSROOTS}/beagleboard-angstrom-linux-gnueabi/kernel
 +make -C ${KERNELDIR} M=$(pwd) modules
 +
 +
 +insmod hello.ko
 +
 +http://en.wikipedia.org/wiki/User:WillWare/Angstrom_and_Beagleboard
  
비글본시작하기.1325836817.txt.gz · Last modified: 2018/07/18 14:09 (external edit)