summaryrefslogtreecommitdiffstats
path: root/meta-agl-bsp/conf/include/agl_porter-nogfx.inc
blob: cb7b4a56011df946a50d4673e48a1f793bd2c3b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
MACHINE = "porter"

# For Bluetooth hardware support
BT_KERNEL_MODULES = " \
    kernel-module-btusb \
    kernel-module-bnep \
    kernel-module-rfcomm \
    kernel-module-rfkill \
    "

# Distribution-specific runtime components
IMAGE_INSTALL_append = " \
    ${@bb.utils.contains("DISTRO_FEATURES", "bluetooth", "${BT_KERNEL_MODULES}", "", d)} \
    "

# Setting for u-boot Wayland
UBOOT_MACHINE = "porter_vin_config"

PREFERRED_PROVIDER_virtual/libgles2 = "mesa"
PREFERRED_PROVIDER_virtual/egl = "mesa"

# Build updatable image. Only takes effect when sota.bbclass is inherited
DISTRO_FEATURES_append = " sota"
// EventUnRegisterArgs Parameters of /events/unregister command type EventUnRegisterArgs struct { Name string `json:"name"` ID int `json:"id"` } // EventMsg Message send type EventMsg struct { Time string `json:"time"` FromSessionID string `json:"sessionID"` // Session ID of client who produce this event Type string `json:"type"` Data interface{} `json:"data"` // Data } // EventEvent Event send in WS when an internal event (eg. Syncthing event is received) const ( // EventTypePrefix Used as event prefix EventTypePrefix = "event:" // following by event type // Supported Events type EVTAll = EventTypePrefix + "all" EVTFolderChange = EventTypePrefix + "folder-change" // type EventMsg with Data type xsapiv1.FolderConfig EVTFolderStateChange = EventTypePrefix + "folder-state-change" // type EventMsg with Data type xsapiv1.FolderConfig EVTSDKAdd = EventTypePrefix + "sdk-add" // type EventMsg with Data type xsapiv1.SDK EVTSDKRemove = EventTypePrefix + "sdk-remove" // type EventMsg with Data type xsapiv1.SDK EVTSDKManagement = EventTypePrefix + "sdk-management" // type EventMsg with Data type xsapiv1.SDKManagementMsg EVTSDKStateChange = EventTypePrefix + "sdk-state-change" // type EventMsg with Data type xsapiv1.SDK ) // EVTAllList List of all supported events var EVTAllList = []string{ EVTFolderChange, EVTFolderStateChange, EVTSDKAdd, EVTSDKRemove, EVTSDKManagement, EVTSDKStateChange, } // DecodeFolderConfig Helper to decode Data field type FolderConfig func (e *EventMsg) DecodeFolderConfig() (FolderConfig, error) { var err error f := FolderConfig{} switch e.Type { case EVTFolderChange, EVTFolderStateChange: d := []byte{} d, err = json.Marshal(e.Data) if err == nil { err = json.Unmarshal(d, &f) } default: err = fmt.Errorf("Invalid type") } return f, err } // DecodeSDKEvent Helper to decode Data field type SDK func (e *EventMsg) DecodeSDKEvent() (SDK, error) { var err error s := SDK{} switch e.Type { case EVTSDKAdd, EVTSDKRemove, EVTSDKStateChange: d := []byte{} d, err = json.Marshal(e.Data) if err == nil { err = json.Unmarshal(d, &s) } default: err = fmt.Errorf("Invalid type") } return s, err }