← Back to issue list

kernel plugin: pick the correct kernel-image-target per architecture

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1604801
Type
issue
State
closed
Author
~p-pisati
Labels
—
Created
Updated
Closed

Current evaluation

Architecture-specific kernel image targets were merged in snapcraft PR #689 (f0a19ebcc), enabling one kernel snap definition to build amd64, arm64, and armhf.

Resolution: closed resolved

Reason: PR #689 was merged as commit f0a19ebcc and added targets keyed by Debian architecture. The reporter confirmed it built amd64, arm64, and armhf from the same kernel tree.

Evaluated by: mr-cal-bot

No scores available.

Issue body

Different kernel architecture needs different kernel-image-target: ARCH=arm: ... Architecture specific targets (arm): * zImage - Compressed kernel image (arch/arm/boot/zImage) Image - Uncompressed kernel image (arch/arm/boot/Image) ... ARCH=arm64: ... Architecture specific targets (arm64): * Image.gz - Compressed kernel image (arch/arm64/boot/Image.gz) Image - Uncompressed kernel image (arch/arm64/boot/Image) ... ARCH=powerpc: ... Architecture specific targets (powerpc): * zImage - Build default images selected by kernel config zImage.* - Compressed kernel image (arch/powerpc/boot/zImage.*) ... etcetc At the moment snapcraft.yaml::kernel-image-target could be only a string, and to support compiling the kernel for different architectures from the same snapcraft.yaml, we need a dynamic mechanism - either an internal mapping in snapcraft: case ARCH: amd64) target=bzImage arm) target=zImage arm64) target=Image ... etcetc ... esac or a callback mechanism (as we exploited in kdefconfig to support multiple archs/configs): ... kdefconfig: ['--makefile=debian/snapcraft.mk', 'branch=master','flavour=generic', 'config'] ... $ cat debian/snapcraft.mk ifeq ($(ARCH),) arch := $(shell uname -m | sed -e s/i.86/i386/ -e s/x86_64/amd64/ \ -e s/arm.*/armhf/ -e s/s390/s390x/ -e s/ppc.*/powerpc/ \ -e s/aarch64.*/arm64/ ) else ifeq ($(ARCH),arm) arch := armhf else arch := $(ARCH) endif config: cat debian.$(branch)/config/config.common.ubuntu debian.$(branch)/config/$(arch)/config.common.$(arch) debian.$(branch)/config/$(arch)/config.flavour.$(flavour) >.config The entire snapcraft.yaml that we would like to ship with the generic Ubuntu kernel, is attached below.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Architecture-specific kernel image targets were merged in snapcraft PR #689 (f0a19ebcc), enabling one kernel snap definition to build amd64, arm64, and armhf.
stealth/space-bunny-alpha — closed resolved Architecture-specific kernel image targets were implemented in PR #689, allowing one kernel snap definition to build for amd64, arm64, and armhf.
stealth/space-bunny-alpha — closed stale Architecture-specific kernel-image-target selection was requested, but the issue was closed without comments, a linked fix, or a documented resolution.
stealth/space-bunny-alpha — closed resolved Merged canonical/snapcraft#689 as f0a19ebcc, enabling architecture-dependent kernel image targets for amd64, arm64 and armhf builds from one snapcraft.yaml.
qwen/qwen3.6-35b-a3b — — Closed without resolution or implementation. The request for dynamic architecture-based kernel-image-target selection in the snapcraft kernel plugin was abandoned.
qwen/qwen3.6-35b-a3b — — Closed without resolution. The feature request for dynamic architecture-based kernel-image-target selection in the snapcraft kernel plugin was abandoned or superseded by newer plugin versions, as shown by zero comments and prolonged inactivity.

Update history

Date Change
created

Related work

  • Likely Fixed By: snapcraft#689 (confidence 99%)

    Merged PR implementing architecture-specific kernel image targets for LP #1604801.

Related issues

Issue Project State Summary Similarity
#689 kernel plugin: kernel targets depending on debarch snapcraft merged Merged as f0a19ebcc, adding architecture-specific kernel image targets so one snapcraft.yaml builds amd64, arm64 and armhf kernels.
87%
#1665659 kernel plugin: if kernel's target == NULL, use per-arch default target snapcraft (launchpad) closed Merged canonical/snapcraft#1209 (commit 2b6aee1e9), adding per-architecture kernel build targets when no target is configured.
83%
#1149 kernel plugin: if kernel's target == NULL, use per-arch default target snapcraft closed Closed unmerged: superseded by snapcraft PR #1209, merged as commit 2b6aee1e9, which adds per-arch kernel build targets (bzImage/zImage/Image.gz) plus unit tests for LP #1665659.
80%
#1209 kernel plugin: use default per arch targets. snapcraft merged Merged PR #1209 as commit 2b6aee1e9, adding architecture-specific kernel build targets when none is configured (LP #1665659).
74%
#1136 kernel plugin: if kernel's target == NULL, use per-arch default target snapcraft closed Closed unmerged; the equivalent kernel-plugin change was merged in #1209 as commit 2b6aee1e9, adding architecture-specific default build targets.
73%
#1700069 kernel plugin: add implicit kernel targets for powerpc, ppc64el and s390x snapcraft (launchpad) closed Feature request to add implicit/default kernel build targets for powerpc, ppc64el and s390x was implemented in merged PR canonical/snapcraft#1377 (commit 6bcfc2ec4) and released in snapcraft 2.33; issue closed as fixed.
71%