Skip to content

Commit e6ba75a

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

25 files changed

+1914
-8486
lines changed

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

platform/pensando/platform.conf

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ DATA_PARTUUID=6ED62003-DD8D-44B8-9538-0A2B7C7E628F
2323
ROOT_PARTUUID=C7F48DD2-C265-404B-959D-C64D21D49168
2424

2525
ROOT_PARTSIZE=24G
26+
EMMC_MIN_SIZE=32G
2627

2728
exec 0< /dev/tty 1> /dev/tty 2> /dev/tty
2829

@@ -44,7 +45,7 @@ fatal()
4445

4546
check_existing_parts()
4647
{
47-
local nparts i partuuid boot_partsize boot_lastsec data_firstsec
48+
local nparts i partuuid boot_partsize boot_lastsec data_firstsec emmc_min_size_gb emmc_size
4849

4950
if [ -z "$running_cpld_id" ]; then
5051
if [ "$install_env" = "onie" ]; then
@@ -63,6 +64,13 @@ check_existing_parts()
6364
esac
6465
done
6566

67+
emmc_size=$(fdisk -l | grep "/dev/mmcblk0:" | awk '{print $3}')
68+
emmc_min_size_gb=${EMMC_MIN_SIZE%G}
69+
emmc_size=${emmc_size%.*}
70+
if [ $emmc_size -lt $emmc_min_size_gb ]; then
71+
ROOT_PARTSIZE=12G
72+
fi
73+
6674
if [ $root_pn -ne 0 ]; then
6775
boot_partsize=$(sgdisk -i $root_pn /dev/mmcblk0 | awk -F '[( ]' '/Partition size/ {print int($6)}')
6876
boot_lastsec=$(sgdisk -i $root_pn /dev/mmcblk0 | awk '/Last sector/ {print $3}')
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[Unit]
2+
Description=Pensando DPU health status provider and chassis state db util service
3+
Requires=system-health.service
4+
After=system-health.service
5+
6+
[Service]
7+
ExecStartPre=/bin/sleep 75
8+
ExecStart= python3 /usr/local/bin/dpu_db_util.py &
9+
Restart=always
10+
StandardOutput=syslog+console
11+
StandardError=syslog+console
12+
13+
[Install]
14+
WantedBy=multi-user.target

platform/pensando/sonic-platform-modules-dpu/dpu/service/dpu-health-status.service

Lines changed: 0 additions & 13 deletions
This file was deleted.
Binary file not shown.

0 commit comments

Comments
 (0)