Skip to content

Commit

Permalink
update device-data and otn config_setup
Browse files Browse the repository at this point in the history
  • Loading branch information
sonic-otn committed Nov 21, 2023
1 parent 2eb6be8 commit 779c517
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
8 changes: 7 additions & 1 deletion files/image_config/config-setup/config-setup
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,12 @@ boot_config()
# file system to trigger. pending_config_initialization will remain set
# for multi-npu platforms if we reach this case.
if [[ ($NUM_ASIC -gt 1) ]]; then
return 0
# For otn platform, do config initialization here
if [[ $PALTFROM_ASIC = ot-* ]]; then
echo "init otn configuration"
else
return 0
fi
fi

if [ -e /tmp/pending_config_initialization ] || [ -e ${CONFIG_SETUP_INITIALIZATION_FLAG} ]; then
Expand Down Expand Up @@ -466,6 +471,7 @@ ASIC_CONF=/usr/share/sonic/device/$PLATFORM/asic.conf
if [[ -f "$ASIC_CONF" ]]; then
source $ASIC_CONF
fi
PALTFROM_ASIC=`cat /usr/share/sonic/device/$PLATFORM/platform_asic`


CMD=$1
Expand Down
Empty file modified files/scripts/otss.sh
100644 → 100755
Empty file.
5 changes: 4 additions & 1 deletion src/sonic-device-data/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ SHELL = /bin/bash
.SHELLFLAGS += -e

MAIN_TARGET = sonic-device-data_$(SONIC_DEVICE_DATA_VERSION_FULL)_all.deb
DEVICE_ROOT := $(if $(shell cat ../../.platform | grep 'ot-'),ot-device,device)

$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
pushd ./src
Expand All @@ -12,8 +13,9 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :

# Create a new dir and copy all ONIE-platform-string-named dirs into it
mkdir ./device
cp -r -L ../../../device/*/* ./device/
cp -r -L ../../../${DEVICE_ROOT}/*/* ./device/

ifeq ($(DEVICE_ROOT), device)
# Create hwsku for virtual switch
for d in `find -L ../../../device -maxdepth 3 -mindepth 3 -type d | grep -vE "(plugins|led-code)"`; do \
cp -Lr $$d device/x86_64-kvm_x86_64-r0/ ; \
Expand All @@ -24,6 +26,7 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
grep -v ^# device/x86_64-kvm_x86_64-r0/$$(basename $$d)/port_config.ini | awk '{i=i+1;print "eth"i":"$$2}' > device/x86_64-kvm_x86_64-r0/$$(basename $$d)/lanemap.ini

done;
endif

# Build the package
ifeq ($(CROSS_BUILD_ENVIRON), y)
Expand Down

0 comments on commit 779c517

Please sign in to comment.