Skip to content

Commit 0cd0d8d

Browse files
[nvidia-bluefield] Load MFT drivers from the SONiC rootfs during BFB installation. (sonic-net#21646)
- Why I did it To ensure the Linux kernel and MFT drivers' signatures are aligned, load the MFT drivers in the BFB installer from the SONiC image root filesystem - How I did it Mount SONiC image rootfs and load drives from the rootfs. - How to verify it Compile and install BFB image. DPU NIC FW upgrade should finish successfully during the image installation
1 parent cd42237 commit 0cd0d8d

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

platform/nvidia-bluefield/installer/create_sonic_image

-7
Original file line numberDiff line numberDiff line change
@@ -292,15 +292,8 @@ create_bfb_image() {
292292
copy_bin $tool
293293
done
294294

295-
kernel_mft=$(dpkg -l | grep kernel-mft-dkms-modules | awk '/^ii/ {print $2}')
296-
if [[ $kernel_mft == "" ]]; then
297-
echo "ERROR: kernel-mft-dkms-modules package is not installed"
298-
exit 1
299-
fi
300-
301295
for tool in `dpkg -L mft` \
302296
`dpkg -L mft-oem` \
303-
`dpkg -L $kernel_mft` \
304297
`dpkg -L xmlstarlet | grep -v share`
305298
do
306299
if [ -d $tool ]; then

platform/nvidia-bluefield/installer/install.sh.j2

+11
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,17 @@ if [[ $fw_upgrade_is_needed == "true" ]]; then
235235
ex mkdir -p $sonic_fs_mountpoint
236236
ex mount -t squashfs $sonic_fs_path $sonic_fs_mountpoint
237237

238+
kernel_mft=$(chroot $sonic_fs_mountpoint dpkg -l | grep kernel-mft-dkms-modules | awk '/^ii/ {print $2}')
239+
mft_files=$(chroot $sonic_fs_mountpoint dpkg -L $kernel_mft)
240+
241+
for f in $mft_files; do
242+
if [[ $sonic_fs_mountpoint/$f != *.ko ]]; then
243+
continue
244+
fi
245+
246+
insmod "$sonic_fs_mountpoint/$f"
247+
done
248+
238249
ex mkdir -p /etc/mlnx/
239250

240251
ex ln -s /mnt/$image_dir/platform/fw/asic/fw-BF3.mfa /etc/mlnx/fw-BF3.mfa

0 commit comments

Comments
 (0)