Contents: [Dobrica Pavlinušić's random unstructured stuff]
• Dobrica Pavlinušić's random unstructured stuff (Raspidancer) 
• Dobrica Pavlinušić's random unstructured stuff (USB Host Shield for Arduino Pro Mini) 
• Dobrica Pavlinušić's random unstructured stuff (problems) 
• Dobrica Pavlinušić's random unstructured stuff (MAX3421 kernel module) 
• Dobrica Pavlinušić's random unstructured stuff (Raspberry pi kernel modules) 
• Dobrica Pavlinušić's random unstructured stuff (cross‑compile) 

Raspidancer
Facedancer on RaspberryPi  http://wiki.yobi.be/wiki/Raspdancer 
Newer software https://github.com/ktemkin/Facedancer 
Schema: http://wiki.yobi.be/images/1/18/Raspdancer21_v10_sch.png
pi@picam ~ $ git clone https://github.com/ktemkin/Facedancer

pi@picam ~ $ git clone https://github.com/lthiery/SPI-Py
Cloning into 'SPI-Py'...
remote: Counting objects: 81, done.
remote: Total 81 (delta 0), reused 0 (delta 0), pack-reused 81
Unpacking objects: 100% (81/81), done.
Checking connectivity... done.
pi@picam ~ $ cd SPI-Py/

pi@picam ~/SPI-Py $ sudo apt-get install python3-dev

pi@picam ~/SPI-Py $ python3 setup.py build

pi@picam ~/SPI-Py $ sudo python3 setup.py install

pi@picam ~/Facedancer $ export BACKEND=raspdancer

pi@picam ~/Facedancer $ sudo -E ./facedancer-serial.py

pi@picam ~/Facedancer $ sudo -E ./facedancer-serial.py 
Using MAXUSB backend.
MAXUSB initialized
MAXUSB enabled
MAXUSB revision 0
<facedancer.backends.RaspdancerMaxUSBApp.RaspdancerMaxUSBApp object at 0xb6a67710>
MAXUSB connected device USB Serial device

USB Host Shield for Arduino Pro Mini
http://shop.tkjelectronics.dk/product_info.php?cPath=22&products_id=45 
Schema: http://www.tkjelectronics.dk/uploads/usbhost/UHS_mini_10.pdf 
problems
• VBCOMP is not routed on this board
• VBUS (usb VCC) is 3.3V not 5V
MAX3421 kernel module
• device tree support https://github.com/AlexanderAmelkin/linux‑wandboard/commits/for‑linux‑usb 
Raspberry pi kernel modules
• https://github.com/notro/rpi‑source/wiki/Examples‑on‑how‑to‑build‑various‑modules 

pi@picam ~ $ sudo apt-get install libncurses5-dev

pi@picam ~ $ rpi-source 

pi@picam ~/linux $ ./scripts/diffconfig 
+USB_MAX3421_HCD m

pi@picam ~/linux $ grep MAX3421 .config
CONFIG_USB_MAX3421_HCD=m

pi@picam ~/linux $ make SUBDIRS=drivers/usb/host/ modules

cross‑compile
dpavlin@klin:/klin/rpi/linux$ cat run.sh
1.. https://www.raspberrypi.org/documentation/linux/kernel/building.md 
#make oldconfig

KERNEL=kernel7
#make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- bcm2709_defconfig
#make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- oldconfig
make -j4 ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- zImage modules dtbs

test -d mnt && rm -Rf mnt/
mkdir -p mnt/boot/overlays
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- INSTALL_MOD_PATH=mnt/ modules_install
cp arch/arm/boot/zImage mnt/boot/$KERNEL.img
cp arch/arm/boot/dts/*.dtb mnt/boot/
cp arch/arm/boot/dts/overlays/*.dtb* mnt/boot/overlays/
cp arch/arm/boot/dts/overlays/README mnt/boot/overlays/