diff --git a/uimage/uimage.go b/uimage/uimage.go index 11fbf4d..81223f2 100644 --- a/uimage/uimage.go +++ b/uimage/uimage.go @@ -378,6 +378,14 @@ func WithBinaryCommands(cmd ...string) Modifier { return WithCommands(nil, builder.Binary, cmd...) } +// WithBinaryCommandsOpts adds Go commands to compile as individual binaries +// and add to the archive. +// +// Allowed formats for cmd are documented in [WithCommands]. +func WithBinaryCommandsOpts(gbOpts *golang.BuildOpts, cmd ...string) Modifier { + return WithCommands(bbOpts, builder.Binary, cmd...) +} + // WithOutput sets the archive output file. func WithOutput(w initramfs.WriteOpener) Modifier { return func(o *Opts) error {