Merge ~sylvain-pineau/checkbox-core-snap:lk-boot-env into checkbox-core-snap:master

Proposed by Sylvain Pineau
Status: Merged
Approved by: Sylvain Pineau
Approved revision: 72c211b006f03e4e6ada05808bce7b6cc1addc83
Merged at revision: 80dc50c5f46796f235c5f21fef0758b8e1291b78
Proposed branch: ~sylvain-pineau/checkbox-core-snap:lk-boot-env
Merge into: checkbox-core-snap:master
Diff against target: 35 lines (+24/-0)
1 file modified
snap/snapcraft.yaml (+24/-0)
Reviewer Review Type Date Requested Status
Sylvain Pineau (community) Approve
Review via email: mp+373938@code.launchpad.net

Description of the change

A new part to provide a the lk-boot-env command an get access to bootloader properties such as the boot partition names.

To post a comment you must log in.
Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

(12:19:06 PM) joc: ok, could we define our own part in our checkbox snapcraft.yaml so we can use lk-boot-env ?
(12:20:21 PM) spineau: with all files in snapd 2.42+ we could/should
(12:20:21 PM) joc: spineau: sound reasonable? basically this part https://git.launchpad.net/~ondrak/+git/snap-bootsel-env/tree/snap/snapcraft.yaml#n62
(12:21:15 PM) joc: i still wonder if a bootloader resource job that does all this stuff in one place is a good idea
(12:21:59 PM) spineau: joc: I did consider it as a part for munich but now that all files are coming from snapd, checkbox core snap can bundle it
(12:22:30 PM) joc: +1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml
2index 783dc39..a018eda 100644
3--- a/snap/snapcraft.yaml
4+++ b/snap/snapcraft.yaml
5@@ -291,6 +291,30 @@ parts:
6 python-packages:
7 - RPi.GPIO
8 ################################################################################
9+ lk-boot-env:
10+ plugin: nil
11+ source: .
12+ override-pull: |
13+ snapcraftctl pull
14+ wget https://github.com/snapcore/snapd/raw/master/include/lk/snappy_boot_v1.h
15+ wget https://raw.githubusercontent.com/kubiko/if6640-gadget/18/snap-boot-sel/lk-boot-env.c
16+ build-packages:
17+ - wget
18+ - on amd64 to armhf:
19+ - gcc-arm-linux-gnueabihf:amd64
20+ - on amd64 to arm64:
21+ - gcc-aarch64-linux-gnu:amd64
22+ override-build: |
23+ mkdir -p ${SNAPCRAFT_PART_INSTALL}/bin
24+ if [ "${SNAPCRAFT_ARCH_TRIPLET}" = "arm-linux-gnueabihf" ]; then
25+ arm-linux-gnueabihf-gcc lk-boot-env.c -I/usr/include/ -Iapp/aboot -o ${SNAPCRAFT_PART_INSTALL}/bin/lk-boot-env
26+ elif [ "${SNAPCRAFT_ARCH_TRIPLET}" = "aarch64-linux-gnu" ]; then
27+ aarch64-linux-gnu-gcc lk-boot-env.c -I/usr/include/ -Iapp/aboot -o ${SNAPCRAFT_PART_INSTALL}/bin/lk-boot-env
28+ else
29+ # native build
30+ gcc lk-boot-env.c -I/usr/include/ -Iapp/aboot -o ${SNAPCRAFT_PART_INSTALL}/bin/lk-boot-env
31+ fi
32+################################################################################
33 tpm2-tss:
34 plugin: autotools
35 source: https://github.com/tpm2-software/tpm2-tss

Subscribers

People subscribed via source and target branches