Videoteam/SBC for Opsis

From Wiki
Jump to: navigation, search

Our experiences with Odroid C2s as a companion to the atlys/opsis.

Contents

[edit] Round 4: Carl is back

wget dd tweak, then ansible. https://github.com/CarlFK/video-stack-bin-chicken/tree/master/scripts/c2

[edit] Round 3: Things stefanor did

Starting with this image: https://forum.odroid.com/viewtopic.php?f=138&t=27449

rm /etc/apt/sources.list.d/deb-multimedia.list
sed -i 's/ftp.uk/deb/' /etc/apt/sources.list
echo 'deb http://ppa.launchpad.net/timvideos/fpga-support/ubuntu xenial main' > /etc/apt/sources.list.d/timvideos-ppa.list
apt-key add - <<EOF
-----BEGIN PGP PUBLIC KEY BLOCK-----
Description: TimVideos PPA Key
Fingerprint: 0xD6CBC0BFF6D101625F67E3C758ADE403A0042E80

mQINBFXrnjQBEADd+nlpe4yOzlX3Wk4+8p7CHnk3fJlr3DSVlxdu3iCtv284xpJI2pA3J+CR
zRnZ2vjgfLkpwO0bYVHq+tucdx4LS7zhiAp6MmGvcKdTFaiQ68ZvSY3z/2HKJ92AUY6C4dIK
nzwVefjzBGUCGCV0Xx7LzA34MfplvbSZfpiGLMMewfrHtusEfoR1Ms54QvJJMz7H1ltyCzPg
HuhG64DvHY2kMGtI7Ctbh7KGttaNqYMK5GCZQdMChXn1Y1uiNJl+MtsIsSWq6FXVTRF1Xth2
uMdcpsjS+sC8CJhBmtixvvf86msxP2VHnthvEnvSv9CAbW5lPE5RV8xJp9QQaQ7+kr4tSn4P
xe64Rh1N+h7GX2gFQzB8JNoemVZaS0Gj6atXiIrlxj59723Urv4M+QoLMtNw8OHhz3ZiK6fi
jjivUUN5n3Shj24ZIzBpAvSdyBXfno6/OLG0UlTS/AyJQbqZ0zcRxnRACyGCQj7mB9gG/4jK
Kn1PdFVh7jWIqK0yavN+/+5YctyRD+rII2ENYDwHpXPjQAS79UJ7xszHUpYGxPRX52OEIo5f
yAdkPbfarzrCBAX1cySYAPqGv8kC8T99p1l+fWktMDd3bQ6+fWTbSK5hW+lAXI/g6Eu1qlOx
raegOxqlpQiDu5UNjh0oEfrVq6DpahdIR0OX8fqymWhg7sBk1QARAQABtDVMYXVuY2hwYWQg
UFBBIGZvciBUaW1WaWRlb3MuVXMgLSBMaXZlIGV2ZW50IHN0cmVhbWluZ4kCOAQTAQIAIgUC
VeueNAIbAwYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AACgkQWK3kA6AELoDZHg//ezXZvMpX
tJPk17KahsSAWUVRU1q50LMCbYCzCxSM9nzPTMIBr1JA7ALJkpc02mLontXw7TWKbi9KUWU6
2uQg9AL9xq4qKwjCrqGaGlcz78qta4so5YtGIlpnflzS7Jh3gNpiO/CZSgmfzmROvWnnaQn7
qhXINDCiJLhIJMUwWaFBxEpfzxEjZ3rTWoBQV44ShRk/9k5NdKngbMWY5ZCIOs55Dgd38Iuv
2DkY6fWtcTn+dohsv3QjmeO5NfXf9qTgADnAoNl17/jK6m64zl7pekY49Yb4IK8IPO84tjeq
LbIQD4atNuvijy/tWjgZLuhZ5bzrhYwehGiUv5puGgVAZX2CtzE81J3TH0tOhscrkwn+Ns3T
Kvyyc4zgvtlwfGlql7IG5Je/YXOFHyCCgiA8qfsjQViY6b6JOet+0pX5ngyt79hHlWgyyRFc
U5Ht7SWu93v91bWUD2l61++jjinQJo3YY5uryaYo8uFFoD7TUgmQgmXtxcaXfA3F/sSAE71C
uzoNeJ7ZCLKNAhofSquV/CIS0pWmv0+rR3eMAnzFzsiknWhMl1f27AM3u/zMpfQHAjJ37F+i
zMMxHCS0jTlB09/38Nfww0/6cj3zcj8CgZ8bakR/G/tVtC3AD/8PfqCrawgUgbmdPXkwKapg
Lhp23n50zwhwY7G7sOhTBb2OVV0=
=AhS9
-----END PGP PUBLIC KEY BLOCK-----
EOF
apt update
apt upgrade
apt install flterm fxload hdmi2usb-mode-switch hdmi2usb-udev python python3-pkg-resources usbutils vizzini-dkms voctomix-outcasts

