Skip to content

Ubilinux Post Installation

catmaker edited this page Nov 19, 2015 · 24 revisions
Post Installation of Ubilinux
  • load ubilinux
  • change root password
  • change hostname
  • change locale, timezone, check date/time
# dpkg-reconfigure locales
# dpkg-reconfigure tzdata
  • add connectivity, wifi
Contents of /etc/network/interface for roaming
# interfaces(5) file used by ifup(8) and ifdown(8)

allow-hotplug lo
iface lo inet loopback

auto wlan0
allow-hotplug wlan0
iface wlan0 inet manual
   wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf

iface default inet dhcp
#iface hackerspace inet dhcp
#iface home inet dhcp
#iface xpc-office inet dhcp
#iface cat-mobile inet dhcp

#auto usb0
iface usb0 inet static
   address 192.168.8.15
   netmask 255.255.255.0
Contents of /etc/wpa_supplicant/wpa_supplicant.conf for roaming
# http://www.debuntu.org/how-to-wifi-roaming-with-wpa-supplicant/
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
        id_str="hackerspace"
        ssid="hackerspace.5G"
        psk="0xta1l50up"
}
network={
        id_str="home"
        ssid="LeglessSpider"
        psk=2845f6b6cca7e7051766729a65325a7c609a40659593caa2d147c40c10c4ca38
}
network={
        id_str="xpc-office"
        ssid="hf-work-space"
        psk=68c381112c9ac2a4c38c2546fea556979ca91ef7f54e9aba72213ee9f2f6eae9
}
network={
        id_str="cat-mobile"
        ssid="catdevice"
        psk=32fb2fd0aee3d41097011b0641ea6e5395c7d817e7f0c66b77a190980a253b0e
}
Fix: In /etc/avahi/avahi-daemon.conf, add
allow-interfaces=wlan0,eth0
Fix: In /etc/ssh/ssh_config, /etc/ssh/sshd_config, add
IPQoS 0x00
  • apt-get update, upgrade
  • add "IPQoS 0x00" into /etc/ssh/ssh_config, /etc/ssh/sshd_config
  • install sudo, build-essentials, git, etc
  • add user, me. update .bashrc, .bash_aliases
  • move /usr/share to /home/share, and relink (to free up partition 1).
  # cd /usr  
  # cp -rp share /home  
  # mv share share.orig  
  # ln -sf /home/share  
  [reboot and check]  
  # cd /usr  
  # rm -rf share.orig [Ulp!]  
  • add and mount external SDcard
  # nano add /etc/fstab with
    /dev/mmcblk1p1  /mnt/extp1      auto    defaults                        1  1
    /dev/mmcblk1p2  /mnt/extp2      auto    defaults                        1  1
    /dev/mmcblk1p3  /mnt/extp3      auto    defaults                        1  1
  # mount /mnt/extp2
  # mkdir /mnt/extp2/home/username
  # ln -sf /mnt/extp2/home/username /home/username/sdcard
  • install i2c-tools
  # apt-get install i2c-tools
  # usermod -aG i2c username
Installing mjpg-streamer
apt-get install subversion libv4l-dev libjpeg8-dev imagemagick v4l-utils
make USE_LIBV4L2=true clean all
sudo make install

add to /etc/rc.local

/usr/local/bin/mjpg_streamer -i "/usr/local/lib/input_uvc.so -n -r 320x240 -f 15" -o "/usr/local/lib//output_http.so -n -p 8081 -w /usr/local/www" &

Reference:
https://github.com/meinside/rpi-mjpg-streamer
https://gist.github.com/foosel/8185988

Installing nodejs

Remove old one first

apt-get remove nodejs

Install using debian package manager

curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
sudo apt-get install -y nodejs

Reference:
https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions

Building OpenCV-3.0 with Intel IPP and TBB enabled

https://software.intel.com/en-us/articles/opencv-300-beta-ipp-tbb-enabled-on-yocto-with-intel-edison
https://help.ubuntu.com/community/OpenCV#Installation

Current effort 2015-06-28

time cmake -D WITH_IPP=ON -D WITH_TBB=ON -D WITH_CUDA=OFF -D WITH_OPENCL=OFF -D BUILD_SHARED_LIBS=OFF -D BUILD_PERF_TESTS=OFF -D BUILD_TESTS=OFF .

make -j2