Please add meta/kernel.yaml

Bug #1907056 reported by Michael Vogt
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
snapd
Confirmed
Undecided
Unassigned
snapd (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Snapd will soon support to have DTBs in the kernel snap that are automatically installed on kernel refreshes. To support this, please add the following file to the pi-kernel:

This should also add "assumes: [kernel-assets]" to the meta/snap.yaml so
that the updated kernel/gadget are only used by a snap version that
understand this, see https://github.com/snapcore/snapd/pull/9999

$ cat meta/kernel.yaml
assets:
  pidtbs:
    update: true
    content:
    - dtbs/

This will allow the gadget to select DTBs from the kernel. The arm64 gadget needs to be updated to have all dtb files removed. And the gadget.yaml needs to change to something like

$ head -20 meta/gadget.yaml
device-tree: bcm2709-rpi-3-b-plus
volumes:
  pi:
    schema: mbr
    bootloader: u-boot
    structure:
      - name: ubuntu-seed
        role: system-seed
        filesystem: vfat
        type: 0C
        size: 1200M
        content:
          - source: $kernel:pidtbs/dtbs/broadcom/
            target: /
          - source: $kernel:pidtbs/dtbs/overlays/
            target: /overlays
          - source: boot-assets/
            target: /
      - name: ubuntu-boot
        role: system-boot
...

AFAICT the armhf needs to be updated differently because the layout
of the dtbs folder is different in the armhf kernel:

$ head -20 meta/gadget.yaml
volumes:
  pi:
    schema: mbr
    bootloader: u-boot
    structure:
      - name: ubuntu-seed
        role: system-seed
        filesystem: vfat
        type: 0C
        size: 1200M
        content:
          - source: $kernel:pidtbs/dtbs/
            target: /
          - source: boot-assets/
            target: /
      - name: ubuntu-boot
        role: system-boot

If those could be provided in a snap branch that would be *amazing*

Michael Vogt (mvo)
description: updated
Michael Vogt (mvo)
description: updated
Michael Vogt (mvo)
description: updated
Michael Vogt (mvo)
description: updated
Michael Vogt (mvo)
description: updated
Michael Vogt (mvo)
description: updated
Michael Vogt (mvo)
description: updated
Revision history for this message
Michael Vogt (mvo) wrote :

The kernel wants to use:
```
assets:
  pidtbs:
    update: true
    content:
      - dtbs/
```

instead of the one suggested above because the pi-kernel on arm64 and armhf have different dtbs/ dir layout:

arm64: dtbs/broadcom/*.dtb, dtbs/overlays
armhf: dtbs/*.dtb, dtbs/overlays

So the armhf has all the dtb files under dtbs/ directly and the arm64 has it under broadcom/.
 The suggestion is then that the gadget maps it from here to the right places.

Revision history for this message
Michael Vogt (mvo) wrote :

Fwiw, the dtbs/ dir:
$ ls pi-kernel-armhf-rev266/dtbs/
bcm2708-rpi-b.dtb bcm2710-rpi-cm3.dtb bcm2835-rpi-zero.dtb
bcm2708-rpi-b-plus.dtb bcm2711-rpi-400.dtb bcm2835-rpi-zero-w.dtb
bcm2708-rpi-b-rev1.dtb bcm2711-rpi-4-b.dtb bcm2836-rpi-2-b.dtb
bcm2708-rpi-cm.dtb bcm2711-rpi-cm4.dtb bcm2837-rpi-3-a-plus.dtb
bcm2708-rpi-zero.dtb bcm2835-rpi-a.dtb bcm2837-rpi-3-b.dtb
bcm2708-rpi-zero-w.dtb bcm2835-rpi-a-plus.dtb bcm2837-rpi-3-b-plus.dtb
bcm2709-rpi-2-b.dtb bcm2835-rpi-b.dtb bcm2837-rpi-cm3-io3.dtb
bcm2710-rpi-2-b.dtb bcm2835-rpi-b-plus.dtb overlays.tgz
bcm2710-rpi-3-b.dtb bcm2835-rpi-b-rev2.dtb
bcm2710-rpi-3-b-plus.dtb bcm2835-rpi-cm1-io1.dtb

$ ls pi-kernel-arm64-rev264/dtbs/
broadcom/ overlays/

Revision history for this message
Juerg Haefliger (juergh) wrote :

The armhf listing in the previous comment is from an 'old' pi-kernel snap. With a new snap, there should be an overlays directory and not an overlays.tgz tarball:

https://dashboard.snapcraft.io/snaps/pi-kernel/revisions/263/ (armhf)
https://dashboard.snapcraft.io/snaps/pi-kernel/revisions/264/ (arm64)

Note that this change is currently only visible in the test snap #263. The modification hasn't been pushed to the regular snap build rule yet.

Michael Vogt (mvo)
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in snapd (Ubuntu):
status: New → Confirmed
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

I think this change has now been pulled into the regular UC18 builds https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux-snap/+git/bionic/commit/?h=pi-5.3&id=658d5bf2320612589f41f5a0aa05e0d99040abd8

However, it has been reported that the other snaps are not ready for this in the 18* tracks, and the kernel snaps have now been reverted.

Please advise when one can start using 'assumes: [ kernel-assets ]' in 18* tracks of pi-kernel.

Changed in snapd:
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.