Commit 780fd507 by RBO lab

forward latest updates

parents 37788480 26651464
......@@ -5,17 +5,34 @@ For compiling, simply use:
make
== Installation
For installing, use:
make install
== Airserver Installation
For installing on a systemd based system, use:
make install_systemd
For older upstart-based Ubuntu's use:
make install_upstart
It will ask you for sudo as the executable needs to be made SUID root.
Also, you need to change the Devicetree overlays of BBB. In /boot/uEnv.txt, disable loading the HDMI overlays:
== Installing from scratch
Please read the file files/startup.sh
=== Automatic Startup
The folder files/etc contains boot scripts for both systemd and upstart, copy them into /etc accordingly.
== Necessary Hardware reconfigurations
You need to change the Devicetree overlays of the BBB. In /boot/uEnv.txt, disable loading the HDMI overlays:
##Disable HDMI
optargs=capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN
==
......
......@@ -17,7 +17,7 @@
# otherwise the system hangs for tens of milliseconds
#
# kernel 4.1 works with 9MBit, 3.14 is slower.
cho "179:0 5000000" > /sys/fs/cgroup/blkio/blkio.throttle.write_bps_device
echo "179:0 5000000" > /sys/fs/cgroup/blkio/blkio.throttle.write_bps_device
exit 0
[Unit]
Description=RBOLab's Airserver for Pneumaticbox hardware
#After=syslog.target
[Service]
Type=simple
ExecStart=/usr/local/bin/airserver
[Install]
WantedBy=multi-user.target
#!/bin/bash
exit 0 #to catch stupid people
##in case dns server is not set by resolvconf:
#rm /run/resolvconf/interface/*
#the beaglebone ubuntu 14.04 image has a package that conflicts with resolvconf, leading to dns not resolving.
#simply remove the packagem, and dns works:
sudo apt-get purge dnsmasq
echo "beagle123" > /etc/hostname
echo "127.0.0.1 beagle123" >> /etc/hosts
sudo useradd rbolab -m --password 'robo0909*'
sudo adduser rbolab adm
sudo adduser rbolab sudo
sudo adduser rbolab kmem
sudo adduser rbolab dialout
sudo adduser rbolab video
sudo adduser rbolab plugdev
sudo adduser rbolab users
sudo adduser rbolab netdev
sudo adduser rbolab i2c
sudo adduser rbolab spi
sudo adduser rbolab systemd-journal
sudo adduser rbolab weston-launch
sudo adduser rbolab xenomai
#set hostname
#create local ssh keys for git
ssh-keygen
#packages to install:
sudo apt-get update
#essentials:
sudo apt-get install build-essential libboost-all-dev device-tree-compiler schedtool screen chrony cgroup-lite
#nice to haves:
sudo apt-get install python-scipy ipython python-qt4
#configure the time server
echo "server 192.168.0.1" >> /etc/chrony/chrony.conf
#
#
# first check which kernel is installed with
uname -a
#and add the -rt- infix. example:
sudo apt-get install linux-image-4.1.1-bone10
#now reboot. It is needed for the next step!
mkdir git; cd git
#install ROS indigo:
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu trusty main" > /etc/apt/sources.list.d/ros-latest.list'
wget https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -O - | sudo apt-key add -
sudo apt-get update
sudo apt-get install ros-indigo-ros-base
#setup the account for ROS:
echo "source /opt/ros/indigo/setup.sh" >> ~/.bashrc
#
# Install the airserver
#clone git repositories:
git clone https://gitlab.tubit.tu-berlin.de/rbo-lab/pneumaticbox-airserver.git
#configure the push to go via ssh authentication:
#git remote set-url --push origin git@gitlab.tubit.tu-berlin.de:rbo-lab/pneumaticbox-airserver.git
#
# clone Robert Nelsons devicetree rebuilder repository
#
# we want the am335x-boneblack-emmc-overlay.dtb devicetree file which includes emmc but no hdmi configuration, leaving those pins in default gpio mode
#
# make sure you select the correct branch according to the kernel running:
git clone -b 4.1.x https://github.com/RobertCNelson/dtb-rebuilder.git
cd dtb-rebuilder
#
# compile devicetree blobs and install them into /boot/dtbs:
make && sudo make install
cd ..
#
# set the devicetree blob to use when booting. Make sure that is correct or you have to reflash
#
#for simplicity: copy the whole boot settings:
sudo cp /boot/uEnv.txt /boot/uEnv.txt.dist
sudo cp pneumaticbox-airserver/files/boot/uEnv.txt /boot/uEnv.txt
# Install config-pin utility, which helps to reconfigure/test gpio config
#
git clone https://github.com/cdsteinkuehler/beaglebone-universal-io.git
#install the python client library:
git clone https://gitlab.tubit.tu-berlin.de/rbo-lab/python-pneumaticbox.git
cd python-pneumaticbox
sudo python setup.py install
cd git/airserver
make && sudo make install
#install upstart scripts to start the airserver automatically (for ubuntu < 15.04)
cp files/etc/init/* /etc/init
#TODO: configure sudoers to allow boot/halt/reboot and starting/stoping airserver
sudo reboot
# How to avoid setting up from scratch:
# Insert a Micro-SD (>=4GB) and call this script:
# (only on Robert C.Nelsons distribution image)
sudo /opt/scripts/tools/eMMC/beaglebone-black-make-microSD-flasher-from-eMMC.sh
#!/bin/bash
# This file contains the commands required to setup airserver on an unmodified official Beaglebone Debain 8.2 image
#
#
exit 0 #to catch stupid people
##in case dns server is not set by resolvconf:
#rm /run/resolvconf/interface/*
#the beaglebone ubuntu 14.04 image has a package that conflicts with resolvconf, leading to dns not resolving.
#simply remove the packagem, and dns works:
sudo apt-get purge dnsmasq
#this can also be done with the rename.sh script:
echo "beagle123" > /etc/hostname
echo "127.0.0.1 beagle123" >> /etc/hosts
......@@ -26,7 +23,7 @@ sudo adduser rbolab systemd-journal
sudo adduser rbolab weston-launch
sudo adduser rbolab xenomai
#set hostname
#NOW reboot and reconnect as rbolab user
#create local ssh keys for git
ssh-keygen
......@@ -35,7 +32,10 @@ ssh-keygen
sudo apt-get update
#essentials:
sudo apt-get install build-essential libboost-all-dev device-tree-compiler schedtool screen chrony cgroup-lite
sudo apt-get install build-essential libboost-all-dev device-tree-compiler schedtool screen chrony cgroup-tools
#PRU tools: library to load PRU code and cross-compiler
sudo apt-get install am335x-pru-package ti-pru-cgt-installer
#nice to haves:
sudo apt-get install python-scipy ipython python-qt4
......@@ -50,7 +50,7 @@ echo "server 192.168.0.1" >> /etc/chrony/chrony.conf
# first check which kernel is installed with
uname -a
#and add the -rt- infix. example:
sudo apt-get install linux-image-4.1.1-bone10
sudo apt-get install linux-image-4.3.3-bone16
#now reboot. It is needed for the next step!
mkdir git; cd git
......
......@@ -50,10 +50,24 @@ $(EXEC): $(OBJECTS) $(BBBIO_LIB)/libBBBio.a $(GLOBALDEPS)
clean:
rm -r ./$(BUILDDIR)/*
install: all
install: all install_upstart
install_systemconfigurationfiles:
sudo cp -r files/etc/ /etc/
install_upstart:
sudo stop airserver 2>/dev/null; true
sudo chown root:root $(BUILDDIR)/$(EXEC)
sudo chmod u+s $(BUILDDIR)/$(EXEC)
sudo cp $(BUILDDIR)/$(EXEC) /usr/local/bin
sudo start airserver ; true
install_systemd:
sudo systemctl stop airserver.service
sudo chown root:root $(BUILDDIR)/$(EXEC)
sudo chmod u+s $(BUILDDIR)/$(EXEC)
sudo cp $(BUILDDIR)/$(EXEC) /usr/local/bin
sudo systemctl start airserver.service
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment