Skip to content

feat: Add arm version of build and publish roms - #447

Open
dragosgheorghioiu wants to merge 2 commits into
prod-stagingfrom
dragosg/feat/arm-version-rom-build
Open

feat: Add arm version of build and publish roms#447
dragosgheorghioiu wants to merge 2 commits into
prod-stagingfrom
dragosg/feat/arm-version-rom-build

Conversation

@dragosgheorghioiu

Copy link
Copy Markdown

No description provided.

@dragosgheorghioiu
dragosgheorghioiu force-pushed the dragosg/feat/arm-version-rom-build branch 2 times, most recently from de60c36 to 3ee49a7 Compare August 13, 2026 10:12
@dragosgheorghioiu
dragosgheorghioiu marked this pull request as ready for review August 13, 2026 10:18
Comment thread internal/builder/build.go Outdated
Comment thread internal/builder/build.go Outdated
Comment thread internal/cmd/build.go Outdated
Input string `arg:"" default:"." help:"Path to the input directory."`
Output string `short:"o" help:"Output destination"`
Arch string `help:"Architecture to build for (x86_64 or arm64). Defaults to the Kraftfile targets, or x86_64."`
Replace bool `help:"Publish only the architecture that was built, dropping any others already published under the destination tag."`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If you ask me I would reverse this?

By default it should replace and if asked it should append to an artifact

@dragosgheorghioiu dragosgheorghioiu Aug 13, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

so i replaced with an append flag but a multiarch build with a Dockerfile rootfs would look like this

unikraft build . --arch x86_64 -o org/debian-ssh:latest
unikraft build . --arch arm64  -o org/debian-ssh:latest --append

not sure if replace should be the default

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

hmm, then why not just unikraft build . -o org/debian-ssh:latest

Under the hood it would fetch all permutations and then build for each (and append each time)

@dragosgheorghioiu
dragosgheorghioiu force-pushed the dragosg/feat/arm-version-rom-build branch 2 times, most recently from 6fe8acc to fb540af Compare August 13, 2026 12:41
Comment thread internal/builder/rootfs.go
Comment thread internal/cmd/build.go Outdated
Comment thread internal/cmd/build.go
Input string `arg:"" default:"." help:"Path to the input directory."`
Output string `short:"o" help:"Output destination"`
Arch string `help:"Only build the Kraftfile targets of this architecture (x86_64 or arm64). Defaults to every target, or x86_64 when none are declared."`
Append bool `help:"Keep the platforms already published under the destination tag instead of publishing only what was built."`

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is racy right? If I run two jobs here, and they both try to push at the same time, they're gonna overwrite each other.

Dunno the solution, but maybe we allow unikraft image copy to take multiple sources? Then we can push to separate tags, and then create a multi-platform image. This is a reasonably common approach.

(or we make multi-platform builds actually work, so you just need one unikraft build to solve it)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Mm, I will make the latter work. So unikraft build just does it.

@dragosgheorghioiu dragosgheorghioiu Aug 13, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

my idea was to just run buildkit for every arch maybe that can avoid that bug

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Okay, here we go. #448

(yeah it's exactly that solution)

Signed-off-by: Dragos Gheorghioiu <dragosg@unikraft.com>
@dragosgheorghioiu
dragosgheorghioiu force-pushed the dragosg/feat/arm-version-rom-build branch from c2ded2e to 0503950 Compare August 13, 2026 15:51
Signed-off-by: Dragos Gheorghioiu <dragosg@unikraft.com>
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