Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 18 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# aws4embeddedlinux-ci-examples

## Getting Started
This repository shows ways to use the [aws4embeddedlinux-ci](https://github.com/aws4embeddedlinux/aws4embeddedlinux-ci.git) library.
This repository shows ways to use the [aws4embeddedlinux-ci](https://github.com/aws4embeddedlinux/aws4embeddedlinux-ci.git) library.

In order to use these examples, you must setup [CDK](https://docs.aws.amazon.com/cdk/v2/guide/getting_started.html) including installing the CDK tool and bootstrapping the account you wish to deploy to. Additionally, you must have [Node](https://nodejs.org/en/) installed.

Expand All @@ -20,10 +20,10 @@ Note that while often CDK projects do not require separately invoking the build
To deploy _all_ the pipeline examples, you can use the CDK deploy command:

```bash
cdk deploy --all
cdk deploy --all --require-approval never
```

The pipelines can be found in the `Developer Tools > Code Pipeline > Pipelines` Console page. The newly created pipeline `ubuntu_22_04BuildImagePipeline` should start automatically. If not, it will need to be run before other pipelines will work correctly. Once it is complete, the DemoPipeline in the CodePipeline console page is ready to run.
The pipelines can be found in the `Developer Tools > Code Pipeline > Pipelines` Console page. The newly created pipeline `ubuntu_22_04BuildImagePipeline` should start automatically. If not, it will need to be run before other pipelines will work correctly. Once it is complete, the EmbeddedLinuxPipeline in the CodePipeline console page is ready to run.

### Removing Pipelines
The `cdk destroy` command can be used to remove individual pipelines and their related resources. This can also be done in the CloudFormation Console Page.
Expand All @@ -44,18 +44,29 @@ The recommended place to view this is from the `Developer Tools > Code Pipeline
#### Using Kas
The Kas example shows how to use a [Kas Config](https://github.com/aws4embeddedlinux/aws4embeddedlinux-ci/blob/main/source-repo/kas/kas.yml) to manage layers. This tool can help programatically manage layers and config with tighter Yocto integration than Git Submodules or the Repo tool.

See AWS CodeBuild pipeline: KasPipeline-DemoPipeline*
See AWS CodeBuild pipeline: KasPipeline-EmbeddedLinuxPipeline*

#### A slightly modified version building a qemu pipeline:
This example builds a Qemu based image using [meta-aws-demos](https://github.com/aws4embeddedlinux/meta-aws-demos). The Qemu image can be run in the CodeBuild environment. Using SLIRP networking, [OEQA testing](https://docs.yoctoproject.org/singleindex.html#performing-automated-runtime-testing) such as ptest can be run in the pipeline.
This example builds a Qemu based image using [meta-aws-demos](https://github.com/aws4embeddedlinux/meta-aws-demos). The Qemu image can be run in the CodeBuild environment. Using SLIRP networking, [OEQA testing](https://docs.yoctoproject.org/singleindex.html#performing-automated-runtime-testing) such as ptest can be run in the pipeline.

See AWS CodeBuild pipeline: QemuDemoPipeline-DemoPipeline*
See AWS CodeBuild pipeline: QemuEmbeddedLinuxPipeline-EmbeddedLinuxPipeline*

### A Poky Based EC2 AMI Pipeline
Yocto can be used to create an EC2 AMI. This example builds an AMI based on Poky and meta-aws and exports it to your AMI registry using the [VM Import/Export Service](https://docs.aws.amazon.com/vm-import/latest/userguide/what-is-vmimport.html).

The pipeline name starts with `PokyAmiPipeline-` in the CodePipeline page.

### A NXP / IMX Pipeline
This example will build an image for the [i.MX 6ULL EVK](https://www.nxp.com/design/development-boards/i-mx-evaluation-and-development-boards/evaluation-kit-for-the-i-mx-6ull-and-6ulz-applications-processor:MCIMX6ULL-EVK) board.

Accepting the EULA is required. For this you need to uncomment the
```
# - EULA=y
```
line in the build.buildspec.yml file in the nxp-imx-layer-repo CodeCommit repo.

The pipeline name starts with `NxpImxPipeline-` in the CodePipeline page.

### Using pre-built, proprietary artifacts in a Pipeline

This example is based on this [work](https://elinux.org/R-Car/Boards/Yocto-Gen3/v5.9.0) to build an image for Renesas R-Car-H3 Starter Kit Premier (unofficial name - H3ULCB) board including the proprietary graphics and multimedia drivers from Renesas.
Expand All @@ -76,7 +87,7 @@ Create a folder named `proprietary` in the root of the source repo. Put those tw

Now a build should automatically start, succeed and you will get an image containing the proprietary graphics and multimedia drivers.

See AWS CodeBuild pipeline: RenesasPipeline-DemoPipeline*
See AWS CodeBuild pipeline: RenesasPipeline-EmbeddedLinuxPipeline*

##

Expand Down
26 changes: 19 additions & 7 deletions bin/poky-pipeline.ts → bin/app.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env node
import * as cdk from "aws-cdk-lib";
import {
DemoPipelineStack,
EmbeddedLinuxPipelineStack,
BuildImageDataStack,
BuildImagePipelineStack,
BuildImageRepoStack,
Expand Down Expand Up @@ -57,7 +57,7 @@ const vpc = new PipelineNetworkStack(app, {
/**
* Create a poky distribution pipeline.
*/
new DemoPipelineStack(app, "PokyPipeline", {
new EmbeddedLinuxPipelineStack(app, "PokyPipeline", {
...defaultProps,
imageRepo: buildImageRepo.repository,
imageTag: ImageKind.Ubuntu22_04,
Expand All @@ -67,7 +67,7 @@ new DemoPipelineStack(app, "PokyPipeline", {
/**
* Create a meta-aws-demos pipeline for the Qemu example.
*/
new DemoPipelineStack(app, "QemuDemoPipeline", {
new EmbeddedLinuxPipelineStack(app, "QemuEmbeddedLinuxPipeline", {
...defaultProps,
imageRepo: buildImageRepo.repository,
imageTag: ImageKind.Ubuntu22_04,
Expand All @@ -79,7 +79,7 @@ new DemoPipelineStack(app, "QemuDemoPipeline", {
/**
* Create an AMI based on Poky.
*/
new DemoPipelineStack(app, "PokyAmiPipeline", {
new EmbeddedLinuxPipelineStack(app, "PokyAmiPipeline", {
...defaultProps,
imageRepo: buildImageRepo.repository,
imageTag: ImageKind.Ubuntu22_04,
Expand All @@ -91,7 +91,7 @@ new DemoPipelineStack(app, "PokyAmiPipeline", {
/**
* Create an kas based image.
*/
new DemoPipelineStack(app, "KasPipeline", {
new EmbeddedLinuxPipelineStack(app, "KasPipeline", {
...defaultProps,
imageRepo: buildImageRepo.repository,
imageTag: ImageKind.Ubuntu22_04,
Expand All @@ -101,13 +101,25 @@ new DemoPipelineStack(app, "KasPipeline", {
});

/**
* Create an renesas based image.
* Create an renesas image.
*/
new DemoPipelineStack(app, "RenesasPipeline", {
new EmbeddedLinuxPipelineStack(app, "RenesasPipeline", {
...defaultProps,
imageRepo: buildImageRepo.repository,
imageTag: ImageKind.Ubuntu22_04,
vpc: vpc.vpc,
layerRepoName: "renesas-layer-repo",
projectKind: ProjectKind.Renesas,
});

/**
* Create an nxp image.
*/
new EmbeddedLinuxPipelineStack(app, "NxpImxPipeline", {
...defaultProps,
imageRepo: buildImageRepo.repository,
imageTag: ImageKind.Ubuntu22_04,
vpc: vpc.vpc,
layerRepoName: "nxp-imx-layer-repo",
projectKind: ProjectKind.NxpImx,
});
Loading