Skip to content
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

How can I modify broadcom chip register value on boot #1686

Closed
ForzaTian opened this issue May 9, 2018 · 4 comments
Closed

How can I modify broadcom chip register value on boot #1686

ForzaTian opened this issue May 9, 2018 · 4 comments

Comments

@ForzaTian
Copy link

Now I'm developing a new project based on BCM56960, according to actual demand, I need to modify some register value, I can use command " bcmcmd -v "m *****" "after sonic bootup.But it's not convient for client use. So is there any way to modify register value on booting time?
Many thanks for your help.

@zhenggen-xu
Copy link
Collaborator

would it work if you just add those commands into a script and let your start script to call it after syncd is up?

@ForzaTian
Copy link
Author

@zhenggen-xu ,thanks for your reply. I have tried to add the commands in start script, but according to boot up flow, broadcom's sdk haven't been initialized when start script is executing, so the command can't work as expect.
So how can I execute those command after syncd is up?
Thanks for your advice again.

@richard28530
Copy link
Contributor

richard28530 commented May 14, 2018

you can refer to led_proc_init.soc

/brcm-build/platform/broadcom$ ack led_proc_init.soc
docker-syncd-brcm/start.sh
36:if [ -r ${PLATFORM_DIR}/led_proc_init.soc ]; then
38: /usr/bin/bcmcmd -t 60 "rcload ${PLATFORM_DIR}/led_proc_init.soc"

@ForzaTian
Copy link
Author

@richard28530 Thanks for your advice. It seems can be used by my scrip.

