TS-4900 Ubuntu Core Sections: Difference between revisions

From embeddedTS Manuals
No edit summary
m (Non-link text auto-updated for 2022 re-branding ( ftp://ftp.embeddedarm.com/ts-socket-macrocontrollers/ts-4900-linux/distributions\ →‎ ftp://ftp.embeddedTS.com/ts-socket-macrocontrollers/ts-4900-linux/distributions\))
(6 intermediate revisions by 3 users not shown)
Line 4: Line 4:


== Getting Started with Ubuntu Core ==
== Getting Started with Ubuntu Core ==
Download our latest image [ftp://ftp.embeddedarm.com/ts-socket-macrocontrollers/ts-4900-linux/distributions/ubuntu-core/ubuntu-core-16-latest.img.bz2 here].
Download our latest image [https://files.embeddedTS.com/ts-socket-macrocontrollers/ts-4900-linux/distributions/ubuntu-core/ubuntu-core-16-latest.img.bz2 here].  The image unpacks to 1 GB, an SD card of equal or larger size must be used.


Write this to an SD card with:
Write this to an SD card with:
<source lang=bash>
<source lang=bash>
wget ftp://ftp.embeddedarm.com/ts-socket-macrocontrollers/ts-4900-linux/distributions\
wget ftp://ftp.embeddedTS.com/ts-socket-macrocontrollers/ts-4900-linux/distributions\
/ubuntu-core/ubuntu-core-16-latest.img.bz2
/ubuntu-core/ubuntu-core-16-latest.img.bz2
bzip2 -d ubuntu-core-16-latest.img.bz2
bzip2 -d ubuntu-core-16-latest.img.bz2
# Assuming /dev/sdd is your SD card.  Check dmesg after inserting for yoru device.
# Assuming /dev/sdd is your SD card.  Check dmesg after inserting for your device.
# Make sure this is the block device (/dev/sdd) and not a partition (/dev/sdd1).
# Make sure this is the block device (/dev/sdd) and not a partition (/dev/sdd1).
dd if=/path/to/ubuntu-core-16-latest.img bs=4M of=/dev/sdd conv=fsync && sync
dd if=/path/to/ubuntu-core-16-latest.img bs=4M of=/dev/sdd conv=fsync && sync
</source>
</source>


This can be written to emmc using the [[#TS-4900_Production USB production mechanism]].
This can be written to emmc using the [[#Production Mechanism|USB production mechanism]].


Next make an [https://login.ubuntu.com/ Ubuntu SSO account].  [https://help.ubuntu.com/community/SSH/OpenSSH/Keys Generate SSH keys] and [https://login.ubuntu.com/ssh-keys upload your SSH keys] to your account.
Next make an [https://login.ubuntu.com/ Ubuntu SSO account].  [https://help.ubuntu.com/community/SSH/OpenSSH/Keys Generate SSH keys] and [https://login.ubuntu.com/ssh-keys upload your SSH keys] to your account.


Once written to either boot media start up the boardAfter boot has completed it will leave you at a screen:
Once written to either boot media start up the TS-4900Upon first boot there is a configuration tool that must be run to link up with the Ubuntu SSO system.  The first boot requires a connection to the serial console in order to work through the configuration steps.  It is highly recommended to make an account and upload SSH keys as outlined above before booting up the system the first time.  Additionally, we recommend you connect the TS-4900 to a local wired network before running the configuration utility.  It is possible to set up a WiFi connection during the configuration stage if desired rather than a wired connection.
 
When Ubuntu Core is booted on the TS-4900 for the first time, the following prompt will be given on the serial console:
 
<pre>Press Enter to Configure</pre>
<pre>Press Enter to Configure</pre>
Press enter and it will have you confirm DHCP, or use a static network configuration.  Once configured it will ask for your Ubuntu SSO username.  This will create an account on the Ubuntu Core image and allow access only with your SSH keys present on the store.  After it has fetched your keys it will print out the ssh commands to connect to your unit which will now allow access just with your SSH keys.
Ubuntu core has no default username/password, the configuration tool will import the SSH keys to allow login.
 
Press enter and it will have you confirm DHCP, or use a static network configuration.  Once configured it will ask for your Ubuntu SSO username.  This will create an account on the Ubuntu Core image and allow access only with your SSH keys present on the store.  After it has fetched the keys it will print out the command to connect to your unit which will allow password-less access only from the approved hosts.


Connect to the board with:
Connect to the board with:
Line 28: Line 33:
ssh <ubuntu SSO username>@<IP of board>
ssh <ubuntu SSO username>@<IP of board>
</source>
</source>
{{Note|This must be run on a system that has your SSH keys installed.}}
{{Note|This must be run a host that has been approved through the Ubuntu SSO system.  That is, SSH keys created on it and uploaded through the Ubuntu SSO system.}}
 
Once connected, a normal linux shell prompt is given.  From here, the system can be interacted with.  See http://snapcraft.io/ for more information on developing and installing snaps for your application.  Custom snaps can be created and uploaded through the Ubuntu snap store.  Custom snaps can be made private or public.  The Ubuntu SSO system links the previously created account to the http://snapcraft.io/ website, linking everything together.
 
 
{{Note|The first boot of the Ubuntu Core image will modify U-Boot environment.  Reverting back to an image that has never been booted will cause U-Boot to error.  This can be fixed in U-Boot by running the command "run clearenv" and then rebooting the unit.}}


Once connected you have access to a shell prompt and can install any needed snaps. See http://snapcraft.io/ for more information on developing your own snaps for your application which can be uploaded to the store.
== Ubuntu Core Reference Links ==
* https://myapps.developer.ubuntu.com/dev/click-apps/
* https://github.com/embeddedTS/ubuntu-core
* https://github.com/embeddedTS/ubuntu-kernel
* http://snapcraft.io/
* http://snapcraft.io/docs/
* https://www.ubuntu.com/core

Revision as of 14:23, 18 January 2022

Ubuntu Core is a new distribution provided by Canonical targetted towards embedded/IoT projects. This requires users to generate "snap" packages for their application, but provides a mechanism for save remote updates to the OS and packages. Our kernel is based on Ubuntu 16's 4.4 based kernel to provide the best compatibility and support. Bug fixes to units using our kernel snap are provided through the ubuntu core app store.

Read more about Ubuntu Core here.

Getting Started with Ubuntu Core

Download our latest image here. The image unpacks to 1 GB, an SD card of equal or larger size must be used.

Write this to an SD card with:

wget ftp://ftp.embeddedTS.com/ts-socket-macrocontrollers/ts-4900-linux/distributions\
/ubuntu-core/ubuntu-core-16-latest.img.bz2
bzip2 -d ubuntu-core-16-latest.img.bz2
# Assuming /dev/sdd is your SD card.  Check dmesg after inserting for your device.
# Make sure this is the block device (/dev/sdd) and not a partition (/dev/sdd1).
dd if=/path/to/ubuntu-core-16-latest.img bs=4M of=/dev/sdd conv=fsync && sync

This can be written to emmc using the USB production mechanism.

Next make an Ubuntu SSO account. Generate SSH keys and upload your SSH keys to your account.

Once written to either boot media start up the TS-4900. Upon first boot there is a configuration tool that must be run to link up with the Ubuntu SSO system. The first boot requires a connection to the serial console in order to work through the configuration steps. It is highly recommended to make an account and upload SSH keys as outlined above before booting up the system the first time. Additionally, we recommend you connect the TS-4900 to a local wired network before running the configuration utility. It is possible to set up a WiFi connection during the configuration stage if desired rather than a wired connection.

When Ubuntu Core is booted on the TS-4900 for the first time, the following prompt will be given on the serial console:

Press Enter to Configure

Ubuntu core has no default username/password, the configuration tool will import the SSH keys to allow login.

Press enter and it will have you confirm DHCP, or use a static network configuration. Once configured it will ask for your Ubuntu SSO username. This will create an account on the Ubuntu Core image and allow access only with your SSH keys present on the store. After it has fetched the keys it will print out the command to connect to your unit which will allow password-less access only from the approved hosts.

Connect to the board with:

ssh <ubuntu SSO username>@<IP of board>
Note: This must be run a host that has been approved through the Ubuntu SSO system. That is, SSH keys created on it and uploaded through the Ubuntu SSO system.

Once connected, a normal linux shell prompt is given. From here, the system can be interacted with. See http://snapcraft.io/ for more information on developing and installing snaps for your application. Custom snaps can be created and uploaded through the Ubuntu snap store. Custom snaps can be made private or public. The Ubuntu SSO system links the previously created account to the http://snapcraft.io/ website, linking everything together.


Note: The first boot of the Ubuntu Core image will modify U-Boot environment. Reverting back to an image that has never been booted will cause U-Boot to error. This can be fixed in U-Boot by running the command "run clearenv" and then rebooting the unit.

Ubuntu Core Reference Links