diff --git a/assets/build-image/ubuntu_22_04/Dockerfile b/assets/build-image/ubuntu_22_04/Dockerfile index b87d80c..5fdf5f5 100644 --- a/assets/build-image/ubuntu_22_04/Dockerfile +++ b/assets/build-image/ubuntu_22_04/Dockerfile @@ -25,7 +25,7 @@ RUN unzip /tmp/awscliv2.zip -d /tmp RUN /tmp/aws/install # install kas tool -RUN pip3 install PyYAML==5.3.1 && pip3 install kas==3.0.2 +RUN pip3 install PyYAML==5.3.1 && pip3 install kas==4.0.0 RUN locale-gen en_US.UTF-8 diff --git a/lib/constructs/source-repo.ts b/lib/constructs/source-repo.ts index d5acbbf..eea3524 100644 --- a/lib/constructs/source-repo.ts +++ b/lib/constructs/source-repo.ts @@ -14,6 +14,8 @@ export enum ProjectKind { MetaAwsDemo = 'meta-aws-demo', /** Build an EC2 AMI */ PokyAmi = 'poky-ami', + /** Build an kas based poky */ + PokyKas = 'poky-kas', } export interface SourceRepoProps extends cdk.StackProps { diff --git a/source-repo/poky-kas/build.buildspec.yml b/source-repo/poky-kas/build.buildspec.yml new file mode 100644 index 0000000..60a8ef8 --- /dev/null +++ b/source-repo/poky-kas/build.buildspec.yml @@ -0,0 +1,35 @@ +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 + build: + commands: + - echo Build started on `date` + - export KAS_WORK_DIR=$TMP_DIR + - kas build kas.yml + + post_build: + commands: + - echo Build completed on `date` + - export BUILD_OUTPUT="$(uuidgen -t).tar" + - echo $TMP_DIR + - ls -la $TMP_DIR + - echo $KAS_WORK_DIR + - ls -la $KAS_WORK_DIR + +artifacts: + discard-paths: true + files: + - $TMP_DIR/build/tmp/deploy/images/qemux86-64/aws-biga-image-qemux86-64* \ No newline at end of file diff --git a/source-repo/poky-kas/kas.yml b/source-repo/poky-kas/kas.yml new file mode 100644 index 0000000..dbc8a12 --- /dev/null +++ b/source-repo/poky-kas/kas.yml @@ -0,0 +1,34 @@ +header: + version: 14 + +target: aws-biga-image +machine: qemux86-64 + + +local_conf_header: + qemu-config: | + EXTRA_IMAGE_FEATURES ?= "debug-tweaks" + IMAGE_INSTALL:append = " greengrass-bin" + +repos: + poky: + url: https://git.yoctoproject.org/poky.git + commit: c4e08719a782fd4119eaf643907b80cebf57f88f + layers: + meta: + meta-poky: + meta-aws-demos: + url: https://github.com/aws4embeddedlinux/meta-aws-demos + commit: 2f004d5f7ad576ca6eec3cb2bdd710d352b41823 + layers: + meta-aws-demos: + meta-openembedded: + url: https://git.openembedded.org/meta-openembedded + commit: a8055484f2829e8dfd03d5c8520b2c611aa7ebd2 + layers: + meta-oe: + meta-networking: + meta-python: + meta-aws: + url: https://github.com/aws4embeddedlinux/meta-aws + commit: 434e85de57c3be735e63754cf75037c3ac249d2b