Commit 15d2c9b9 authored by David Boddie's avatar David Boddie
Browse files

Link pages together and provide an overview

parent e9f5ab68
Pipeline #50939 passed with stage
in 1 minute and 54 seconds
......@@ -3,23 +3,22 @@
Setting up the Phone
====================
.. note:: This section is subject to updates and revisions.
.. note:: This guide is subject to updates and revisions.
This section describes the steps needed to set up the Librem 5 phone for application development. For troubleshooting advice, see the :ref:`librem_5_troubleshooting` section.
This guide describes the steps needed to set up the Librem 5 phone for application development.
.. toctree::
:maxdepth: 1
:hidden:
Phone/Troubleshooting.rst
Phone/Connecting_via_USB
Phone/Development_Tools
Phone/Troubleshooting
Software
Overview
--------
A package is available that is designed to help set up a development environment on the phone itself. This can be installed from a terminal, either using the built-in **Terminal** application or via an ``ssh`` connection into the phone, with the following command:
We begin by connecting the phone to a workstation and setting up a network connection before installing tools that assist with software development on the phone itself.
.. code:: bash
Once development tools are installed, you can develop software on the phone itself. Alternatively, you can use the network connection to conveniently copy software built on a workstation to the phone for testing and installation.
apt install librem5-dev-tools
Installing this package should cause additional packages to be installed, containing tools and resources for application development.
For troubleshooting advice, see the :ref:`librem_5_troubleshooting` section.
......@@ -48,13 +48,13 @@ Connect the workstation and the phone using the USB cable, then run ``ip link``
The interface on your workstation may be different to this.
Download the ``start-net.sh`` script: :download:`start-net.sh <_files/start-net.sh>`
Obtain the ``librem5-usbnet`` script from the `librem5-devkit-tools`_ repository. It can be found in the ``scripts`` directory.
This script accepts an IPv4 address and the new network interface. Make sure that it is executable and on the run path, then run it in the following way, substituting the new interface on your workstation for the one given:
.. code:: bash
start-net.sh 192.168.42.1 enp0s18f2u1
sudo start-net.sh 192.168.42.1 enp0s18f2u1
You should be able to run ``ip addr`` and ``ip route`` to see that the interface has an address and route associated with it.
......@@ -63,14 +63,13 @@ Phone
Use the USB serial console :ref:`described above <librem_5_usb_serial>` to log in to the phone.
Create a file called ``usbnet.sh`` containing the following text and make it executable:
Obtain the ``usbnet`` script from the `librem5-devkit-tools`_ repository. It can be found in the ``test_scripts`` directory.
.. code:: bash
Running ``sudo usbnet`` should set up an IPv4 address for the phone and a default route for network traffic that goes via the workstation.
#!/bin/bash
sudo ip addr add 192.168.42.2/24 dev usb0
sudo ip route add default via 192.168.42.1 dev usb0
Next Steps
----------
:download:`usbnet.sh <_files/usbnet.sh>`
Once USB networking is enabled, it becomes possible to access the network via the workstation and install development tools. This is also possible via a cellular network or Wi-Fi.
Running ``usbnet.sh`` should set up an IPv4 address for the phone and a default route for network traffic that goes via the workstation.
.. include:: /links.txt
......@@ -3,7 +3,7 @@
Development Tools
=================
A package is available that is designed to help set up a development environment on the phone itself. This can be installed from a terminal, either using the built-in **Terminal** application or via an ``ssh`` connection into the phone, with the following command:
A package is available that is designed to help set up a development environment on the phone itself. This can be installed from a terminal, either using the built-in **Terminal** application or via a serial connection into the phone, with the following command:
.. code:: bash
......@@ -11,3 +11,4 @@ A package is available that is designed to help set up a development environment
Installing this package should cause additional packages to be installed, containing tools and resources for application development.
This should also enable an SSH server, allowing you to log in to the phone and develop software natively using an SSH session. The availability of an SSH server also makes it convenient to copy software built on a workstation to the phone for testing and installation.
......@@ -3,7 +3,7 @@
Troubleshooting
===============
This section provides information for developers who need to investigate a problem with a Librem 5 phone and want to diagnose it. It contains some useful starting points for investigation and instructions for performing tasks that may be needed to help with testing.
The following sections provide information for developers who need to investigate and diagnose problems with their Librem 5 phones. It contains some useful starting points for investigation and instructions for performing tasks that may be needed to help with testing.
.. toctree::
:maxdepth: 1
......
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