-
Notifications
You must be signed in to change notification settings - Fork 270
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
modify syncd init script for supporting yml #1411
base: master
Are you sure you want to change the base?
Conversation
if [ ! -z "$PLT_CONFIG_YML" ] && [ -f $PLATFORM_DIR/common_config_support ]; then | ||
cp -f $HWSKU_DIR/*.config.yml /tmp | ||
cp -f /etc/sai.d/sai.profile /tmp | ||
CONFIG_YML=$(find /tmp -name '*.yml') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@geans-pin what about this config.bcm file? It doesn't have .yml suffix, but it is yaml format, how to deal with it? https://github.com/sonic-net/sonic-buildimage/blob/b73d613bf581076192dd0150cb35d6d2de6645b1/device/arista/x86_64-arista_7060dx5_64s/Arista-7060DX5-64S/th4-a7060dx5-64s.config.bcm#L4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use the file name .yml suffix to identify the file format. Can you change the sai.profile and *.config.bcm to *.yml as following BRCM SDK rule ?
what is motivation here? please provide extended descrption for this pr |
I had added the comment to remind this in HLD. Please check the PR of HLD |
still not description in PR and seems like build is failing |
Also, in the HLD PR. Please check the following description. #Note, the Overwrite Section should be located after normal section in the common config file, otherwise the logic will overwrite all properties |
here: #1411 (comment) no description |
With the new fix, we don't have this limitation. So, we don't need the comment now. Geans |
61e80b3
to
0a5fcb7
Compare
syncd/scripts/syncd_init_common.sh
Outdated
fi | ||
|
||
if [ ! -z "$PLT_CONFIG_BCM" ] && [ -f $PLATFORM_DIR/common_config_support ] ; then | ||
cp -f $HWSKU_DIR/*.config.bcm /tmp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there is no *.config.bcm doesn't exist, this command will fail. Need to check /etc/said.d/profile and find out where is the config.bcm file then copy it to /tmp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So far the script does search the sai.profile to find platform config.
The following copied escaped from the fix.
Can you try the following change for line#250 to see if works ? I will fix it in the PR.
cp -f $HWSKU_DIR/*.config.bcm /tmp => cp -f $PLT_CONFIG_BCM /tmp
Geans
for file in $CONFIG_BCM; do | ||
merge_config_bcm_files $file $COMMON_CONFIG_BCM "chip common properties" | ||
done | ||
echo "Merging $PLT_CONFIG_BCM with $COMMON_CONFIG_BCM, merge files stored in $CONFIG_BCM" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For 7260 hwsku, no config.bcm, just config.bcm.j2.
The merged file doesn't exist, and caused syncd can't boot up.
2024 Nov 14 05:02:27.495014 str2-7260cx3-acs-9 INFO syncd#supervisord: syncd Merging /etc/sai.d/config.bcm with /usr/share/sonic/device/x86_64-broadcom_common/x86_64-broadcom_b97/broadcom-sonic-th2.config.bcm, merge files stored in
2024 Nov 14 05:02:27.505237 str2-7260cx3-acs-9 INFO syncd#supervisord: syncd cp: cannot stat '/tmp/*.bcm': No such file or directory
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So far the script does search the sai.profile to find platform config.
The following copied escaped from the fix.
Can you try the following change for line#250 to see if works ? I will fix it in the PR.
cp -f $HWSKU_DIR/*.config.bcm /tmp => cp -f $PLT_CONFIG_BCM /tmp
Geans
No description provided.