| 1 | [[PageOutline]] |
| 2 | |
| 3 | |
| 4 | = Ubuntu = |
| 5 | Gateworks supports the popular Ubuntu OS on Newport and Ventana products using an Ubuntu built root filesystem with a Gateworks kernel. In some cases you may be able to use an Ubuntu built kernel. |
| 6 | |
| 7 | See also: |
| 8 | * [wiki:newport/ubuntu Newport Ubuntu Page] |
| 9 | * [wiki:ventana/ubuntu Ventana Ubuntu Page] |
| 10 | * [wiki:ventana#third_party_linux Ventana third party linux] |
| 11 | |
| 12 | [=#packages] |
| 13 | == Ubuntu Packages == |
| 14 | Ubuntu inherits its package management from Debian Linux using the 'apt' packaging system and 'deb' packages. The list of package feeds is in /etc/apt/sources.list: |
| 15 | {{{ |
| 16 | #!bash |
| 17 | # cat rootfs/etc/apt/sources.list |
| 18 | deb http://ports.ubuntu.com/ubuntu-ports vivid main |
| 19 | deb http://ports.ubuntu.com/ubuntu-ports vivid universe |
| 20 | }}} |
| 21 | |
| 22 | You can search for Ubuntu packages at https://launchpad.net/ubuntu. The search results will show what Ubuntu versions (by name) the package is available in and clicking on the resulting package will show information as to the package feed its contained in. |
| 23 | |
| 24 | The standard Ubuntu package feeds are located at http://ports.ubuntu.com/ubuntu-ports/ and you will find packages in the dist/<ubuntu-version>/<feed> directories. Ubuntu breaks up feeds into the following: |
| 25 | * Main - Officially supported software. |
| 26 | * Restricted - Supported software that is not available under a completely free license. |
| 27 | * Universe - Community maintained software, i.e. not officially supported software. |
| 28 | * Multiverse - Software that is not free. (meaning licensing) |
| 29 | |
| 30 | If you are trying to find out what package an application belongs to you have a few choices: |
| 31 | 1. Use {{{dpkg -S}}} on your Ubuntu development host. For example to find the package that contains ifconfig: |
| 32 | {{{ |
| 33 | #!bash |
| 34 | $ dpkg -S $(which ifconfig) |
| 35 | net-tools: /sbin/ifconfig |
| 36 | }}} |
| 37 | * ifconfig is in /sbin/ifconfig and is part of the net-tools package |
| 38 | * {{{dpkg -L net-tools}}} will show you everything else contained in that package |
| 39 | 2. Use {{{apt-cache search}}}: |
| 40 | {{{ |
| 41 | #!bash |
| 42 | $ apt-cache search ifconfig |
| 43 | iproute2 - networking and traffic control tools |
| 44 | net-tools - The NET-3 networking toolkit |
| 45 | gnome-nettool - network information tool for GNOME |
| 46 | inetutils-tools - base networking utilities (experimental package) |
| 47 | libnet-ifconfig-wrapper-perl - multiplatform Perl wrapper for ifconfig |
| 48 | moreutils - additional Unix utilities |
| 49 | wmifinfo - Dockapp that shows information for all interfaces |
| 50 | }}} |
| 51 | 3. Googling the question 'what package contains <xyz>' |
| 52 | |
| 53 | Personal Package Archives (PPAs) are package feeds that are not part of Ubuntu and can be used by people to distribute their own personally built packages. To use a PPA you need to first add it to your repository list and update your package sources. |
| 54 | |
| 55 | References: |
| 56 | * [https://help.ubuntu.com/community/Repositories/Ubuntu Ubuntu Software Repositories] |
| 57 | * [http://askubuntu.com/questions/4983/what-are-ppas-and-how-do-i-use-them What are PPAs and how do I use them] |
| 58 | |
| 59 | |
| 60 | [=#modem] |
| 61 | == Modem Support == |
| 62 | Aleksander Morgado (https://aleksander.es), a key developer behind the !ModemManager, libqmi, and libmbim projects that provide modem support on Ubuntu provides up-to-date Ubuntu PPA's for 14.04 trusty and 16.04 xenial. Instructions on how to add the PPA feeds and update the packages exist there: |
| 63 | * [https://launchpad.net/~aleksander-m/+archive/ubuntu/modemmanager-xenial modemmanager/libqmi/libmbim PPA xenial] |
| 64 | * [https://launchpad.net/~aleksander-m/+archive/ubuntu/modemmanager-trusty modemmanager/libqmi/libmbim PPA trusty] |
| 65 | |
| 66 | Xenial: |
| 67 | {{{#!bash |
| 68 | apt-get install software-properties-common # contains add-apt-repository |
| 69 | add-apt-repository ppa:aleksander-m/modemmanager-xenial |
| 70 | apt-get update |
| 71 | apt-get install modemmanager libqmi-utils libmbim-utils |
| 72 | }}} |
| 73 | |
| 74 | Trusty: |
| 75 | {{{#!bash |
| 76 | add-apt-repository ppa:aleksander-m/modemmanager-trusty |
| 77 | apt-get update |
| 78 | apt-get install modemmanager libqmi-utils libmbim-utils |
| 79 | }}} |
| 80 | |
| 81 | See [wiki:wireless/modem modem] for more info on how to use these packages |
| 82 | |
| 83 | |
| 84 | [=#ssh] |
| 85 | == SSH Server == |
| 86 | The {{{openssh-server}}} package provides an ssh daemon suitable for secure shell (ssh) and secure copy (scp): |
| 87 | {{{ |
| 88 | #!bash |
| 89 | apt-get install openssh-server |
| 90 | }}} |
| 91 | |
| 92 | During development it may be useful to enable root ssh capability, which is disabled by default. To do this edit /etc/ssh/sshd_config, and: |
| 93 | 1. comment out the following line: |
| 94 | {{{ |
| 95 | #!bash |
| 96 | PermitRootLogin without-password |
| 97 | }}} |
| 98 | 2. Just below it, add the following line: |
| 99 | {{{ |
| 100 | #!bash |
| 101 | PermitRootLogin yes |
| 102 | }}} |
| 103 | 3. Then reload SSH config: |
| 104 | {{{ |
| 105 | #!bash |
| 106 | service ssh reload |
| 107 | }}} |
| 108 | |
| 109 | |
| 110 | |
| 111 | [=#wireless] |
| 112 | == Wireless == |
| 113 | |
| 114 | |
| 115 | [=#wireless-client] |
| 116 | === Client using wpa_supplicant === |
| 117 | These instructions below are for creating a wireless client that will connect to a nearby access point. |
| 118 | |
| 119 | 1. Install required packages: |
| 120 | {{{#!bash |
| 121 | apt-get update |
| 122 | apt-get install iw |
| 123 | apt-get install wpasupplicant |
| 124 | apt-get install udhcpc |
| 125 | }}} |
| 126 | 1. Edit {{{/etc/network/interfaces}}} and edit/add the following to configure wlan0 on boot wpa_supplicant: |
| 127 | {{{#!bash |
| 128 | auto wlan0 |
| 129 | iface wlan0 inet dhcp |
| 130 | wireless_mode managed |
| 131 | wireless_essid any |
| 132 | wpa-driver nl80211 |
| 133 | wpa-conf /etc/wpa_supplicant.conf |
| 134 | }}} |
| 135 | 1. Create WPA Supplicant Configuration File at {{{/etc/wpa_supplicant.conf}}}, replacing ssid and psk with correct information |
| 136 | {{{#!bash |
| 137 | network={ |
| 138 | scan_ssid=1 |
| 139 | ssid="testssid" |
| 140 | proto=WPA |
| 141 | key_mgmt=WPA-PSK |
| 142 | psk="testpass" |
| 143 | } |
| 144 | }}} |
| 145 | 1. Sync and power cycle the board |
| 146 | {{{#!bash |
| 147 | sync |
| 148 | }}} |
| 149 | |
| 150 | Troubleshooting: |
| 151 | * To scan for available access points in range you can use the iw tool: |
| 152 | {{{#!bash |
| 153 | iw dev wlan0 scan # scan for AP's |
| 154 | }}} |
| 155 | * To manually connect to wireless if auto connection is not working: While the above will configure wireless Client mode on bootup, if you want to start it manually you can do so by manually starting/re-starting wpa_supplicant (ifup will do this for you on bootup if configured in /etc/network/interfaces): |
| 156 | {{{#!bash |
| 157 | ifconfig wlan0 up |
| 158 | killall wpa_supplicant |
| 159 | wpa_supplicant -i wlan0 -D nl80211 -c /etc/wpa_supplicant.conf -B # manage wireless client |
| 160 | udhcpc -i wlan0 # obtain dhcp lease |
| 161 | }}} |