Skip to content

Commit

Permalink
meta-inventec: add meta-starscream machine
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
jason-lin-yy authored and williamspatrick committed Jan 9, 2024
1 parent f8176d5 commit b765e11
Show file tree
Hide file tree
Showing 21 changed files with 312 additions and 1 deletion.
3 changes: 2 additions & 1 deletion meta-inventec/OWNERS
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
owners:
- mohammedhabeebinventec
- [email protected]
- [email protected]
11 changes: 11 additions & 0 deletions meta-inventec/meta-starscream/conf/layer.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# We have a conf and classes directory, add to BBPATH
BBPATH .= ":${LAYERDIR}"

# We have recipes-* directories, add to BBFILES
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
${LAYERDIR}/recipes-*/*/*.bbappend"

BBFILE_COLLECTIONS += "starscream"
BBFILE_PATTERN_starscream = "^${LAYERDIR}/"
BBFILE_PRIORITY_starscream = "7"
LAYERSERIES_COMPAT_starscream = "nanbield scarthgap"
21 changes: 21 additions & 0 deletions meta-inventec/meta-starscream/conf/machine/platform_configs.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# This include file is aim to pass variables to bb/bb.apppend files,
# such as sysguid tool, and easily maintain platform settings


##################### Configure default EEPROM setting #####################
### The I2C bus is "0 based, decimal"
### The address and offset are "hexcimal"
### e.g.
### EEPROM_GUID_I2C_BUS = "3"
### EEPROM_GUID_I2C_ADDRESS = "0x54"
### EEPROM_GUID_OFFSET = "0x1F00"

EEPROM_GUID_I2C_BUS= "3"
EEPROM_GUID_I2C_ADDRESS = "0x54"
EEPROM_GUID_OFFSET = "0x1F00"

EEPROM_MAC_I2C_BUS = "14"
EEPROM_MAC_I2C_ADDRESS = "0x50"
EEPROM_MAC_OFFSET = "0x1000"

############################################################################
14 changes: 14 additions & 0 deletions meta-inventec/meta-starscream/conf/machine/starscream.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
KMACHINE = "aspeed"
KERNEL_DEVICETREE = "aspeed/${KMACHINE}-bmc-inventec-${MACHINE}.dtb"

require conf/machine/include/ast2600.inc
require conf/machine/include/obmc-bsp-common.inc
require conf/machine/include/inventec.inc

UBOOT_MACHINE = "ast2600_openbmc_spl_defconfig"
UBOOT_DEVICETREE = "ast2600-evb"
SPL_BINARY = "spl/u-boot-spl.bin"
SOCSEC_SIGN_ENABLE = "0"

# To build a 64MB image, set FLASH_SIZE value to "65536".
FLASH_SIZE = "65536"
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf
# changes incompatibly
LCONF_VERSION = "8"

BBPATH = "${TOPDIR}"
BBFILES ?= ""

BBLAYERS ?= " \
##OEROOT##/meta \
##OEROOT##/meta-poky \
##OEROOT##/meta-openembedded/meta-oe \
##OEROOT##/meta-openembedded/meta-networking \
##OEROOT##/meta-openembedded/meta-perl \
##OEROOT##/meta-openembedded/meta-python \
##OEROOT##/meta-phosphor \
##OEROOT##/meta-aspeed \
##OEROOT##/meta-inventec \
##OEROOT##/meta-inventec/meta-starscream \
"
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Common targets are:
obmc-phosphor-image
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
MACHINE ?= "starscream"
DISTRO ?= "openbmc-phosphor"
PACKAGE_CLASSES ?= "package_ipk"
SANITY_TESTED_DISTROS:append ?= " *"
EXTRA_IMAGE_FEATURES ?= "debug-tweaks"
USER_CLASSES ?= "buildstats"
PATCHRESOLVE = "noop"
BB_DISKMON_DIRS ??= "\
STOPTASKS,${TMPDIR},1G,100K \
STOPTASKS,${DL_DIR},1G,100K \
STOPTASKS,${SSTATE_DIR},1G,100K \
STOPTASKS,/tmp,100M,100K \
HALT,${TMPDIR},100M,1K \
HALT,${DL_DIR},100M,1K \
HALT,${SSTATE_DIR},100M,1K \
HALT,/tmp,10M,1K"
PACKAGECONFIG:append:pn-qemu-system-native = " sdl"
PACKAGECONFIG:append:pn-nativesdk-qemu = " sdl"
CONF_VERSION = "2"
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
CONFIG_SLAB=y
CONFIG_ARCH_MULTI_V6=y
CONFIG_SECCOMP=y
CONFIG_ZBOOT_ROM_TEXT=0x0
CONFIG_ZBOOT_ROM_BSS=0x0
CONFIG_FIRMWARE_MEMMAP=y
# CONFIG_BLK_DEV_BSG is not set
# CONFIG_BLK_DEBUG_FS is not set
COFIG_NCSI_OEM_CMD_GET_MAC=y
CONFIG_PCI=y
CONFIG_MTD_UBI=y
CONFIG_MTD_UBI_FASTMAP=y
CONFIG_MTD_UBI_BLOCK=y
CONFIG_NET_VENDOR_INTEL=y
# CONFIG_SERIO is not set
CONFIG_I2C_MUX=y
CONFIG_GPIO_ASPEED_SGPIO=y
CONFIG_SENSORS_PECI_CPUTEMP=y
CONFIG_SENSORS_PECI_DIMMTEMP=y
CONFIG_ASPEED_LPC_CTRL=y
CONFIG_ASPEED_LPC_SNOOP=y
CONFIG_ASPEED_P2A_CTRL=y
CONFIG_ASPEED_UART_ROUTING=y
CONFIG_PECI=y
CONFIG_PECI_ASPEED=y
CONFIG_UBIFS_FS=y
CONFIG_DEBUG_USER=y
#CONFIG_ASPEED_JTAG is not set
CONFIG_THERMAL=y
CONFIG_MDIO_ASPEED=y
CONFIG_MMC_SDHCI_IO_ACCESSORS=y
CONFIG_USB_U_ETHER=y
CONFIG_USB_F_ECM=y
CONFIG_USB_F_SUBSET=y
CONFIG_USB_F_RNDIS=y
CONFIG_USB_CONFIGFS_RNDIS=y
CONFIG_USB_ETH=y
CONFIG_USB_ETH_RNDIS=y
CONFIG_SENSORS_SBTSI=y
CONFIG_SENSORS_MAX31790=y
CONFIG_SENSORS_EMC2305=y
CONFIG_SENSORS_EMC1403=y
CONFIG_MAX1363=y
CONFIG_I3C=y
CONFIG_USB_HUB_USB251XB=y
CONFIG_SENSORS_SBRMI=y
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FILESEXTRAPATHS:append:starscream := "${THISDIR}/${PN}:"

SRC_URI:append = " file://starscream.cfg \
"
Original file line number Diff line number Diff line change
@@ -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; \
"
Original file line number Diff line number Diff line change
@@ -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"
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh

# Set BMC ready
gpioset "$(gpiofind BMC_READY)"=0
echo BMC ready !!
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FILESEXTRAPATHS:prepend:starscream := "${THISDIR}/${PN}:"
Original file line number Diff line number Diff line change
@@ -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
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"id": 1,
"revision": 128,
"addn_dev_support": 207,
"manuf_id": 6569,
"prod_id": 91,
"aux": 0
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
RMCPP_IFACE = "eth1"
Original file line number Diff line number Diff line change
@@ -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
}
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FILESEXTRAPATHS:append:starscream := ":${THISDIR}/${PN}"
SRC_URI:append:starscream = " file://chassis-capabilities.override.yml \
"

0 comments on commit b765e11

Please sign in to comment.