From de347a5239341f5ebbb1b83bd827d6923632bbc5 Mon Sep 17 00:00:00 2001 From: glimsdal Date: Wed, 23 Aug 2023 14:12:13 -0700 Subject: [PATCH 1/2] Create nxp example configuration. --- demos-pipeline/example/bin/poky-pipeline.ts | 14 +++---- .../lib/lib/constructs/source-repo.ts | 2 + .../lib/source-repo/imx6/build.buildspec.yml | 41 +++++++++++++++++++ 3 files changed, 50 insertions(+), 7 deletions(-) create mode 100644 demos-pipeline/lib/source-repo/imx6/build.buildspec.yml diff --git a/demos-pipeline/example/bin/poky-pipeline.ts b/demos-pipeline/example/bin/poky-pipeline.ts index 5eacc44..ff81181 100644 --- a/demos-pipeline/example/bin/poky-pipeline.ts +++ b/demos-pipeline/example/bin/poky-pipeline.ts @@ -79,10 +79,10 @@ new DemoPipelineStack(app, "QemuDemoPipeline", { /** * Create a 3rd Party Distribution Pipeline. */ -// TODO(nateglims): implement -// new DemoPipelineStack(app, "three-p-Pipeline", { -// ...defaultProps, -// imageRepo: buildImageRepo.repository, -// imageTag: ImageKind.Ubuntu22_04, -// vpc: vpc.vpc, -// }); +new DemoPipelineStack(app, "IMX6Pipeline", { + ...defaultProps, + imageRepo: buildImageRepo.repository, + imageTag: ImageKind.Ubuntu22_04, + vpc: vpc.vpc, + distroKind: DistributionKind.imx6, +}); diff --git a/demos-pipeline/lib/lib/constructs/source-repo.ts b/demos-pipeline/lib/lib/constructs/source-repo.ts index b2de7ca..24dd398 100644 --- a/demos-pipeline/lib/lib/constructs/source-repo.ts +++ b/demos-pipeline/lib/lib/constructs/source-repo.ts @@ -12,6 +12,8 @@ export enum DistributionKind { Poky = "poky", /** The meta-aws Demonstration Distribution. */ MetaAwsDemo = "meta-aws-demo", + /** the i.mx6 Distribution from NXP. */ + imx6 = "imx6", } export interface SourceRepoProps extends cdk.StackProps { diff --git a/demos-pipeline/lib/source-repo/imx6/build.buildspec.yml b/demos-pipeline/lib/source-repo/imx6/build.buildspec.yml new file mode 100644 index 0000000..71b411b --- /dev/null +++ b/demos-pipeline/lib/source-repo/imx6/build.buildspec.yml @@ -0,0 +1,41 @@ +version: 0.2 +run-as: yoctouser + +env: + shell: bash + +phases: + pre_build: + run-as: root + commands: + - chown -R yoctouser /sstate-cache + - chown -R yoctouser /downloads + - chown yoctouser /build-output + - chmod 755 /sstate-cache + - chmod 755 /downloads + - chmod 755 /build-output + - apt-get install -yq repo + build: + commands: + - echo Build started on `date` + - repo init -u https://github.com/nxp-imx/imx-manifest -b imx-linux-mickledore -m imx-6.1.22-2.0.0.xml + - repo sync + - MACHINE=imx6ull14x14evk EULA=y source ./imx-setup-release.sh -b bld-fb + - bitbake core-image-minimal + + post_build: + commands: + - echo Build completed on `date` + - bitbake -m + - ps aux | grep bitbake + - find $TMP_DIR -name '*.socket' -delete + - export BUILD_OUTPUT="$(uuidgen -t).tar" + - tar cf $BUILD_OUTPUT -C $TMP_DIR tmp + - cp -r $BUILD_OUTPUT /build-output + - echo $BUILD_OUTPUT > /build-output/tmpfile + +artifacts: + discard-paths: true + files: + - /build-output/tmpfile + - $TMP_DIR/tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64* From 064d68c7e9956aa009100c5b3cc6715b7eb88f66 Mon Sep 17 00:00:00 2001 From: glimsdal Date: Thu, 24 Aug 2023 17:28:55 -0700 Subject: [PATCH 2/2] remove unused CodeCommitTrigger import. --- demos-pipeline/lib/lib/demo-pipeline.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/demos-pipeline/lib/lib/demo-pipeline.ts b/demos-pipeline/lib/lib/demo-pipeline.ts index b7766a4..3d20906 100644 --- a/demos-pipeline/lib/lib/demo-pipeline.ts +++ b/demos-pipeline/lib/lib/demo-pipeline.ts @@ -26,7 +26,6 @@ import { } from "aws-cdk-lib/aws-ec2"; import { Bucket } from "aws-cdk-lib/aws-s3"; import { SourceRepo, DistributionKind } from "./constructs/source-repo"; -import { CodeCommitTrigger } from "aws-cdk-lib/aws-codepipeline-actions"; /** * Properties to allow customizing the build.