- Sistema operativo: Debian GNU/Linux 9 (Stretch)
- Nombre de host:
dc
- Nombre de dominio:
foo.bar
- Dirección IP:
192.168.0.1
###### | |
## Basic FreeBSD bridge for HP MicroServer and 4-port PCI-E NIC | |
## Details from dmesg: | |
## - <HP Ethernet 1Gb 2-port 332i Adapter, ASIC rev. 0x5720000> | |
## - <Intel(R) PRO/1000 Network Connection 7.6.1-k> | |
set -e | |
cat >> /boot/loader.conf <EOF | |
## Add network bridge support |
import zmq | |
from flask import Flask | |
from threading import Thread | |
HOST = '127.0.0.1' | |
PORT = 9090 | |
TASK_SOCKET = zmq.Context().socket(zmq.REQ) | |
TASK_SOCKET.connect('tcp://{}:{}'.format(HOST, PORT)) | |
app = Flask("app") |
You might want to read this to get an introduction to armel vs armhf.
If the below is too much, you can try Ubuntu-ARMv7-Qemu but note it contains non-free blobs.
First, cross-compile user programs with GCC-ARM toolchain. Then install qemu-arm-static
so that you can run ARM executables directly on linux
// DDRD (R/W) pin direction (0 = INPUT / 1 = OUTPUT) | |
// PORTD (R/W) pin state (INPUT: 0 = LOW / 1 = HIGH | OUTPUT: 0 = PULL-UP DIACTIVATED / 1 = PULL-UP ACTIVATED) | |
// PIND (R) pin state (INPUT ONLY: 0 = LOW / 1 = HIGH) | |
// bit(n) // calculates value of n-th bit (returns: 0 / 1) | |
// bitRead(byteName, n) // gets value of n-th bit of byte (returns: 0 / 1) | |
// bitSet(byteName, n) // sets value of n-th bit of byte to 1 | |
// bitClear(byteName, n) // sets value of n-th bit of byte to 0 | |
// bitWrite(byteName, n, val) // sets value of n-th bit of byte to 0 or 1 |
The Digilent JTag uses FT2232, but its configuration EEPROM contains secrete data needed to be recoginzed by Xilinx ISE/Vivado. The following method only works on linux (tested on Ubuntu16.04), but the patched FT2232 doggle also works on Windows. Since WSL1 does not provide USB device access, the following method will not work for WSL1.
DONT use FT_Prog on offical Digilent cable, as it can trash the firmware! The offical eeprom contains secrete data that cannot be handled correctly by FT_Prog.
Here are steps to create a Digilent-like Jtag that can be used in Xilinx ISE and Vivado
- Install softwares:
sudo apt-get install libftdi1 ftdi-eeprom
- Create a file "flash_digilent.conf" with the following content:
%.hex: %.asm | |
avra -fI $< | |
rm *.eep.hex *.obj *.cof | |
all: $(patsubst %.asm,%.hex,$(wildcard *.asm)) | |
upload: ${program}.hex | |
avrdude -c arduino -p m328p -P /dev/arduino-uno -b 115200 -U flash:w:$< | |
monitor: |
Goal: Emulate a Raspberry Pi with QEMU in order to run the Raspbian O/S (based on Debian Linux).
The current setup is not ideal. For one thing, the maximum RAM allowed using the "versatile-pb" firmware is 256 Mb. In addition, only the most basic peripherals, a keyboard and mouse, are supported.
A number of articles have been written on this topic. Most are outdated, and the few recent ones are missing key information.
#!/usr/bin/python3 | |
import socket, sys, threading | |
# Simple chat client that allows multiple connections via threads | |
PORT = 9876 # the port number to run our server on | |
__version__ = "0.0.1" | |
class ChatServer(threading.Thread): |