mkdir .ssh
cat >> .ssh/authorized_keys <<EOF
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDIV8pOIHMN/1feXMgnmmHg2cEVLJQ1bu2F8AjpzWdoRJAtS+onMUN2y1jbfT59BSxQ1zStIbRnYyYJy3ylpEbsfTngYU7v9p0VFAcjRGfhjHFr0ImC/rkjlTnkNYnUc3D3hIIXlgk0OxqL/X7eGPruPVpznJivypDr2aI9Qzf6A0CXlXjzflzhSbwa1HkoY+XwPXC0SJogmxfn4e2NuNFRx1mW6xwa7cDibop0eeiql1rasN8f0m4ErJdKxed79Bt7a9+Kz01yDdDjNEbQeSSf0JpUPB4/UeSViWePbS83vYjXLG3EOjAIdHlirN5arhXoO0YcoQHnRyc+gcjSkm5d stefanor cardno:000603018341
EOF
cat > /lib/udev/rules.d/85-local-atlys-fx2-firmware.rules <<EOF
# Load the hdmi2usb firmware onto the Atlys FX2 chip
SUBSYSTEM=="usb", ACTION=="add", ATTRS{idVendor}=="1443", ATTRS{idProduct}=="0007", RUN+="/sbin/fxload -D \$tempnode -t fx2lp -I /lib/firmware/hdmi2usb.hex"
EOF
cat > /lib/udev/rules.d/85-local-atlys-fx2-firmware.rules <<EOF
# Load the hdmi2usb firmware onto the Atlys FX2 chip
SUBSYSTEM=="usb", ACTION=="add", ATTRS{idVendor}=="1443", ATTRS{idProduct}=="0007", RUN+="/sbin/fxload -D \$tempnode -t fx2lp -I /lib/firmware/hdmi2usb.hex"
EOF
touch /forcefsck
reboot

scp ~/git/HDMI2USB-firmware-prebuilt/archive/master/v0.0.2-81-gd0d3aea/opsis/hdmi2usb/hdmi2usb.hex root@odroid:/lib/firmware/hdmi2usb.hex

[edit] Round 2: Things stefanor did

wget -N http://odroid.in/ubuntu_16.04lts/ubuntu64-16.04-minimal-odroid-c2-20160815.img.xz

  • ssh ssh root@odroid64pw odroid
  • apt update && apt upgrade
  • apt install linux-headers-c2
  • Add missing symlink /lib/modules/$VER/build -> /usr/src/linux-$VER
 ln -s /usr/src/linux-headers-3.14.79-93/ /lib/modules/3.14.79-93/build
  • apt-add-repository ppa:timvideos/fpga-support
  • apt install fxload vizzini-dkms python-gi gir1.2-glib-2.0 gir1.2-gstreamer-1.0 gstreamer1.0-plugins-base gstreamer1.0-tools gstreamer1.0-plugins-good gstreamer1.0-libav git
  • git clone https://github.com/CarlFK/voctomix-outcasts
  • Create a /lib/udev/rules.d/85-local-atlys-fx2-firmware.rules:
