Development

Differences between revisions 1 and 9 (spanning 8 versions)
Revision 1 as of 2018-11-02 15:12:03
Size: 2705
Editor: sil2100
Comment:
Revision 9 as of 2018-11-02 17:23:15
Size: 6614
Editor: sil2100
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
||<tablestyle="float:right; font-size: 0.9em; width:40%; background:#F1F1ED; margin: 0 0 1em 1em;" style="padding:0.5em;"><<TableOfContents>>||
Line 5: Line 7:
Every ubuntu-core image is composed of a defined set of snaps. Every ubuntu-core image is composed of a defined set of snaps. The following section gives a quick overview of what each snap is about and includes a handy list of links for the given project.

New images are composed using the ubuntu-image tool and so called model assertions. In our case, model assertions tell ubuntu-image what to compose the created image of. It is the model that defines the base snap to use, the gadget and kernel. There are different model assertions for 16 and 18, for each supported platform.
Line 12: Line 16:
 * ''core18'' for core series 18  * '''core18''' for core series 18
Line 14: Line 18:
    * Code repository: https://github.com/snapcore/core18
Line 15: Line 20:
 * ''core16'' for core series 16  * '''core16''' for core series 16
Line 17: Line 22:
    * Code repository: https://github.com/snapcore/core18
Line 24: Line 30:
 * ''pi'' - universal gadget snap for all supported Raspberry Pi devices (pi2, pi3, cm3)  * '''pi''' - universal gadget snap for all supported Raspberry Pi devices (pi2, pi3, cm3)
Line 27: Line 33:
 * ''dragonboard'' - the Dragonboard device  * '''dragonboard''' - the Dragonboard device
Line 31: Line 37:
 * ''pc'' - gadget snap for amd64 and i386 devices  * '''pc''' - gadget snap for amd64 and i386 devices
Line 38: Line 44:
There following gadget snaps are only used for the 16 series: There following gadget snaps are only used for the 16 series. Even though some of those repositories have 18 branches and/or include some snaps in the 18 track, they do not participate in any of the core18 images and should only be used for core16 (core):
Line 40: Line 46:
 * ''pi2''
 * ''pi3''
 * ''cm3''
 * '''pi2''' - https://code.launchpad.net/snap-pi2
 * '''pi3''' - https://code.launchpad.net/snap-pi3
 * '''cm3''' - https://code.launchpad.net/snap-cm3
Line 54: Line 60:
 * ''pi-kernel''
 * ''dragonboard-kernel''
 * ''pc-kernel''
 * '''pi-kernel''' - the generic Raspberry Pi kernel for all supported Pi devices (pi2, pi3, cm3)
    * https://snapcraft.io/pi-kernel
 * '''dragonboard-kernel'''
    * https://snapcraft.io/dragonboard-kernel
 * '''pc-kernel'''
    * https://snapcraft.io/pc-kernel
Line 58: Line 67:
 * ''pi2-kernel'' For core16 only (not used for core18), legacy snaps:
Line 60: Line 69:
== Documentation ==  * '''pi2-kernel''' - the generic Raspberry Pi kernel, now renamed to pi-kernel.


== Model assertions ==

One can get the model assertions for the selected supported platform by using the following commands:

=== Core 18 ===

 * Raspberry Pi 2: `snap known --remote model series=16 model="ubuntu-core-18-pi2" brand-id=canonical`
 * Raspberry Pi 3: `snap known --remote model series=16 model="ubuntu-core-18-pi3" brand-id=canonical`
 * Raspberry Pi CM3: `snap known --remote model series=16 model="ubuntu-core-18-cm3" brand-id=canonical`
 * Dragonboard: `snap known --remote model series=16 model="ubuntu-core-18-dragonboard" brand-id=canonical`
 * amd64: `snap known --remote model series=16 model="ubuntu-core-18-amd64" brand-id=canonical`
 * i386: `snap known --remote model series=16 model="ubuntu-core-18-i386" brand-id=canonical`


=== Core 16 ===

 * Raspberry Pi 2: `snap known --remote model series=16 model="pi2" brand-id=canonical`
 * Raspberry Pi 3: `snap known --remote model series=16 model="pi3" brand-id=canonical`
 * Raspberry Pi CM3: `snap known --remote model series=16 model="cm3" brand-id=canonical`
 * Dragonboard: `snap known --remote model series=16 model="dragonboard" brand-id=canonical`
 * amd64: `snap known --remote model series=16 model="pc-amd64" brand-id=canonical`
 * i386: `snap known --remote model series=16 model="pc-i386" brand-id=canonical`


== Promoting snaps to stable ==