@lguohan lguohan closed this as completed Aug 12, 2018
dgsudharsan added a commit to dgsudharsan/sonic-buildimage that referenced this issue Jun 22, 2021
5708497 [show] fix show version (sonic-net#1686)
9041ba0 [config] Adding sanity checks for config reload (sonic-net#1664)
2cdadb5 [config]: Create portchannel with LACP key (sonic-net#1473)
6f74ba5 [vnet_route_check] Fix logic for getting VNET routes from ASIC DB (sonic-net#1653)
54fee0f Add range check on portchannel min-links (sonic-net#1630)
jleveque pushed a commit that referenced this issue Jun 25, 2021
5708497 [show] fix show version (#1686)
9041ba0 [config] Adding sanity checks for config reload (#1664)
2cdadb5 [config]: Create portchannel with LACP key (#1473)
6f74ba5 [vnet_route_check] Fix logic for getting VNET routes from ASIC DB (#1653)
54fee0f Add range check on portchannel min-links (#1630)
stephenxs added a commit to stephenxs/sonic-buildimage that referenced this issue Jun 29, 2021
3226163 [BufferOrch] Don't call SAI API for BUFFER_POOL/PROFILE handling in case the op is DEL and the SAI OID is NULL (sonic-net#1786)
6c88e47 [Dynamic Buffer Calc][Mellanox] Bug fixes and enhancements for the lua plugins for buffer pool calculation and headroom checking (sonic-net#1781)
e86b900 [MPLS] sonic-swss changes for MPLS (sonic-net#1686)
4c8e2b5 [Dynamic Buffer Calc] Avoid creating lossy PG for admin down ports during initialization (sonic-net#1776)
3602124 [VS test stability] Skip flaky test for DPB (sonic-net#1807)
c37cc1c Support for in-band-mgmt via management VRF (sonic-net#1726)
1e3a532 Fix config prompt question issue (sonic-net#1799)

Signed-off-by: Stephen Sun <[email protected]>
qiluo-msft pushed a commit that referenced this issue Jul 17, 2021
List of commits (newest first):

sonic-net/sonic-utilities@0efd297 (origin/master, origin/HEAD) mclag enhancements as per HLD at sonic-net/SONiC#596 (#1138)
sonic-net/sonic-utilities@e98bbb6 Reworked IP validation in "config interface ip add/remove" command (#1709)
sonic-net/sonic-utilities@866d1d7 [minigraph][port_config] Consume port_config.json while reloading minigraph (#1705)
sonic-net/sonic-utilities@9ae6f6b [debug dump util] Match Infrastructure (#1666)
sonic-net/sonic-utilities@8fe7e26 Coverage uses top level directory as source (#1711)
sonic-net/sonic-utilities@3f0b690 [MPLS][CLI] added config/show CLI for MPLS interface, MPLS CRM threshold config, updated CLI reference manual
sonic-net/sonic-utilities@e8b6c5c [ci] Fix python coverage color bar (#1692)
sonic-net/sonic-utilities@888701b [Mellanox] Remove mstdump from Mellanoxs collect dump script (#1706)
sonic-net/sonic-utilities@4818360 [sonic-package-manager] support warm/fast reboot for extension packages (#1554)
sonic-net/sonic-utilities@793b847 [show priority-group drop counters] Remove backup with cached PG drop counters after 'config reload' (#1679)
sonic-net/sonic-utilities@24fe1ac [show][config] support for interface alias for muxcable commands (#1699)
sonic-net/sonic-utilities@186d851 Pcieutil to load the platform api first instead of using common api (#1672)
sonic-net/sonic-utilities@7a82c06 [Mellanox] Update mellanox dump generation to include SDK dumps (#1640)
sonic-net/sonic-utilities@38f8c06 [sfputil] Expose error status fetched from STATE_DB or platform API to CLI (#1658)
sonic-net/sonic-utilities@c5d00ae [pfcwd] Fix the return code in invalid case (#1691)
sonic-net/sonic-utilities@57dc403 [ci]: Fix config prompt question issue (#1693)
sonic-net/sonic-utilities@5708497 [show] fix show version (#1686)
sonic-net/sonic-utilities@9041ba0 [config] Adding sanity checks for config reload (#1664)
sonic-net/sonic-utilities@2cdadb5 [config]: Create portchannel with LACP key (#1473)
sonic-net/sonic-utilities@6f74ba5 [vnet_route_check] Fix logic for getting VNET routes from ASIC DB (#1653)
sonic-net/sonic-utilities@54fee0f Add range check on portchannel min-links (#1630)
carl-nokia pushed a commit to carl-nokia/sonic-buildimage that referenced this issue Aug 7, 2021
5708497 [show] fix show version (sonic-net#1686)
9041ba0 [config] Adding sanity checks for config reload (sonic-net#1664)
2cdadb5 [config]: Create portchannel with LACP key (sonic-net#1473)
6f74ba5 [vnet_route_check] Fix logic for getting VNET routes from ASIC DB (sonic-net#1653)
54fee0f Add range check on portchannel min-links (sonic-net#1630)
carl-nokia pushed a commit to carl-nokia/sonic-buildimage that referenced this issue Aug 7, 2021
List of commits (newest first):

sonic-net/sonic-utilities@0efd297 (origin/master, origin/HEAD) mclag enhancements as per HLD at sonic-net/SONiC#596 (sonic-net#1138)
sonic-net/sonic-utilities@e98bbb6 Reworked IP validation in "config interface ip add/remove" command (sonic-net#1709)
sonic-net/sonic-utilities@866d1d7 [minigraph][port_config] Consume port_config.json while reloading minigraph (sonic-net#1705)
sonic-net/sonic-utilities@9ae6f6b [debug dump util] Match Infrastructure (sonic-net#1666)
sonic-net/sonic-utilities@8fe7e26 Coverage uses top level directory as source (sonic-net#1711)
sonic-net/sonic-utilities@3f0b690 [MPLS][CLI] added config/show CLI for MPLS interface, MPLS CRM threshold config, updated CLI reference manual
sonic-net/sonic-utilities@e8b6c5c [ci] Fix python coverage color bar (sonic-net#1692)
sonic-net/sonic-utilities@888701b [Mellanox] Remove mstdump from Mellanoxs collect dump script (sonic-net#1706)
sonic-net/sonic-utilities@4818360 [sonic-package-manager] support warm/fast reboot for extension packages (sonic-net#1554)
sonic-net/sonic-utilities@793b847 [show priority-group drop counters] Remove backup with cached PG drop counters after 'config reload' (sonic-net#1679)
sonic-net/sonic-utilities@24fe1ac [show][config] support for interface alias for muxcable commands (sonic-net#1699)
sonic-net/sonic-utilities@186d851 Pcieutil to load the platform api first instead of using common api (sonic-net#1672)
sonic-net/sonic-utilities@7a82c06 [Mellanox] Update mellanox dump generation to include SDK dumps (sonic-net#1640)
sonic-net/sonic-utilities@38f8c06 [sfputil] Expose error status fetched from STATE_DB or platform API to CLI (sonic-net#1658)
sonic-net/sonic-utilities@c5d00ae [pfcwd] Fix the return code in invalid case (sonic-net#1691)
sonic-net/sonic-utilities@57dc403 [ci]: Fix config prompt question issue (sonic-net#1693)
sonic-net/sonic-utilities@5708497 [show] fix show version (sonic-net#1686)
sonic-net/sonic-utilities@9041ba0 [config] Adding sanity checks for config reload (sonic-net#1664)
sonic-net/sonic-utilities@2cdadb5 [config]: Create portchannel with LACP key (sonic-net#1473)
sonic-net/sonic-utilities@6f74ba5 [vnet_route_check] Fix logic for getting VNET routes from ASIC DB (sonic-net#1653)
sonic-net/sonic-utilities@54fee0f Add range check on portchannel min-links (sonic-net#1630)
theasianpianist pushed a commit to theasianpianist/sonic-buildimage that referenced this issue Feb 5, 2022
SONiC swss support for MPLS:

* RouteOrch support for SAI MPLS inseg
* NeighOrch support for MPLS NHs.
* CrmOrch support for MPLS inseg and NH accounting.
* New sonic-swss/tests/test_mpls.py for verification.

Unit-tests in sonic-swss/tests/test_mpls.py and sonic-utilities/tests
theasianpianist pushed a commit to theasianpianist/sonic-buildimage that referenced this issue Feb 5, 2022
…c-net#1823)

VOQ nexthop for remote neighbors should be created on local inband port only for the kernel purpose. SAI should use actual RIF of the remote system port interface. sonic-net#1686 seems to be break this condition and this change address it.
taras-keryk pushed a commit to taras-keryk/sonic-buildimage that referenced this issue Apr 28, 2022
#### What I did
Fix `NameError` from `show version`.
```
admin@str2-7050cx3-acs-02:~$ show version
Traceback (most recent call last):
  File "/usr/local/bin/show", line 8, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/show/main.py", line 960, in version
    chassis_info = platform.get_chassis_info()
  File "/usr/local/lib/python3.7/dist-packages/show/platform.py", line 27, in get_chassis_info
    platform_chassis = sonic_platform.platform.Platform().get_chassis()
NameError: name 'sonic_platform' is not defined
```

#### How I did it
Import `sonic_platform` before using `sonic_platform`.

Signed-off-by: Longxiang Lyu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants