Skip to content

Instantly share code, notes, and snippets.

View eballetbo's full-sized avatar

Enric Balletbo i Serra eballetbo

View GitHub Profile

Keybase proof

I hereby claim:

  • I am eballetbo on github.
  • I am eballetbo (https://keybase.io/eballetbo) on keybase.
  • I have a public key ASAi-TQCvLDQabtZ6zTPFrdsO7DMgTiuOH7Uhi-pfcMY9go

To claim this, I am signing this object:

Kernel development notes

Compiling and Building the Package

NOTE: Clean up before rebuilding

Example for x86_64:

@eballetbo
eballetbo / cdc-usb-mass-storage-device.sh
Created July 13, 2018 10:47
Create a USB Mass Storage device (with 2 LUN's 16MB each)
#!/usr/bin/env bash
# mount configfs
mount -t configfs none /sys/kernel/config
# load libcomposite module
modprobe libcomposite
# create a gadget
mkdir /sys/kernel/config/usb_gadget/g1
# cd to its configfs node
cd /sys/kernel/config/usb_gadget/g1
@eballetbo
eballetbo / cdc-ecm-ethernet-device.sh
Created July 13, 2018 10:45
Create a CDC ECM Ethernet device
#!/usr/bin/env bash
# mount configfs
mount -t configfs none /sys/kernel/config
# load libcomposite module
modprobe libcomposite
# create a gadget
mkdir /sys/kernel/config/usb_gadget/g1
# cd to its configfs node
cd /sys/kernel/config/usb_gadget/g1
@eballetbo
eballetbo / cdc-acm-serial-device.sh
Created July 13, 2018 10:44
Create a CDC ACM Serial device
#!/usr/bin/env bash
# mount configfs
mount -t configfs none /sys/kernel/config
# load libcomposite module
modprobe libcomposite
# create a gadget
mkdir /sys/kernel/config/usb_gadget/g1
# cd to its configfs node
cd /sys/kernel/config/usb_gadget/g1
#!/usr/bin/env bash
echo "**** Scanning 192.168.0.228/255.255.0.0 ****"
ip addr add 192.168.0.228/255.255.0.0 dev eth0
nmap -T5 -sP --exclude 192.168.1.228 192.168.0-255.0-254
ip addr del 192.168.0.228/255.255.0.0 dev eth0
echo "**** Scanning 172.16.0.228/255.255.0.0 ****"
ip addr add 172.16.0.228/255.255.0.0 dev eth0
nmap -T5 -sP --exclude 172.16.0.228 172.16.0-255.0-255