How do I create a multi-select checkbox field in a content entity?
This configuration worked for me:

 $fields['device'] = BaseFieldDefinition::create("list_string")
      -&gt;setSetting('allowed_values', ['desktop'=&gt;'Desktop', 'mobile'=&gt;'Mobile', 'na'=&gt;'N/A'])
      -&gt;setLabel('Device')
      -&gt;setDescription('Select associated devices')
      -&gt;setRequired(TRUE)
      -&gt;setCardinality(-1)
      -&gt;setDisplayOptions('form', array(
        'type' =&gt; 'options_buttons',
        'weight' =&gt; 6
      ))
      -&gt;setDisplayConfigurable('form', TRUE);