2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2021 The Qt Company Ltd.
|
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
|
2011-07-08 11:32:39 +02:00
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
\page creator-developing-generic-linux.html
|
2022-10-27 16:21:22 +02:00
|
|
|
\previouspage creator-developing-qnx.html
|
|
|
|
|
\nextpage creator-setup-webassembly.html
|
2011-07-08 11:32:39 +02:00
|
|
|
|
2022-10-27 16:21:22 +02:00
|
|
|
\title Connecting Remote Linux Devices
|
2011-07-08 11:32:39 +02:00
|
|
|
|
2020-05-20 13:06:11 +02:00
|
|
|
You can connect generic Linux devices to the development PC to run,
|
2017-02-21 14:47:56 +01:00
|
|
|
debug, and analyze applications built for them from \QC.
|
2011-07-08 11:32:39 +02:00
|
|
|
|
2012-04-12 14:33:49 +02:00
|
|
|
If you have a tool chain for building applications for embedded Linux
|
2013-10-09 12:22:20 +02:00
|
|
|
devices installed on the development PC, you can add
|
2012-09-03 17:50:37 +02:00
|
|
|
it to \QC. You can then select a \l{glossary-buildandrun-kit}{kit}
|
2022-10-27 16:21:22 +02:00
|
|
|
with the device type \uicontrol {Remote Linux Device} to
|
2020-05-20 13:06:11 +02:00
|
|
|
build applications for and run them on the devices.
|
2011-07-08 11:32:39 +02:00
|
|
|
|
2022-10-27 16:21:22 +02:00
|
|
|
To be able to run and debug applications on remote Linux devices,
|
2020-05-20 13:06:11 +02:00
|
|
|
you must add devices and select them in the \QC \l{glossary-buildandrun-kit}
|
|
|
|
|
{kit}.
|
2011-07-08 11:32:39 +02:00
|
|
|
|
|
|
|
|
You use a wizard to create the connections. You can edit the settings later
|
2022-06-27 12:12:54 +02:00
|
|
|
in \uicontrol Edit > \uicontrol Preferences > \uicontrol Devices >
|
2019-01-03 13:09:04 +01:00
|
|
|
\uicontrol Devices.
|
2011-07-08 11:32:39 +02:00
|
|
|
|
2022-10-27 16:21:22 +02:00
|
|
|
\image qtcreator-preferences-devices-remote-linux.webp "Remote Linux Device in the Devices tab"
|
2011-07-08 11:32:39 +02:00
|
|
|
|
2019-01-03 13:09:04 +01:00
|
|
|
You can protect the connections between \QC and a device by using an
|
|
|
|
|
\l{https://www.openssh.com/}{OpenSSH} connection. OpenSSH is a
|
|
|
|
|
connectivity tool for remote login using the SSH protocol. The OpenSSH
|
|
|
|
|
suite is not delivered with \QC, so you must download it and install it
|
|
|
|
|
on the development PC. Then, you must configure the paths to the tools in
|
|
|
|
|
\QC. For more information, see \l {Configuring SSH Connections}.
|
|
|
|
|
|
|
|
|
|
You need either a password or an SSH public and private key pair for
|
|
|
|
|
authentication. If you do not have an SSH key, you can use the ssh-keygen
|
|
|
|
|
tool to create it in \QC. For more information, see \l {Generating SSH Keys}.
|
2011-07-08 11:32:39 +02:00
|
|
|
|
2019-09-23 12:53:02 +02:00
|
|
|
\note \QC does not store passwords, so if you use password authentication,
|
|
|
|
|
you may need to enter the password on every connection to the device,
|
|
|
|
|
or, if caching is enabled, at every \QC restart.
|
|
|
|
|
|
2022-10-27 16:21:22 +02:00
|
|
|
To configure connections between \QC and a remote Linux device and to
|
2012-08-31 11:33:23 +02:00
|
|
|
specify build and run settings for the device:
|
2011-07-08 11:32:39 +02:00
|
|
|
|
|
|
|
|
\list 1
|
|
|
|
|
|
2013-02-06 08:50:23 +01:00
|
|
|
\li Make sure that your device can be reached via an IP address.
|
2011-07-08 11:32:39 +02:00
|
|
|
|
2022-06-27 12:12:54 +02:00
|
|
|
\li Select \uicontrol Edit > \uicontrol Preferences > \uicontrol Kits >
|
2018-04-25 13:00:53 +02:00
|
|
|
\uicontrol {Qt Versions} > \uicontrol Add to add the Qt version
|
|
|
|
|
for embedded Linux.
|
2011-07-08 11:32:39 +02:00
|
|
|
|
2022-06-27 12:12:54 +02:00
|
|
|
\li Select \uicontrol Edit > \uicontrol Preferences > \uicontrol Kits >
|
2018-04-25 13:00:53 +02:00
|
|
|
\uicontrol Compilers > \uicontrol Add to add the compiler for
|
|
|
|
|
building the applications.
|
2011-07-08 11:32:39 +02:00
|
|
|
|
2013-02-06 08:50:23 +01:00
|
|
|
\li To deploy applications and run them remotely on devices, specify
|
2011-07-08 11:32:39 +02:00
|
|
|
parameters for accessing the devices:
|
|
|
|
|
|
2021-11-25 11:25:09 +01:00
|
|
|
\list a
|
2011-07-08 11:32:39 +02:00
|
|
|
|
2022-06-27 12:12:54 +02:00
|
|
|
\li Select \uicontrol Edit > \uicontrol Preferences >
|
2019-01-03 13:09:04 +01:00
|
|
|
\uicontrol Devices > \uicontrol Devices > \uicontrol Add >
|
2022-10-27 16:21:22 +02:00
|
|
|
\uicontrol {Remote Linux Device}
|
2014-12-11 15:43:19 +01:00
|
|
|
> \uicontrol {Start Wizard}.
|
2011-07-08 11:32:39 +02:00
|
|
|
|
2022-10-27 16:21:22 +02:00
|
|
|
\image qtcreator-preferences-devices-remote-linux-connection.webp "Connection Data wizard"
|
2011-07-08 11:32:39 +02:00
|
|
|
|
2022-10-27 16:21:22 +02:00
|
|
|
\li In \uicontrol {The name to identify this configuration},
|
2011-07-08 11:32:39 +02:00
|
|
|
enter a name for the connection.
|
|
|
|
|
|
2022-10-27 16:21:22 +02:00
|
|
|
\li In \uicontrol {The device's host name or IP address},
|
2011-07-08 11:32:39 +02:00
|
|
|
enter the host name or IP address of the device.
|
2015-06-22 13:58:00 +02:00
|
|
|
This value will be available in the variable \c %{Device:HostAddress}.
|
2011-07-08 11:32:39 +02:00
|
|
|
|
2022-10-27 16:21:22 +02:00
|
|
|
\li In \uicontrol {The device's SSH port number}, enter the port
|
|
|
|
|
number to use for SSH connections. This value will be
|
|
|
|
|
available in the variable \c %{Device:SshPort}.
|
|
|
|
|
\li In \uicontrol {The username to log into the device},
|
2014-07-18 12:20:04 +02:00
|
|
|
enter the username to log into the device and run the
|
2011-07-08 11:32:39 +02:00
|
|
|
application as.
|
2015-06-22 13:58:00 +02:00
|
|
|
This value will be available in the variable \c %{Device:UserName}.
|
2011-07-08 11:32:39 +02:00
|
|
|
|
2021-11-25 11:25:09 +01:00
|
|
|
\li Select \uicontrol {Next} to open the
|
|
|
|
|
\uicontrol {Key Deployment} dialog.
|
2011-07-08 11:32:39 +02:00
|
|
|
|
2022-10-27 16:21:22 +02:00
|
|
|
\image qtcreator-preferences-devices-remote-linux-key-deployment.webp "Key Deployment dialog"
|
2021-11-25 11:25:09 +01:00
|
|
|
|
|
|
|
|
\li In \uicontrol {Private key file}, select a private key file
|
|
|
|
|
to use for authentication. This value will be available in
|
|
|
|
|
the variable \c %{Device:PrivateKeyFile}.
|
|
|
|
|
|
|
|
|
|
\li If you do not have a public-private key pair, select
|
|
|
|
|
\uicontrol {Create New Key Pair}. For more information,
|
|
|
|
|
see \l{Generating SSH Keys}.
|
|
|
|
|
|
|
|
|
|
\li Select \uicontrol {Deploy Public Key} to copy the public
|
|
|
|
|
key to the device.
|
|
|
|
|
|
|
|
|
|
\li Select \uicontrol {Next} to create the connection.
|
2011-07-08 11:32:39 +02:00
|
|
|
|
|
|
|
|
\endlist
|
|
|
|
|
|
2014-02-05 14:44:54 +01:00
|
|
|
All of these parameters can be edited later, as well as additional ones that the
|
2022-10-27 16:21:22 +02:00
|
|
|
wizard does not show because there are sensible default values.
|
2014-02-05 14:44:54 +01:00
|
|
|
|
|
|
|
|
|
2022-06-27 12:12:54 +02:00
|
|
|
\li Select \uicontrol Edit > \uicontrol Preferences > \uicontrol Kits >
|
2018-04-25 13:00:53 +02:00
|
|
|
\uicontrol Add to add a kit for building for the device. Select the
|
2022-10-27 16:21:22 +02:00
|
|
|
Qt version, compiler, and device that you added above, and select
|
|
|
|
|
\uicontrol {Remote Linux Device} in \uicontrol {Device type}.
|
|
|
|
|
|
|
|
|
|
To build on the remote device, select \uicontrol {Remote Linux Device}
|
|
|
|
|
also in \uicontrol {Build device}.
|
2012-08-31 11:33:23 +02:00
|
|
|
|
2013-02-06 08:50:23 +01:00
|
|
|
\li To specify build settings:
|
2011-07-08 11:32:39 +02:00
|
|
|
|
|
|
|
|
\list 1
|
|
|
|
|
|
2013-02-06 08:50:23 +01:00
|
|
|
\li Open a project for an application you want to develop for the
|
2011-07-08 11:32:39 +02:00
|
|
|
device.
|
|
|
|
|
|
2016-10-04 16:53:05 +02:00
|
|
|
\li Select \uicontrol Projects > \uicontrol {Build & Run} to enable
|
|
|
|
|
the kit that you specified above.
|
2011-07-08 11:32:39 +02:00
|
|
|
|
|
|
|
|
\endlist
|
|
|
|
|
|
2015-08-06 15:46:22 +02:00
|
|
|
\li Select \uicontrol Run to specify run settings. Usually, you can use
|
|
|
|
|
the default settings.
|
2011-07-08 11:32:39 +02:00
|
|
|
|
2012-04-12 14:33:49 +02:00
|
|
|
When you run the project, \QC deploys the application as specified by the
|
|
|
|
|
deploy steps. By default, \QC copies the application files to the device.
|
2022-10-27 16:21:22 +02:00
|
|
|
For more information, see \l{Deploying to Remote Linux}.
|
2011-07-08 11:32:39 +02:00
|
|
|
|
|
|
|
|
\endlist
|
|
|
|
|
|
2019-01-03 13:09:04 +01:00
|
|
|
\include linux-mobile/linuxdev-keys.qdocinc configuring ssh
|
2017-02-10 15:17:34 +01:00
|
|
|
\include linux-mobile/linuxdev-keys.qdocinc generating ssh keys
|
|
|
|
|
\include linux-mobile/linuxdev-processes.qdocinc managing device processes
|
2011-07-08 11:32:39 +02:00
|
|
|
*/
|