From 9fdf7ef0d7ea27cbd406f7830a80d260250b412d Mon Sep 17 00:00:00 2001 From: Shih-Yi Chen Date: Tue, 7 Apr 2026 02:21:06 +0000 Subject: [PATCH 1/2] Update bfcfg and bfup for BF4 - Added BF4 check and prompt at the beginning in bfup - Fixed getopt parameter. RM #4925302 RM #4929244 --- bfcfg | 2 +- bfup | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/bfcfg b/bfcfg index a93d6b6..8504715 100755 --- a/bfcfg +++ b/bfcfg @@ -3708,7 +3708,7 @@ bf4_cfg() dump_mode=0 # Parse the arguments. - options=$(getopt -n bfcfgl: -o dhvl -l dump,dump-level:,help,version -- "$@") + options=$(getopt -n bfcfg -o dhvl: -l dump,dump-level:,help,version -- "$@") eval set -- "$options" while [ "$1" != -- ]; do case $1 in diff --git a/bfup b/bfup index 74cf97d..967eab3 100755 --- a/bfup +++ b/bfup @@ -27,6 +27,13 @@ # of the authors and should not be interpreted as representing official policies, # either expressed or implied, of the FreeBSD Project. +bf_chip=$(bffamily --chip) + +if [ "$bf_chip" = "BlueField-4" ]; then + echo "${0##*/} is NOT supported for BlueField-4" >&2 + exit 1 +fi + /usr/bin/bfrshlog "Linux up" /usr/bin/bfrshlog "DPU is ready" @@ -41,4 +48,4 @@ echo 1 > "${os_up_path}" /usr/bin/bfcfg -i 2>/dev/null # Pass the DOCA version info to UEFI variable. -/usr/bin/bfcfg --docainfo 2>/dev/null \ No newline at end of file +/usr/bin/bfcfg --docainfo 2>/dev/null From e8597e033a909109aaa5ebfc9e67cb21479e7d22 Mon Sep 17 00:00:00 2001 From: Shih-Yi Chen <103535873+shihyic@users.noreply.github.com> Date: Wed, 8 Apr 2026 09:59:01 +0800 Subject: [PATCH 2/2] Update bfup per review --- bfup | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bfup b/bfup index 967eab3..29e3129 100755 --- a/bfup +++ b/bfup @@ -30,7 +30,8 @@ bf_chip=$(bffamily --chip) if [ "$bf_chip" = "BlueField-4" ]; then - echo "${0##*/} is NOT supported for BlueField-4" >&2 + # Simply exit since most callers are scripts + # echo "${0##*/} is NOT supported for BlueField-4" >&2 exit 1 fi