Skip to content

Instantly share code, notes, and snippets.

Daniel Hilst dhilst

Block or report user

Report or block dhilst

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View HelloWorld.c
#include "HelloWorld.h"
JNIEXPORT void JNICALL Java_HelloWorld_sayHello
(JNIEnv *env, jclass class)
{
puts("Hello from C world");
}
@dhilst
dhilst / Kbuild
Last active Aug 29, 2015
How to export out-of-tree ioctls to userspace?
View Kbuild
CFLAGS_mymodule.o := -DDEBUG
obj-m := mymodule.o
header-y += mymodule.h
View gpio
/*
* MCP23S08 SPI/GPIO gpio expander driver
*/
#include <linux/kernel.h>
#include <linux/device.h>
#include <linux/mutex.h>
#include <linux/module.h>
#include <linux/gpio.h>
#include <linux/i2c.h>
View gpio-mcp23s08.c
/*
* MCP23S08 SPI/GPIO gpio expander driver
*/
#include <linux/kernel.h>
#include <linux/device.h>
#include <linux/mutex.h>
#include <linux/module.h>
#include <linux/gpio.h>
#include <linux/i2c.h>
@dhilst
dhilst / foo
Created Feb 16, 2013
hello gist world
View foo
bar
tar
zar
@dhilst
dhilst / gkos_char_device.c
Created Apr 29, 2013
Device Driver Hello World
View gkos_char_device.c
/*
* file: gkos_char_device.c
*
* Desc: A simple device that
* echos a message when read,
* write method not implemented
*
* This was made on top of
* LDD and LKMPG examples
*
@dhilst
dhilst / Makefile
Created Apr 29, 2013
Driver Hello World Makefile
View Makefile
obj-m += gkos_char_device.o
all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean:
rm *.ko *.o *.mod.c *.mod.o
@dhilst
dhilst / .config
Last active Dec 19, 2015
buildroot libevas error
View .config
#
# Automatically generated file; DO NOT EDIT.
# Buildroot 2013.05 Configuration
#
BR2_HAVE_DOT_CONFIG=y
# BR2_arcle is not set
# BR2_arceb is not set
BR2_arm=y
# BR2_armeb is not set
# BR2_aarch64 is not set
@dhilst
dhilst / Makefile
Last active Dec 19, 2015
kernel dynamic char buffer
View Makefile
obj-m += cdev04.o
KDIR ?= /lib/modules/$(shell uname -r)/build
all:
make -C $(KDIR) M=$(PWD) modules
clean:
make -C $(KDIR) M=$(PWD) clean
View Makefile
obj-m += llist.o
KDIR ?= /lib/modules/$(shell uname -r)/build
all:
make -C $(KDIR) M=$(PWD) modules
clean:
make -C $(KDIR) M=$(PWD) clean
You can’t perform that action at this time.