DEVice

Device add/remove

DEVice

Shortest form: dev.

Attach and bring up a unit, or detach it. The unit is given as Unit=<n> and defaults to the current unit (0). The words attach and detach must be spelt out in full.

Warning

Both forms rebuild or remove the SDK’s state for the unit. Under SONiC, unit 0 belongs to syncd; never run this on a production switch.

Unvalidated

drivshell> device detach Unit=0
device attach [Unit=<n>]

Probe for devices, attach the unit, initialise the chip, load the Cancun files, set up the MMU and attach the BCM driver. Fails with Unit already attached if the unit is attached, which unit 0 always is under SONiC.

Unvalidated

drivshell> device attach Unit=0
device detach [Unit=<n>]

Detach the unit. Prints unit <n> already detached if it is not attached.

Unvalidated

drivshell> device detach Unit=0

Built-in help

Usages:
      device attach [<unit>=<id>]
      device detach [<unit>=<id>]

Further reading

BCM_SDK命令.