Skip to content

Commit b79667c

Browse files
committed
nvidiabluefield: Added mlxbf-bootctl kernel module in dracut generation and automated loading.
1 parent a678803 commit b79667c

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

dracut/30ignition/module-setup.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,5 +123,10 @@ installkernel() {
123123
instmods -c zcrypt_cex4
124124
instmods -c pkey_cca
125125
fi
126+
127+
# required by nvidiabluefield platform to read ignition file through bootfifo sysfs interface
128+
if [[ ${DRACUT_ARCH:-$(uname -m)} == aarch64 ]]; then
129+
instmods -c mlxbf-bootctl
130+
fi
126131
}
127132

internal/providers/nvidiabluefield/nvidiabluefield.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@ package nvidiabluefield
2020
import (
2121
"bytes"
2222
"os"
23+
"os/exec"
2324

2425
"github.com/coreos/ignition/v2/config/v3_6_experimental/types"
26+
"github.com/coreos/ignition/v2/internal/distro"
2527
"github.com/coreos/ignition/v2/internal/platform"
2628
"github.com/coreos/ignition/v2/internal/providers/util"
2729
"github.com/coreos/ignition/v2/internal/resource"
@@ -43,6 +45,11 @@ func init() {
4345
}
4446

4547
func fetchConfig(f *resource.Fetcher) (cfg types.Config, rpt report.Report, err error) {
48+
// load mlxbf-bootctl module
49+
if _, err = f.Logger.LogCmd(exec.Command(distro.ModprobeCmd(), "mlxbf-bootctl"), "loading mlxbf-booctl kernel module"); err != nil {
50+
return
51+
}
52+
4653
for _, bootfifoPath := range bootfifoPaths {
4754
f.Logger.Debug("Attempting to read bootfifo at %s", bootfifoPath)
4855
raw, err := os.ReadFile(bootfifoPath)

0 commit comments

Comments
 (0)