Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions build-utils/README_series_r_p701.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
--------------------------------------------------------------------|----------------------------------
files/202511/PATCH_NAME |submodule-directory
--------------------------------------------------------------------|----------------------------------
0041-buildimage-print-each-build-target-on-separated-line.patch |sonic-buildimage
0064-build_templates-marvell-blacklist-with-kempld.patch |sonic-buildimage
0031-Falcon-usb-disk-hung_task-WA.patch |sonic-buildimage
0041-grub2-grub_cmd_sleep-increase-tolerance-to-14sec.patch |sonic-buildimage
0043-marvell-prestera-rpc-pin-ptf_nn_agent.py-to-use-nnpy.patch |sonic-buildimage

0013-sonic_installer-add-sync-before-migration.patch |src/sonic-utilities
0060-sonic-ext.target-wrapper-for-sonic.target.patch |platform/marvell-prestera/mrvl-prestera
0061-sonic.target-no-install-oveload-for-sonic-ext.target.patch |platform/marvell-prestera/mrvl-prestera
0104-platform-X-arm64-mrvl-pcie-ep-check-reboot-on-EP-miss.patch |platform/marvell-prestera/mrvl-prestera

--------------------------------------------------------------------|----------------------------------
files/202511/1/PATCH_NAME (applied for AMD64 only) |submodule-directory
--------------------------------------------------------------------|----------------------------------
1001-vlan1-CLI-changes-to-allow-vlan1.patch |src/sonic-utilities
1002-vlan1-Yang-changes-to-allow-vlan-1.patch |sonic-buildimage
1003-vlan1-orchagent-changes-to-skip-addition-and-deletio.patch |src/sonic-swss
10 changes: 5 additions & 5 deletions build-utils/arti-copy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ SONIC_SOURCE_DIR="$(basename "$(dirname "$CURR_DIR")")"
# Extract BRANCH as second field between first and second '-'
BRANCH="$(echo "$SONIC_SOURCE_DIR" | cut -d'-' -f2)"
case "$BRANCH" in
master|202505|202511)
master|202505|202511|202605)
l_DEBIAN=bookworm
;;
trixie)
Expand Down Expand Up @@ -78,10 +78,10 @@ copy_build_artifacts()
if [ "$TARG_SUFFIX" = "" ]; then
cp -a ${TARGET} $BUILD_ARTIFACTS_DIR
echo "${LOG_PATH}/$TARGET_FILE" >> $ARTIFACTS_LOG
if [ -f target/debs/${l_DEBIAN}/swss-dbg_1.0.0_*.deb ]; then
cp -a target/debs/${l_DEBIAN}/swss-dbg_1.0.0_*.deb $BUILD_ARTIFACTS_DIR
fi
cp -a target/debs/${l_DEBIAN}/sonic-platform-*.deb $BUILD_ARTIFACTS_DIR
#if [ -f target/debs/${l_DEBIAN}/swss-dbg_1.0.0_*.deb ]; then
# cp -a target/debs/${l_DEBIAN}/swss-dbg_1.0.0_*.deb $BUILD_ARTIFACTS_DIR
#fi
#cp -a target/debs/${l_DEBIAN}/sonic-platform-*.deb $BUILD_ARTIFACTS_DIR
if [ -f target/docker-saiserverv2-${PLATFORM_SHORT_NAME}.gz ]; then
cp -a target/docker-saiserverv2-${PLATFORM_SHORT_NAME}.gz $BUILD_ARTIFACTS_DIR
fi
Expand Down
5 changes: 3 additions & 2 deletions build-utils/create-script-tarball.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@ cd "$PROJECT_DIR"

rm -f $R_TAR_GZ sonic_build_r_*.sh
cp build-utils/sbuild_r_${RELEASE}*.sh .
cp build-utils/README_series_r_${RELEASE}.txt .
tar czf $R_TAR_GZ \
--exclude='files/master/TBD' \
--exclude='files/master/tl' \
--exclude='files/202511/tl' \
files/202511 \
files/master \
*.sh

*.sh \
README_series_r_${RELEASE}.txt

38 changes: 38 additions & 0 deletions files/202605/0013-sonic_installer-add-sync-before-migration.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
From c113b0d1d550b8c51cd31b1af5c29840bb9e325f Mon Sep 17 00:00:00 2001
From: Yan Markman <ymarkman@marvell.com>
Date: Sun, 22 Jun 2025 18:09:40 +0300
Subject: [PATCH 1/1] sonic_installer: add sync before migration

Add extra 'sync' command to the sonic_installer to eliminate
timeout failure in the following command
chroot /tmp/image-fs sonic-package-manager \
migrate /tmp/packages.json --dockerd-socket /tmp/docker.sock
on a slow or removable disk (for example - on Intel-Falcon board).

