Initial commit

This commit is contained in:
Your Name
2026-04-23 17:07:55 +08:00
commit b7e39e063b
16725 changed files with 1625565 additions and 0 deletions
@@ -0,0 +1,10 @@
# 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 += "romed8hm3-layer"
BBFILE_PATTERN_romed8hm3-layer = "^${LAYERDIR}/"
LAYERSERIES_COMPAT_romed8hm3-layer = "langdale mickledore"
@@ -0,0 +1,21 @@
KMACHINE = "aspeed"
KERNEL_DEVICETREE = "${KMACHINE}-bmc-asrock-${MACHINE}.dtb"
UBOOT_DEVICETREE = "ast2500-evb"
UBOOT_MACHINE = "evb-ast2500_defconfig"
FLASH_SIZE = "65536"
require conf/machine/include/ast2500.inc
require conf/machine/include/obmc-bsp-common.inc
PREFERRED_PROVIDER_virtual/obmc-fan-mgmt = "packagegroup-asrock-apps"
PREFERRED_PROVIDER_virtual/obmc-chassis-mgmt = "packagegroup-asrock-apps"
PREFERRED_PROVIDER_virtual/obmc-flash-mgmt = "packagegroup-asrock-apps"
PREFERRED_PROVIDER_virtual/obmc-system-mgmt = "packagegroup-asrock-apps"
VIRTUAL-RUNTIME_obmc-inventory-manager = "entity-manager"
VIRTUAL-RUNTIME_obmc-sensors-hwmon = "dbus-sensors"
VIRTUAL-RUNTIME_obmc-host-state-manager = "x86-power-control"
VIRTUAL-RUNTIME_obmc-chassis-state-manager = "x86-power-control"
@@ -0,0 +1,18 @@
# 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-python \
##OEROOT##/meta-phosphor \
##OEROOT##/meta-aspeed \
##OEROOT##/meta-asrock \
##OEROOT##/meta-asrock/meta-romed8hm3 \
"
@@ -0,0 +1,17 @@
MACHINE ??= "romed8hm3"
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"
CONF_VERSION = "2"
@@ -0,0 +1,31 @@
SUMMARY = "OpenBMC for ASRock - Applications"
PR = "r1"
inherit packagegroup
PROVIDES = "${PACKAGES}"
PACKAGES = " \
${PN}-flash \
${PN}-system \
"
PROVIDES += "virtual/obmc-flash-mgmt"
PROVIDES += "virtual/obmc-system-mgmt"
RPROVIDES:${PN}-flash += "virtual-obmc-flash-mgmt"
RPROVIDES:${PN}-system += "virtual-obmc-system-mgmt"
SUMMARY:${PN}-flash = "ASRock Flash"
RDEPENDS:${PN}-flash = " \
phosphor-ipmi-flash \
"
SUMMARY:${PN}-system = "ASRock System"
RDEPENDS:${PN}-system = " \
bmcweb \
webui-vue \
phosphor-host-postd \
phosphor-ipmi-kcs \
phosphor-post-code-manager \
phosphor-power-regulators \
"
@@ -0,0 +1,4 @@
# include i2c super-i/o driver, but not host-side (lpc) driver
CONFIG_SENSORS_NCT6775_CORE=y
CONFIG_SENSORS_NCT6775_I2C=y
CONFIG_SENSORS_NCT6775=n
@@ -0,0 +1,5 @@
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
SRC_URI += " \
file://romed8hm3.cfg \
"
@@ -0,0 +1,3 @@
lpc-address = 0x2f8
sirq = 3
baud = 115200
@@ -0,0 +1 @@
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
@@ -0,0 +1 @@
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
@@ -0,0 +1,8 @@
{
"id": 32,
"revision": 1,
"addn_dev_support": 8,
"manuf_id": 49622,
"prod_id": 514,
"aux": 0
}
@@ -0,0 +1,32 @@
{
"comments": [ "Config file for ASRock Rack ROMED8HM3" ],
"chassis": [
{
"comments": [ "Chassis number 1 containing CPUs and memory" ],
"number": 1,
"inventory_path": "system/chassis",
"devices": [
{
"comments": [ "ISL96147 regulator producing the VDDCR_CPU rail" ],
"id": "vddcr_cpu_regulator",
"is_regulator": true,
"fru": "system/board/ASRock_ROMED8HM3",
"i2c_interface": {
"bus": 6,
"address": "0x60"
},
"configuration": {
"actions": [
{
"i2c_write_bytes": {
"register": "0xf0",
"values": [ "0x07", "0x31" ]
}
}
]
}
}
]
}
]
}
@@ -0,0 +1,11 @@
FILESEXTRAPATHS:append := ":${THISDIR}/${PN}"
SRC_URI += "file://config.json"
inherit obmc-phosphor-systemd
SYSTEMD_LINK:${PN}-regulators += " ../${REGS_CONF_SVC}:xyz.openbmc_project.Chassis.Control.Power@0.service.requires/${REGS_CONF_SVC}"
do_install:append() {
PR_CFGDIR=${D}/${datadir}/phosphor-regulators
install -d "$PR_CFGDIR"
install -m 0644 ${WORKDIR}/config.json "$PR_CFGDIR"
}
@@ -0,0 +1,87 @@
{
"gpio_configs": [
{
"Name" : "IdButton",
"LineName" : "LOCATORBTN",
"Type" : "GPIO",
"Polarity": "ActiveLow"
},
{
"Name" : "NMIButton",
"LineName" : "NMI_BTN_N",
"Type" : "GPIO",
"Polarity": "ActiveLow"
},
{
"Name" : "NMIOut",
"LineName" : "BMC_NMI",
"Type" : "GPIO",
"Polarity": "ActiveHigh"
},
{
"Name" : "PostComplete",
"LineName" : "POST_COMPLETE_N",
"Type" : "GPIO",
"Polarity": "ActiveLow"
},
{
"Name" : "PowerButton",
"LineName" : "BMC_PSIN",
"Type" : "GPIO",
"Polarity": "ActiveLow"
},
{
"Name" : "PowerOk",
"LineName" : "PWRGD_OUT",
"Type" : "GPIO",
"Polarity": "ActiveHigh"
},
{
"Name" : "PowerOut",
"LineName" : "BMC_PSOUT",
"Type" : "GPIO",
"Polarity": "ActiveLow"
},
{
"Name" : "ResetButton",
"LineName" : "BMC_RESETCON",
"Type" : "GPIO",
"Polarity": "ActiveLow"
},
{
"Name" : "ResetOut",
"LineName" : "RESETCON",
"Type" : "GPIO",
"Polarity": "ActiveLow"
},
{
"Name" : "SioOnControl",
"LineName" : "",
"Type" : "GPIO",
"Polarity": "ActiveLow"
},
{
"Name" : "SioPowerGood",
"LineName" : "",
"Type" : "GPIO",
"Polarity": "ActiveHigh"
},
{
"Name" : "SIOS5",
"LineName" : "",
"Type" : "GPIO",
"Polarity": "ActiveLow"
}
],
"timing_configs": {
"PowerPulseMs": 200,
"ForceOffPulseMs": 15000,
"ResetPulseMs": 500,
"PowerCycleMs": 5000,
"SioPowerGoodWatchdogMs": 1000,
"PsPowerOKWatchdogMs": 8000,
"GracefulPowerOffS": 300,
"WarmResetCheckMs": 500,
"PowerOffSaveMs": 7000
}
}
@@ -0,0 +1,10 @@
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
SRC_URI += " \
file://power-config-host0.json \
"
do_install:append() {
install -d ${D}/${datadir}/${PN}
install -m 0644 ${WORKDIR}/power-config-host0.json ${D}/${datadir}/${PN}
}