This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CFLAGS_mymodule.o := -DDEBUG | |
obj-m := mymodule.o | |
header-y += mymodule.h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* 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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* 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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CFLAGS_respawn += -Wall | |
respawn: respawn.c | |
$(CC) $(CFLAGS_$@) $(LDFLAGS_$@) $(CFLAGS) $(LDFLAGS) -o $@ $< | |
clean: | |
rm -f respawn |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DESCRIPTION = "VNC server running on top of framebuffer" | |
HOMEPAGE = "https://github.com/ponty/framebuffer-vncserver" | |
LICENSE = "GPLv2" | |
DEPENDS = "libvncserver" | |
RDEPENDS_${PN} = "libvncserver" | |
SRC_URI = "git://github.com/ponty/framebuffer-vncserver.git" | |
LIC_FILES_CHKSUM = "file://LICENSE;md5=8264535c0c4e9c6c335635c4026a8022" | |
PR = "r1" | |
PR_append = "+gitr${SRCPV}" | |
SRCREV = "83586bf6bbb1cbc8ccd72db602d4d4b75d2c2b04" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
libus: libus.c libus.h | |
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< | |
clean: | |
rm libus | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
. $1 | |
export BUILD_SYS=$(echo $CONFIGURE_FLAGS | tr -s ' ' '\n' | grep host | cut -f2 -d=) | |
export HOST_SYS=$(echo $CONFIGURE_FLAGS | tr -s ' ' '\n' | grep build | cut -f2 -d=) | |
export STAGING_INCDIR=${OECORE_TARGET_SYSROOT}/usr/include | |
export STAGING_LIBDIR=${OECORE_TARGET_SYSROOT}/usr/lib | |
export PATH=${OECORE_NATIVE_SYSROOT}/usr/bin/python-native:${PATH} | |
# remove stripping, I face used symbols being stripped | |
# this has to do with linker option order | |
export LDFLAGS=${LDFLAGS/-Wl,--as-needed/} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export ARCH=arm | |
export CROSS_COMPILE=arm-poky-linux-gnueabi- | |
# u-boot mkimage is inside Yocto's sysroot | |
# edit acordingly | |
export PATH=${PATH}:/opt/poky/1.6.2/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi:/opt/poky/1.6.2/sysroots/x86_64-pokysdk-linux/usr/bin/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
inherit core-image | |
disable_getty () { | |
sed -e 's,^1:2345:respawn:/sbin/getty 38400 tty1$,# 1:2345:respawn:/sbin/getty 38400 tty1,' -i ${IMAGE_ROOTFS}/etc/inittab | |
} | |
ROOTFS_POSTPROCESS_COMMAND += "diable_getty; " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <string.h> | |
#include <stdio.h> | |
static unsigned char b[6]; | |
#include <assert.h> | |
#if !defined(__KERNEL__) | |
#define BUG_ON(cond) assert(!(cond)) | |
#endif |