Skip to content

Instantly share code, notes, and snippets.

View Scott31393's full-sized avatar
🤙

Tommaso Merciai Scott31393

🤙
  • Avnet SILICA
  • Florence, Italy
View GitHub Profile
@sdrabb
sdrabb / dev_gems.md
Last active February 17, 2021 10:21
Developer Gems

Build Debian Buster root FS from Linux x86_64 host to arm64 target 🤘

sudo apt-get install debootstrap qemu-utils qemu qemu-user-static flex bison

https://a-delacruz.github.io/debian/debian-arm64.html

NOTE: while running --second-stage after chroot Error while loading /debootstrap/debootstrap: Exec format error can occur, then a possible solution is the following:

@Miouyouyou
Miouyouyou / Makefile
Last active December 24, 2023 10:14
Sample Makefile for cross-compiled ARM Linux kernel module
# Set this variable with the path to your kernel.
# Don't use /usr/src/linux if you're cross-compiling...
MYY_KERNEL_DIR ?= ../linux
# If you're compiling for ARM64, this will be arm64
ARCH ?= arm
# This is the prefix attached to your cross-compiling gcc/ld/... tools
# In my case, gcc is armv7a-hardfloat-linux-gnueabi-gcc
# If you've installed cross-compiling tools and don't know your
@amarburg
amarburg / rs485_ioctl_test.c
Created April 11, 2016 21:30
A quick test function to demonstrate the Linux serial / RS485 ioctls().
/*
* Test program Linux RS485-mode ioctls.
*
* cc -o rs485_mode rs485_mode.c
*/
#include <stdlib.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
@itrobotics
itrobotics / led_blinking.c
Created May 13, 2015 09:54
a simple linux driver code to demo the GPIO-LED blinking by timer
/*
* DESCRIPTION:
* The example of using the timer to perform the blinking LED .
* */
#include <linux/module.h>
#include <linux/string.h>
#include <linux/init.h>
#include <linux/cdev.h>
#include <linux/device.h>