# Load the hdmi2usb firmware onto the Atlys FX2 chip
SUBSYSTEM=="usb", ACTION=="add", ATTRS{idVendor}=="1443", ATTRS{idProduct}=="0007", RUN+="/sbin/fxload -D $tempnode -t fx2lp -I /lib/firmware/hdmi2usb.hex"
  • Copy the hmdi2usb.hex to /lib/firmware/hdmi2usb.hex
  • Create a /etc/systemd/system/ingest.service:
[Unit]
Description=Ingest video and sling it at voctomix
After=network-online.target
StartLimitInterval=0

[Service]
ExecStart=/home/odroid/voctomix-outcasts/ingest.py --host 10.21.1.151 --video-source hdmi2usb
Restart=always
RestartSec=1

[Install]
WantedBy=multi-user.target
  • Create a /etc/systemd/system/ingest.path:
[Path]
PathExists=/dev/video0
  • Install the systemd job: systemctl enable ingest

[edit] Round 1: Things CarlFK did

Things CarlFK did to setup and odroid C2 to connect hdmi2usb to voctomix over a lan.

This is meant as a checklist of things that need to be done, but not at all how they should be done.

ssh-copy-id odroid@OdroidC2
# sudo fs_resize

cd /media/boot/
wget http://maxsm.net/files/c2/meson64_odroidc2server.dtb

fatload mmc 0:1 ${dtb_loadaddr} meson64_odroidc2server.dtb
# http://processors.wiki.ti.com/index.php/Booting_Linux_kernel_using_U-Boot#USB_Storage

sudo apt update && sudo apt -y upgrade
sudo apt install -y python-gst-1.0 gstreamer1.0-plugins-good gstreamer1.0-plugins-bad minicom htop iftop tmux git build-essential devscripts vim

# sudo apt-get install linux-image-c2 linux-source
# linux-image-4.4.0-27-generic linux-headers-4.4.0-27-generic

sudo apt-add-repository --yes --update --enable-source ppa:timvideos/fpga-support

apt source flterm 
sudo apt-get build-dep flterm 
cd flterm-0+git20160123
debuild
cd ..
sudo dpkg -i flterm_0+git20160123-1_arm64.deb

sudo apt-add-repository  --remove --yes --update --enable-source ppa:timvideos/fpga-support

apt source vizzini
sudo apt-get build-dep vizzini
# sudo dpkg -i vizzini-dkms_1.0.0-5~ppa3~ubuntu14.04_all.deb

--------
 bjonnh: 
sudo vim /usr/src/linux-headers-3.14.65-70/.config
change
CONFIG_LOCALVERSION="" 
to 
CONFIG_LOCALVERSION="-70"

make KERNELDIR=/usr/src/linux-headers-3.14.65-70
sudo make KERNELDIR=/usr/src/linux-headers-3.14.65-70 modules_install
cd /lib/moduls/3.14.65-70
sudo mv ../3.14.65/extra . 

# apt-get source linux-image-$(uname -r)
# /usr/src/linux-headers-3.14.65-70  
--------
clonezilla:
save disk to image:
/usr/sbin/ocs-sr -q2 -c -j2 -z5 -i 2000 -fsck-src-part -sc -p true savedisk ubuntu-server-14.04-v4.4-rc6-mfc sdf

save image to disk
/usr/sbin/ocs-sr -g auto -e1 auto -e2 -c -r -j2 -p true restoredisk ubuntu-server-14.04-v4.4-rc6-mfc sdf

save image to partitions
/usr/sbin/ocs-sr -e1 auto -e2 -c -t -r -j2 -k -p true restoreparts ubuntu-server-14.04-v4.4-rc6-mfc sdd1 sdd2

part to part:
/usr/sbin/ocs-onthefly -e1 auto -e2 -j2 -r -k  -f sdf1 -t sdd1
Personal tools