#!/usr/bin/env python3
#
# Functional test that boots the ASPEED machines
#
# SPDX-License-Identifier: GPL-2.0-or-later

from qemu_test import Asset
from aspeed import FacebookAspeedTest


class AnacapaMachine(FacebookAspeedTest):

    ASSET_ANACAPA_FLASH = Asset(
        'https://github.com/legoater/qemu-aspeed-boot/raw/refs/heads/master/images/anacapa-bmc/openbmc-20260616025349/obmc-phosphor-image-anacapa-20260616025349.static.mtd.xz',
        'de3841fb6ed3085aec6424358ee6efc4b8ee85688361e5aa1987fd1acb7d3fb4')

    def test_arm_ast2600_anacapa_openbmc(self):
        image_path = self.uncompress(self.ASSET_ANACAPA_FLASH)

        self.do_test_arm_aspeed_openbmc('anacapa-bmc', image=image_path,
                                        uboot='2019.04', cpu_id='0xf00',
                                        soc='AST2600 rev A3')

if __name__ == '__main__':
    FacebookAspeedTest.main()
