@@ -1070,6 +1070,16 @@ static void aspeed_machine_rainier_class_init(ObjectClass *oc, void *data)
aspeed_soc_num_cpus(amc->soc_name);
};
+static void aspeed_machine_fuji_class_init(ObjectClass *oc, void *data)
+{
+ MachineClass *mc = MACHINE_CLASS(oc);
+ AspeedMachineClass *amc = ASPEED_MACHINE_CLASS(oc);
+
+ mc->desc = "Facebook Fuji BMC (Cortex-A7)";
+ amc->macs_mask = ASPEED_MAC3_ON;
+ amc->uart_default = ASPEED_DEV_UART1;
+};
+
static const TypeInfo aspeed_machine_types[] = {
{
.name = MACHINE_TYPE_NAME("palmetto-bmc"),
@@ -1119,6 +1129,10 @@ static const TypeInfo aspeed_machine_types[] = {
.name = MACHINE_TYPE_NAME("rainier-bmc"),
.parent = TYPE_ASPEED_MACHINE,
.class_init = aspeed_machine_rainier_class_init,
+ }, {
+ .name = MACHINE_TYPE_NAME("fuji-bmc"),
+ .parent = MACHINE_TYPE_NAME("ast2600-evb"),
+ .class_init = aspeed_machine_fuji_class_init,
}, {
.name = TYPE_ASPEED_MACHINE,
.parent = TYPE_MACHINE,
@@ -1143,6 +1143,31 @@ def test_arm_ast2600_debian(self):
self.wait_for_console_pattern("SMP: Total of 2 processors activated")
self.wait_for_console_pattern("No filesystem could mount root")
+ def test_arm_ast2600_fuji_openbmc(self):
+ """
+ :avocado: tags=arch:arm
+ :avocado: tags=machine:fuji-bmc
+ """
+
+ image_url = ('https://github.com/peterdelevoryas/openbmc/releases/download/'
+ 'fuji-v0.1-alpha/fuji.mtd')
+ image_hash = '36dd945a2ee34694684b5f3e7351517598bb39d8b6899c71bbd23791b42e082e'
+ image_path = self.fetch_asset(image_url, asset_hash=image_hash,
+ algorithm='sha256')
+
+ self.vm.set_console()
+ self.vm.add_args('-drive', 'file=' + image_path + ',if=mtd,format=raw',
+ '-net', 'nic')
+ self.vm.launch()
+
+ self.wait_for_console_pattern("U-Boot 2019.04")
+ self.wait_for_console_pattern("## Loading kernel from FIT Image at 20100000")
+ self.wait_for_console_pattern("Starting kernel ...")
+ self.wait_for_console_pattern("Booting Linux on physical CPU 0xf00")
+ self.wait_for_console_pattern(
+ "aspeed-smc 1e620000.spi: read control register: 203b0041")
+ self.wait_for_console_pattern("ftgmac100 1e690000.ftgmac eth0: irq ")
+
def test_m68k_mcf5208evb(self):
"""
:avocado: tags=arch:m68k