This sync should be called before first chroot.

Signed-off-by: Yan Markman <ymarkman@marvell.com>
---
sonic_installer/main.py | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/sonic_installer/main.py b/sonic_installer/main.py
index 6a445504..4cc48725 100644
--- a/sonic_installer/main.py
+++ b/sonic_installer/main.py
@@ -358,6 +358,12 @@ def migrate_sonic_packages(bootloader, binary_image_version):
run_command_or_raise(["mkdir", "-p", new_image_work_dir])
mount_overlay_fs(new_image_mount, new_image_upper_dir, new_image_work_dir, new_image_mount)
mount_bind(new_image_docker_dir, new_image_docker_mount)
+
+ # sync to eliminate timeout on the
+ # chroot /tmp/image-fs SONIC_PACKAGE_MANAGER migrate /tmp/packages.json --dockerd-socket DOCKERD_SOCK
+ click.echo('Command sync ... could take several seconds on slow or removable disk')
+ run_command(["sync"])
+
mount_procfs_chroot(new_image_mount)
mount_sysfs_chroot(new_image_mount)
# Assume if docker.sh script exists we are installing Application Extension compatible image.
--
2.25.1

56 changes: 56 additions & 0 deletions files/202605/0016-swss-syncd-time.monotonic.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
From 57334c606a7841b89e1e09ea6f3aeb7071ea7a4b Mon Sep 17 00:00:00 2001
From: Yan Markman <ymarkman@marvell.com>
Date: Mon, 1 Jun 2026 19:21:54 +0300
Subject: [PATCH 1/1] swss-syncd time.monotonic

PROBLEM:
On chrony or "date -s SET" command the wall-time is changed
and abrupts the wall/realtime taken by the time.time().
FIX:
Use the time.monotonic() which is not changed un date/wall-time.

Signed-off-by: Yan Markman <ymarkman@marvell.com>
---
config/main.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/config/main.py b/config/main.py
index a495c933..ce222fe1 100644
--- a/config/main.py
+++ b/config/main.py
@@ -857,12 +857,12 @@ def storm_control_delete_entry(port_name, storm_type):
def _wait_until_clear(tables, interval=0.5, timeout=30, verbose=False):
if timeout == 0:
return True
- start = time.time()
+ start = time.monotonic()
empty = False
app_db = SonicV2Connector(host='127.0.0.1')
app_db.connect(app_db.APPL_DB)

- while not empty and time.time() - start < timeout:
+ while not empty and time.monotonic() - start < timeout:
non_empty_table_count = 0
for table in tables:
keys = app_db.keys(app_db.APPL_DB, table)
@@ -1006,7 +1006,7 @@ def get_service_finish_timestamp(service):


def wait_service_restart_finish(service, last_timestamp, timeout=30):
- start_time = time.time()
+ start_time = time.monotonic()
elapsed_time = 0
while elapsed_time < timeout:
current_timestamp = get_service_finish_timestamp(service)
@@ -1014,7 +1014,7 @@ def wait_service_restart_finish(service, last_timestamp, timeout=30):
return

time.sleep(1)
- elapsed_time = time.time() - start_time
+ elapsed_time = time.monotonic() - start_time

log.log_warning("Service: {} does not restart in {} seconds, stop waiting".format(service, timeout))

--
2.34.1

Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
From 8ef4bfe5667bf23b5eea389982323f5091cf47e4 Mon Sep 17 00:00:00 2001
From: Elad Nachman <enachman@marvell.com>
Date: Sun, 18 May 2025 14:00:52 +0000
Subject: [PATCH] arm64 kdump support - add support in kdump config

Signed-off-by: Elad Nachman <enachman@marvell.com>
---
scripts/sonic-kdump-config | 102 ++++++++++++++++++++++++++++++++++++-
1 file changed, 101 insertions(+), 1 deletion(-)

diff --git a/scripts/sonic-kdump-config b/scripts/sonic-kdump-config
index d7304758..2f22b4ae 100755
--- a/scripts/sonic-kdump-config
+++ b/scripts/sonic-kdump-config
@@ -31,6 +31,7 @@ from sonic_installer.common import IMAGE_PREFIX

aboot_cfg_template ="/host/image-%s/kernel-cmdline"
grub_cfg = "/host/grub/grub.cfg"
+uboot_cfg = "uboot-env.txt"
kdump_cfg = "/etc/default/kdump-tools"
kdump_mem_file = "/sys/kernel/kexec_crash_size"
machine_cfg = "/host/machine.conf"
@@ -104,6 +105,89 @@ def get_next_image():
print_err("Unable to locate next SONiC image")
sys.exit(1)

+## Detect if U-Boot is the bootloader by checking for the presence of `fw_printenv`.
+def is_uboot_present():
+ try:
+ # Check if the `fw_printenv` command exists
+ result = subprocess.run(['which', 'fw_printenv'], capture_output=True, text=True)
+ if result.returncode == 0:
+ print("U-Boot detected: `fw_printenv` command is available.")
+ return True
+ else:
+ print("U-Boot not detected: `fw_printenv` command is not available.")
+ return False
+ except Exception as e:
+ print(f"An error occurred while checking for U-Boot: {e}")
+ return False
+
+## Retrieve the current U-Boot environment variables.
+def get_uboot_env():
+ try:
+ result = subprocess.run(['fw_printenv'], capture_output=True, text=True, check=True)
+ env_vars = {}
+ for line in result.stdout.splitlines():
+ if '=' in line:
+ key, value = line.split('=', 1)
+ env_vars[key] = value
+ return env_vars
+ except subprocess.CalledProcessError as e:
+ print(f"Error retrieving U-Boot environment: {e}")
+ return None
+
+## Dump the U-Boot environment variables into a file.
+def dump_uboot_env(output_file):
+ try:
+ # Run the `fw_printenv` command to get the U-Boot environment
+ result = subprocess.run(['fw_printenv'], capture_output=True, text=True, check=True)
+
+ # Write the output to the specified file
+ with open(output_file, 'w', encoding='utf-8') as file:
+ file.write(result.stdout)
+
+ print(f"U-Boot environment variables have been dumped to {output_file}")
+ except FileNotFoundError:
+ print("Error: `fw_printenv` command not found. Ensure U-Boot tools are installed.")
+ except subprocess.CalledProcessError as e:
+ print(f"Error while running `fw_printenv`: {e}")
+ except Exception as e:
+ print(f"An unexpected error occurred: {e}")
+
+## Set a U-Boot environment variable.
+def set_uboot_env(key, value):
+ try:
+ subprocess.run(['fw_setenv', key, value], check=True)
+ print(f"Successfully set {key}={value}")
+ except subprocess.CalledProcessError as e:
+ print(f"Error setting U-Boot environment variable {key}: {e}")
+
+## Modify the U-Boot parameters to add or update the crashkernel parameter.
+def modify_crashkernel_param_uboot_env(crashkernel_value):
+ env_vars = get_uboot_env()
+ if env_vars is None:
+ print("Failed to retrieve U-Boot environment variables.")
+ return
+
+ # Get the current bootargs
+ bootargs = env_vars.get('linuxargs', '')
+
+ # Check if crashkernel is already present
+ if 'crashkernel=' in bootargs:
+ # Update the existing crashkernel parameter
+ new_bootargs = []
+ for param in bootargs.split():
+ if (param.startswith('crashkernel=')):
+ if (crashkernel_value != "0"):
+ new_bootargs.append(f'crashkernel={crashkernel_value}')
+ else:
+ new_bootargs.append(param)
+ bootargs = ' '.join(new_bootargs)
+ else:
+ # Add the crashkernel parameter
+ bootargs += f' crashkernel={crashkernel_value}'
+
+ # Set the updated bootargs
+ set_uboot_env('linuxargs', bootargs)
+
## Search for Current/Next SONiC image in grub configuration
#
# @param lines Lines read from grub.cfg/cmdline file
@@ -371,7 +455,7 @@ def get_kdump_ssh_path():
#
# @return The integer value X from USE_KDUMP=X in /etc/default/kdump-tools
def read_use_kdump():
- (rc, lines, err_str) = run_command("grep 'USE_KDUMP=.*' %s | cut -d = -f 2" % kdump_cfg, use_shell=False);
+ (rc, lines, err_str) = run_command("grep 'USE_KDUMP=.*' %s | cut -d = -f 2" % kdump_cfg, use_shell=True);
if rc == 0 and type(lines) == list and len(lines) >= 1:
try:
return int(lines[0])
@@ -516,6 +600,9 @@ def kdump_enable(verbose, kdump_enabled, memory, num_dumps, image, cmdline_file,
if verbose:
print("Enabling kdump for image=[%s]" % image)

+ if (cmdline_file == uboot_cfg):
+ dump_uboot_env(uboot_cfg)
+
# Existing functionality: Reading the kernel command line file
try:
lines = [line.rstrip('\n') for line in open(cmdline_file)]
@@ -555,6 +642,9 @@ def kdump_enable(verbose, kdump_enabled, memory, num_dumps, image, cmdline_file,

if changed:
rewrite_cfg(lines, cmdline_file)
+ if (cmdline_file == uboot_cfg):
+ modify_crashkernel_param_uboot_env(memory)
+ os.remove(uboot_cfg)

# Enable kdump
write_use_kdump(1)
@@ -626,6 +716,8 @@ def cmd_kdump_enable(verbose, image):
elif open(machine_cfg, 'r').read().find('aboot_platform') >= 0:
aboot_cfg = aboot_cfg_template % image
return kdump_enable(verbose, kdump_enabled, memory, num_dumps, image, aboot_cfg, remote, ssh_string, ssh_path)
+ elif is_uboot_present():
+ return kdump_enable(verbose, kdump_enabled, memory, num_dumps, image, uboot_cfg, remote, ssh_string, ssh_path)
else:
print("Feature not supported on this platform")
return False
@@ -657,6 +749,9 @@ def kdump_disable(verbose, image, booter_config_file_path):
if verbose:
print("Disabling kdump for image=[%s]\n" % image)

+ if (booter_config_file_path == uboot_cfg):
+ dump_uboot_env(uboot_cfg)
+
try:
with open(booter_config_file_path) as config_file_handler:
lines = [line.rstrip('\n') for line in config_file_handler]
@@ -680,6 +775,9 @@ def kdump_disable(verbose, image, booter_config_file_path):

if changed:
rewrite_cfg(lines, booter_config_file_path)
+ if (booter_config_file_path == uboot_cfg):
+ modify_crashkernel_param_uboot_env("0")
+ os.remove(uboot_cfg)

if not os.path.exists('/etc/sonic/config_db.json'):
print_err("Startup configuration not found, Kdump configuration is not saved")
@@ -708,6 +806,8 @@ def cmd_kdump_disable(verbose):
elif open(machine_cfg, 'r').read().find('aboot_platform') >= 0:
aboot_cfg = aboot_cfg_template % image
return kdump_disable(verbose, image, aboot_cfg)
+ elif is_uboot_present():
+ return kdump_disable(verbose, image, uboot_cfg)
else:
print("Feature not supported on this platform")
return False
--
2.25.1

Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
From d5dba9fc5ed0add1d0eaed07d9d1d083ce35aa81 Mon Sep 17 00:00:00 2001
From: Elad Nachman <enachman@marvell.com>
Date: Sun, 18 May 2025 13:57:21 +0000
Subject: [PATCH] arm64 kdump support - Install kdump utils for either amd64 or
arm64

Signed-off-by: Elad Nachman <enachman@marvell.com>
---
files/build_templates/sonic_debian_extension.j2 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/files/build_templates/sonic_debian_extension.j2 b/files/build_templates/sonic_debian_extension.j2
index 579c165d9..a8c0217ef 100644
--- a/files/build_templates/sonic_debian_extension.j2
+++ b/files/build_templates/sonic_debian_extension.j2
@@ -326,7 +326,7 @@ install_deb_package $debs_path/libnss-radius_*.deb
sudo sed -i -e '/^passwd/s/ radius//' $FILESYSTEM_ROOT/etc/nsswitch.conf

# Install a custom version of kdump-tools (and its dependencies via 'apt-get -y install -f')
-if [ "$TARGET_BOOTLOADER" != uboot ]; then
+if [[ $CONFIGURED_ARCH == amd64 || $CONFIGURED_ARCH == arm64 ]]; then
install_deb_package $debs_path/kdump-tools_*.deb
cat $IMAGE_CONFIGS/kdump/kdump-tools | sudo tee -a $FILESYSTEM_ROOT/etc/default/kdump-tools > /dev/null

--
2.25.1

27 changes: 27 additions & 0 deletions files/202605/0031-Falcon-usb-disk-hung_task-WA.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
From 29cf8032aff6843919708334f2e95aa373d961b4 Mon Sep 17 00:00:00 2001
From: Pavan Naregundi <pnaregundi@marvell.com>
Date: Thu, 21 Mar 2024 09:21:39 +0000
Subject: Falcon usb disk hung_task WA

Signed-off-by: Pavan Naregundi <pnaregundi@marvell.com>
---
installer/install.sh | 3 +++
1 file changed, 3 insertions(+)

diff --git a/installer/install.sh b/installer/install.sh
index 557358fd5..13d2fc3a8 100755
--- a/installer/install.sh
+++ b/installer/install.sh
@@ -44,6 +44,9 @@ read_conf_file() {
}

set -e
+{ echo 0 > /proc/sys/kernel/hung_task_timeout_secs; } 2>/dev/null || true
+sync
+echo 3 > /proc/sys/vm/drop_caches

if [ -d "/etc/sonic" ]; then
echo "Installing SONiC in SONiC"
--
2.25.1

Loading