meta-inventec: add meta-starscream machine
The meta-starscream equipped with Aspeed AST2600 BMC SoC.
Tested: Build Starscream image and load on the target hardware.
Change-Id: I8c37a9f11980e3273e4c21ce80d23500c870895c
Signed-off-by: Jason Lin Ying Yen <lin.jasonyy@inventec.com>
diff --git a/meta-inventec/meta-starscream/recipes-phosphor/image/obmc-phosphor-image.bbappend b/meta-inventec/meta-starscream/recipes-phosphor/image/obmc-phosphor-image.bbappend
new file mode 100644
index 0000000..5dec1a2
--- /dev/null
+++ b/meta-inventec/meta-starscream/recipes-phosphor/image/obmc-phosphor-image.bbappend
@@ -0,0 +1,6 @@
+inherit extrausers
+
+EXTRA_USERS_PARAMS:append = " \
+useradd -e '' -ou 0 -d /home/root -G priv-admin,root,sudo,ipmi,web,redfish -p 'gzW59equAcJAg' sysadmin; \
+useradd -e '' -ou 0 -d /home/root -G priv-admin,root,sudo,ipmi,web,redfish -p 'kFdHdjRkot8KQ' admin; \
+"
diff --git a/meta-inventec/meta-starscream/recipes-phosphor/init/starscream-init.bb b/meta-inventec/meta-starscream/recipes-phosphor/init/starscream-init.bb
new file mode 100644
index 0000000..89bf463
--- /dev/null
+++ b/meta-inventec/meta-starscream/recipes-phosphor/init/starscream-init.bb
@@ -0,0 +1,25 @@
+SUMMARY = "starscream init service"
+DESCRIPTION = "Essential init commands for starscream"
+PR = "r1"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+inherit obmc-phosphor-systemd
+
+DEPENDS += "systemd"
+RDEPENDS:${PN} += "libsystemd"
+
+
+FILESEXTRAPATHS:prepend := "${THISDIR}/starscream-init:"
+SRC_URI += "file://starscream-init.sh \
+"
+
+S = "${WORKDIR}"
+
+do_install() {
+ install -d ${D}${sbindir}
+ install -m 0755 starscream-init.sh ${D}${sbindir}
+}
+
+SYSTEMD_SERVICE:${PN} += "starscream-init.service"
diff --git a/meta-inventec/meta-starscream/recipes-phosphor/init/starscream-init/starscream-init.service b/meta-inventec/meta-starscream/recipes-phosphor/init/starscream-init/starscream-init.service
new file mode 100644
index 0000000..c6410ad
--- /dev/null
+++ b/meta-inventec/meta-starscream/recipes-phosphor/init/starscream-init/starscream-init.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Essential init commands for starscream
+
+[Service]
+Type=oneshot
+RemainAfterExit=true
+ExecStart=/usr/sbin/starscream-init.sh
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta-inventec/meta-starscream/recipes-phosphor/init/starscream-init/starscream-init.sh b/meta-inventec/meta-starscream/recipes-phosphor/init/starscream-init/starscream-init.sh
new file mode 100644
index 0000000..c062f19
--- /dev/null
+++ b/meta-inventec/meta-starscream/recipes-phosphor/init/starscream-init/starscream-init.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+# Set BMC ready
+gpioset "$(gpiofind BMC_READY)"=0
+echo BMC ready !!
diff --git a/meta-inventec/meta-starscream/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend b/meta-inventec/meta-starscream/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend
new file mode 100644
index 0000000..c0acaea
--- /dev/null
+++ b/meta-inventec/meta-starscream/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend
@@ -0,0 +1 @@
+FILESEXTRAPATHS:prepend:starscream := "${THISDIR}/${PN}:"
diff --git a/meta-inventec/meta-starscream/recipes-phosphor/ipmi/phosphor-ipmi-config/channel_config.json b/meta-inventec/meta-starscream/recipes-phosphor/ipmi/phosphor-ipmi-config/channel_config.json
new file mode 100644
index 0000000..08a410f
--- /dev/null
+++ b/meta-inventec/meta-starscream/recipes-phosphor/ipmi/phosphor-ipmi-config/channel_config.json
@@ -0,0 +1,57 @@
+{
+ "1" : {
+ "name" : "eth1",
+ "is_valid" : true,
+ "active_sessions" : 0,
+ "channel_info" : {
+ "medium_type" : "lan-802.3",
+ "protocol_type" : "ipmb-1.0",
+ "session_supported" : "multi-session",
+ "is_ipmi" : true
+ }
+ },
+ "2" : {
+ "name" : "eth0",
+ "is_valid" : true,
+ "active_sessions" : 0,
+ "channel_info" : {
+ "medium_type" : "lan-802.3",
+ "protocol_type" : "ipmb-1.0",
+ "session_supported" : "multi-session",
+ "is_ipmi" : true
+ }
+ },
+ "3" : {
+ "name" : "usb0",
+ "is_valid" : true,
+ "active_sessions" : 0,
+ "channel_info" : {
+ "medium_type" : "lan-802.3",
+ "protocol_type" : "ipmb-1.0",
+ "session_supported" : "multi-session",
+ "is_ipmi" : true
+ }
+ },
+ "8" : {
+ "name" : "INTRABMC",
+ "is_valid" : true,
+ "active_sessions" : 0,
+ "channel_info" : {
+ "medium_type" : "oem",
+ "protocol_type" : "oem",
+ "session_supported" : "session-less",
+ "is_ipmi" : true
+ }
+ },
+ "15" : {
+ "name" : "ipmi_kcs3",
+ "is_valid" : true,
+ "active_sessions" : 0,
+ "channel_info" : {
+ "medium_type" : "system-interface",
+ "protocol_type" : "kcs",
+ "session_supported" : "session-less",
+ "is_ipmi" : true
+ }
+ }
+}
diff --git a/meta-inventec/meta-starscream/recipes-phosphor/ipmi/phosphor-ipmi-config/dev_id.json b/meta-inventec/meta-starscream/recipes-phosphor/ipmi/phosphor-ipmi-config/dev_id.json
new file mode 100644
index 0000000..4a2602a
--- /dev/null
+++ b/meta-inventec/meta-starscream/recipes-phosphor/ipmi/phosphor-ipmi-config/dev_id.json
@@ -0,0 +1,8 @@
+{
+ "id": 1,
+ "revision": 128,
+ "addn_dev_support": 207,
+ "manuf_id": 6569,
+ "prod_id": 91,
+ "aux": 0
+}
diff --git a/meta-inventec/meta-starscream/recipes-phosphor/ipmi/phosphor-ipmi-net_%.bbappend b/meta-inventec/meta-starscream/recipes-phosphor/ipmi/phosphor-ipmi-net_%.bbappend
new file mode 100755
index 0000000..95f7c75
--- /dev/null
+++ b/meta-inventec/meta-starscream/recipes-phosphor/ipmi/phosphor-ipmi-net_%.bbappend
@@ -0,0 +1 @@
+RMCPP_IFACE = "eth1"
diff --git a/meta-inventec/meta-starscream/recipes-phosphor/leds/starscream-led-manager-config-native.bb b/meta-inventec/meta-starscream/recipes-phosphor/leds/starscream-led-manager-config-native.bb
new file mode 100644
index 0000000..ba88a9a
--- /dev/null
+++ b/meta-inventec/meta-starscream/recipes-phosphor/leds/starscream-led-manager-config-native.bb
@@ -0,0 +1,20 @@
+SUMMARY = "Phosphor LED Group Management for Starscream"
+PR = "r1"
+
+#Common code for packages distributed without a license that want Apache-2.0.
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+inherit native
+
+PROVIDES += "virtual/phosphor-led-manager-config-native"
+
+SRC_URI += "file://led.yaml"
+S = "${WORKDIR}"
+
+# Copies example led layout yaml file
+do_install() {
+ SRC=${S}
+ DEST=${D}${datadir}/phosphor-led-manager
+ install -D ${SRC}/led.yaml ${DEST}/led.yaml
+}
diff --git a/meta-inventec/meta-starscream/recipes-phosphor/leds/starscream-led-manager-config/led.yaml b/meta-inventec/meta-starscream/recipes-phosphor/leds/starscream-led-manager-config/led.yaml
new file mode 100644
index 0000000..73bdd88
--- /dev/null
+++ b/meta-inventec/meta-starscream/recipes-phosphor/leds/starscream-led-manager-config/led.yaml
@@ -0,0 +1,15 @@
+bmc_booted:
+ HB_LED:
+ Action: 'Blink'
+ DutyOn: 50
+ Period: 1000
+
+enclosure_identify:
+ UID_LED:
+ Action: 'On'
+
+enclosure_identify_blink:
+ UID_LED:
+ Action: 'Blink'
+ DutyOn: 50
+ Period: 1000
diff --git a/meta-inventec/meta-starscream/recipes-phosphor/settings/phosphor-settings-manager/chassis-capabilities.override.yml b/meta-inventec/meta-starscream/recipes-phosphor/settings/phosphor-settings-manager/chassis-capabilities.override.yml
new file mode 100644
index 0000000..59fd947
--- /dev/null
+++ b/meta-inventec/meta-starscream/recipes-phosphor/settings/phosphor-settings-manager/chassis-capabilities.override.yml
@@ -0,0 +1,23 @@
+/xyz/openbmc_project/control/host0/chassis_cap:
+ - Interface: xyz.openbmc_project.Control.ChassisCapabilities
+ Properties:
+ CapabilitiesFlags:
+ Default: 0
+ ChassisIntrusionEnabled:
+ Default: 'false'
+ ChassisFrontPanelLockoutEnabled:
+ Default: 'false'
+ ChassisNMIEnabled:
+ Default: 'false'
+ ChassisPowerInterlockEnabled:
+ Default: 'false'
+ FRUDeviceAddress:
+ Default: 32
+ SDRDeviceAddress:
+ Default: 32
+ SELDeviceAddress:
+ Default: 32
+ SMDeviceAddress:
+ Default: 32
+ BridgeDeviceAddress:
+ Default: 32
diff --git a/meta-inventec/meta-starscream/recipes-phosphor/settings/phosphor-settings-manager_%.bbapend b/meta-inventec/meta-starscream/recipes-phosphor/settings/phosphor-settings-manager_%.bbapend
new file mode 100644
index 0000000..449e327
--- /dev/null
+++ b/meta-inventec/meta-starscream/recipes-phosphor/settings/phosphor-settings-manager_%.bbapend
@@ -0,0 +1,3 @@
+FILESEXTRAPATHS:append:starscream := ":${THISDIR}/${PN}"
+SRC_URI:append:starscream = " file://chassis-capabilities.override.yml \
+ "