For some cases, the 18 snaps use a special 18 track instead of the default one. This means that for those snaps, instead of channels like stable, candidate, beta, edge there's 18/stable, 18/candidate, 18/beta, 18/edge - especially for gadget snaps. Before attempting promotion from one channel to another, always make sure that you are specifying the right track and channel. Otherwise one might promote a core18-targeted snap to the stable channel used by core16 devices. Look at the list of revisions and available tracks/channels before promotion.

Releasing a new snap to stable:

 * Get the list of revisions that are supposed to be promoted for this snap (can be through the snapcraft dashboard).
    * Remember that there's a separate revision number for every architecture.
 * Run this command from your terminal: `snapcraft release <snap_name> <revision> <track/>stable`
    * <track/> depends on whether the snap you are promoting has a specific track you want to use, like 18/.
    * Example #1 (core18 snap): `snapcraft release core18 1234 18/stable,18/candidate`


== Releasing a new ubuntu-core image ==

See UbuntuCore/ReleaseProcess .


== Useful Documentation ==

This document serves the purpose of gathering all the useful information regarding the construction of and development of the ubuntu-core flavor.

Overview

Every ubuntu-core image is composed of a defined set of snaps. The following section gives a quick overview of what each snap is about and includes a handy list of links for the given project.

New images are composed using the ubuntu-image tool and so called model assertions. In our case, model assertions tell ubuntu-image what to compose the created image of. It is the model that defines the base snap to use, the gadget and kernel. There are different model assertions for 16 and 18, for each supported platform.

The base (core) snap

This is the base filesystem with all the bare-essential libraries and tools for any system to work. Like the core snap, this is required to be present on any 18 core-enabled system. Basically it has to offer any crucial functionality that is needed for a minimal system to function and cannot be easily installed through separate snaps.

The gadget snap

Each supported device has its own gadget snap. Gadget snaps are what defines the device, carrying binaries for the bootloader, declaring the partition layout etc.

There following gadget snaps are only used for the 16 series. Even though some of those repositories have 18 branches and/or include some snaps in the 18 track, they do not participate in any of the core18 images and should only be used for core16 (core):

The snapd snap

The snap offering snapd itself. This was once part of the core snap but it has been ripped out as a separate snap since recently.

The kernel snap

For core16 only (not used for core18), legacy snaps:

  • pi2-kernel - the generic Raspberry Pi kernel, now renamed to pi-kernel.

Model assertions

One can get the model assertions for the selected supported platform by using the following commands:

Core 18

  • Raspberry Pi 2: snap known --remote model series=16 model="ubuntu-core-18-pi2" brand-id=canonical

  • Raspberry Pi 3: snap known --remote model series=16 model="ubuntu-core-18-pi3" brand-id=canonical

  • Raspberry Pi CM3: snap known --remote model series=16 model="ubuntu-core-18-cm3" brand-id=canonical

  • Dragonboard: snap known --remote model series=16 model="ubuntu-core-18-dragonboard" brand-id=canonical

  • amd64: snap known --remote model series=16 model="ubuntu-core-18-amd64" brand-id=canonical

  • i386: snap known --remote model series=16 model="ubuntu-core-18-i386" brand-id=canonical

Core 16

  • Raspberry Pi 2: snap known --remote model series=16 model="pi2" brand-id=canonical

  • Raspberry Pi 3: snap known --remote model series=16 model="pi3" brand-id=canonical

  • Raspberry Pi CM3: snap known --remote model series=16 model="cm3" brand-id=canonical

  • Dragonboard: snap known --remote model series=16 model="dragonboard" brand-id=canonical

  • amd64: snap known --remote model series=16 model="pc-amd64" brand-id=canonical

  • i386: snap known --remote model series=16 model="pc-i386" brand-id=canonical

Promoting snaps to stable

For some cases, the 18 snaps use a special 18 track instead of the default one. This means that for those snaps, instead of channels like stable, candidate, beta, edge there's 18/stable, 18/candidate, 18/beta, 18/edge - especially for gadget snaps. Before attempting promotion from one channel to another, always make sure that you are specifying the right track and channel. Otherwise one might promote a core18-targeted snap to the stable channel used by core16 devices. Look at the list of revisions and available tracks/channels before promotion.

Releasing a new snap to stable:

  • Get the list of revisions that are supposed to be promoted for this snap (can be through the snapcraft dashboard).
    • Remember that there's a separate revision number for every architecture.
  • Run this command from your terminal: snapcraft release <snap_name> <revision> <track/>stable

    • <track/> depends on whether the snap you are promoting has a specific track you want to use, like 18/.

    • Example #1 (core18 snap): snapcraft release core18 1234 18/stable,18/candidate

Releasing a new ubuntu-core image

See UbuntuCore/ReleaseProcess .

Useful Documentation

UbuntuCore/Development (last edited 2024-03-18 13:14:35 by alfonsosanchezbeato)