Skip to content

docker/riscv/trixie: Add build-kernel target#22

Merged
baptleduc merged 1 commit into
xcp-ng:mainfrom
baptleduc:add-build-kernel-target
May 12, 2026
Merged

docker/riscv/trixie: Add build-kernel target#22
baptleduc merged 1 commit into
xcp-ng:mainfrom
baptleduc:add-build-kernel-target

Conversation

@baptleduc
Copy link
Copy Markdown
Contributor

@baptleduc baptleduc commented May 6, 2026

Adds a build-kernel target that cross-compiles Image.gz from a Linux source tree using tuxmake/riscv_gcc-14 in Docker. No local RISC-V toolchain required.

make build-kernel KERNEL_SRC=$(HOME)/path/to/linux

The resulting binary can then be used via the existing KERNEL variable to override the bundled kernel at boot time.

@baptleduc baptleduc self-assigned this May 6, 2026
@baptleduc baptleduc requested a review from a team as a code owner May 6, 2026 07:01
@baptleduc baptleduc force-pushed the add-build-kernel-target branch from b4683ed to 8ad141f Compare May 6, 2026 07:10
@baptleduc baptleduc changed the title docker/riscv/trixie: Add build-kernel target and KERNEL_HOST support docker/riscv/trixie: Add build-kernel target May 6, 2026
@fallen
Copy link
Copy Markdown

fallen commented May 6, 2026

@baptleduc I would rename KERNEL_HOST to KERNEL_SRC.
Why "host"?

@baptleduc
Copy link
Copy Markdown
Contributor Author

@baptleduc I would rename KERNEL_HOST to KERNEL_SRC.

Why "host"?

To be sync with XEN_HOST variable but, yes both can be renamed.

I used these names to refer the idea of "local git worktree".

But yes SRC is certainly better

@baptleduc baptleduc marked this pull request as draft May 7, 2026 14:59
@baptleduc baptleduc force-pushed the add-build-kernel-target branch from 65eed53 to 7bff2d0 Compare May 11, 2026 09:33
@baptleduc baptleduc marked this pull request as ready for review May 11, 2026 09:35
@baptleduc baptleduc marked this pull request as draft May 11, 2026 09:36
- build-kernel cross-compiles Image.gz via tuxmake/riscv_gcc-14, so no
local RISC-V toolchain is needed.
- KERNEL is now validated at parse time to fail when indicated path is
wrong.
- Dockerfile KERNEL_IMAGE_TAG is parameterized for easier overrides.
- XEN_HOST has been renamed to XEN_SRC in config.mk.

Signed-off-by: Baptiste Le Duc <baptiste.le-duc@vates.tech>
@baptleduc baptleduc force-pushed the add-build-kernel-target branch from 7bff2d0 to 057813f Compare May 11, 2026 12:24
@baptleduc baptleduc marked this pull request as ready for review May 11, 2026 12:24
Copy link
Copy Markdown
Collaborator

@casasnovas casasnovas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, nice!

@baptleduc baptleduc merged commit 6f902f8 into xcp-ng:main May 12, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants