Skip to content

Commit 99f47cd

Browse files
committed
Rebasing and push
Signed-off-by: Shantanu Shrivastava <[email protected]> Signed-off-by: Sahil Chaudhari <[email protected]>
1 parent 7cf0b11 commit 99f47cd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+3720
-11220
lines changed

build_debian.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -524,10 +524,6 @@ sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip3 install 'docke
524524
# Install scapy
525525
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip3 install 'scapy==2.4.4'
526526

527-
# Install grpcio
528-
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip3 install 'grpcio==1.58.0'
529-
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip3 install 'grpcio-tools==1.58.0'
530-
531527
# The option --no-build-isolation can be removed when upgrading PyYAML to 6.0.1
532528
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip3 install 'PyYAML==5.4.1' --no-build-isolation
533529

device/pensando/arm64-elba-asic-flash128-r0/chassisdb.conf

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"interfaces": {},
3+
"DPU":{}
4+
}

device/pensando/arm64-elba-asic-flash128-r0/platform_reboot

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,38 @@ function StopDpuDocker() {
1313
sync ; sync
1414
}
1515

16+
function SetUboota() {
17+
# Extract the "Next" image name
18+
dirnext=$(sonic-installer list | grep "^Next:" | awk '{print $2}' | sed 's/SONiC-OS-/image-/')
19+
20+
# Extract the "Current" image name
21+
dircurrent=$(sonic-installer list | grep "^Current:" | awk '{print $2}' | sed 's/SONiC-OS-/image-/' | sed 's/\///')
22+
23+
idx=$(fw_printenv boot_once | awk '{print $2}' | awk -F'_' '{print $3}')
24+
if [ ! -z "$idx" ]; then
25+
echo "boot_once is set so using that image as next"
26+
dirnext=$(eval fw_printenv sonic_dir_$idx | awk -F'=' '{print $2}')
27+
fi
28+
29+
echo "Current image : $dircurrent"
30+
echo "Next image : $dirnext"
31+
# Check if the "Next" and "Current" image names are the same
32+
if [ "$dirnext" != "$dircurrent" ]; then
33+
# Define the command
34+
command="/host/$dirnext/boot/install_file uboota /host/$dirnext/boot/uboota.img"
35+
# Echo the command to be run
36+
echo "Running command: $command"
37+
# Execute the command with exception handling
38+
if $command; then
39+
echo "Command executed successfully."
40+
else
41+
echo "Error: Command execution failed." >&2
42+
exit 1
43+
fi
44+
else
45+
echo "Next and Current images are the same. No action taken."
46+
fi
47+
}
48+
49+
SetUboota
1650
StopDpuDocker

device/pensando/arm64-elba-asic-flash128-r0/pmon_daemon_control.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"skip_ledd": true,
55
"skip_psud": true,
66
"skip_syseepromd": false,
7-
"skip_xcvrd": false,
7+
"skip_xcvrd": true,
88
"skip_chassis_db_init": false,
99
"skip_chassisd": true,
1010
"skip_pcied": false,
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
rudra

files/build_templates/sonic_debian_extension.j2

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,9 @@ sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip3 install blkinf
144144
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip3 install ipaddr
145145

146146
# Install Python module for grpcio and grpcio-toole
147-
if [[ $CONFIGURED_ARCH == amd64 ]]; then
148-
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip3 install "grpcio==1.51.1"
149-
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip3 install "grpcio-tools==1.51.1"
147+
if [[ $CONFIGURED_ARCH == amd64 || $CONFIGURED_ARCH == arm64 ]]; then
148+
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip3 install "grpcio==1.58.0"
149+
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip3 install "grpcio-tools==1.58.0"
150150
fi
151151

152152
# Install sonic-py-common Python 3 package

files/dsc/dpu.init

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ function start_polaris()
3333
modprobe mnet_uio_pdrv_genirq
3434
modprobe mdev
3535
modprobe pciesvc
36+
insmod /usr/lib/modules/6.1.0-22-2-arm64/kernel/drivers/watchdog/softdog.ko soft_panic=1 soft_noboot=0
3637

3738
mkdir -p $HOST_DIR_POLARIS/update
3839
mkdir -p $HOST_DIR_POLARIS/sysconfig/config0

platform/pensando/dsc-drivers/src/drivers/linux/pciesvc/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ kpci += $(pciesvc-obj)
1616
INCLUDES = -I/sonic/platform/pensando/dsc-drivers/src/drivers/linux/pciesvc \
1717
-I/sonic/platform/pensando/dsc-drivers/src/drivers/linux/pciesvc/pciesvc/include \
1818
-I/sonic/platform/pensando/dsc-drivers/src/drivers/linux/pciesvc/pciesvc/src \
19-
-I/sonic/src/sonic-linux-kernel/linux-6.1.38/include/linux
19+
-I/sonic/src/sonic-linux-kernel/linux-6.1.94/include/linux
2020
#-I/usr/include \
2121
#-I$(PWD) \
22-
#-I/sonic/src/sonic-linux-kernel/linux-6.1.38/debian/build/build_arm64_none_arm64
22+
#-I/sonic/src/sonic-linux-kernel/linux-6.1.94/debian/build/build_arm64_none_arm64
2323
$(MODNAME)-y := $(kpci) kpci_get_entry.o kpcimgr_module.o kpcinterface.o \
2424
kpci_entry.o kpci_kexec.o kpci_test.o pciesvc_end.o
2525

26-
KDIR := /sonic/src/sonic-linux-kernel/linux-6.1.38/debian/build/build_arm64_none_arm64
26+
KDIR := /sonic/src/sonic-linux-kernel/linux-6.1.94/debian/build/build_arm64_none_arm64
2727
PWD := $(shell pwd)
2828
UTS := X$(shell grep UTS_RELEASE $(KDIR)/include/generated/utsrelease.h)
2929
REL := $(shell echo $(UTS) | awk '{ print $$3 }' | sed -e 's/"//g')

platform/pensando/dsc-drivers/src/drivers/linux/pciesvc/pciesvc_loader/pciesvc_loader.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ static ssize_t run_store(struct device *dev,
176176
mod.core_layout.size = bin_valid_bytes;
177177
mod.init_layout.base = 0;
178178
mod.init_layout.size = 0;
179-
strcpy(mod.name, "pciesvc.lib");
179+
strcpy_s(mod.name, sizeof(mod.name), "pciesvc.lib");
180180

181181
ret = kpcimgr_module_register(&mod, ep, 1);
182182
if (ret) {

0 commit comments

Comments
 (0)