From a0429179a003ce4b17dd67d1ac1503a2240a1786 Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Mon, 11 Dec 2023 11:14:04 +0100 Subject: [PATCH] Add Raspberry Pi 5 (#4757) --- supervisor/addons/validate.py | 1 + supervisor/data/arch.json | 1 + tests/addons/test_config.py | 3 +++ tests/test_arch.py | 10 ++++++++++ 4 files changed, 15 insertions(+) diff --git a/supervisor/addons/validate.py b/supervisor/addons/validate.py index 1e54208113d..2702cc7a2eb 100644 --- a/supervisor/addons/validate.py +++ b/supervisor/addons/validate.py @@ -148,6 +148,7 @@ r"|raspberrypi3" r"|raspberrypi4-64" r"|raspberrypi4" + r"|raspberrypi5-64" r"|yellow" r"|green" r"|tinker" diff --git a/supervisor/data/arch.json b/supervisor/data/arch.json index 69cc86047f9..0093cc5101a 100644 --- a/supervisor/data/arch.json +++ b/supervisor/data/arch.json @@ -5,6 +5,7 @@ "raspberrypi3-64": ["aarch64", "armv7", "armhf"], "raspberrypi4": ["armv7", "armhf"], "raspberrypi4-64": ["aarch64", "armv7", "armhf"], + "raspberrypi5-64": ["aarch64", "armv7", "armhf"], "yellow": ["aarch64", "armv7", "armhf"], "green": ["aarch64", "armv7", "armhf"], "tinker": ["armv7", "armhf"], diff --git a/tests/addons/test_config.py b/tests/addons/test_config.py index e35d6cbbf2e..fec4b44cd46 100644 --- a/tests/addons/test_config.py +++ b/tests/addons/test_config.py @@ -176,6 +176,7 @@ def test_valid_machine(): "raspberrypi3", "raspberrypi4-64", "raspberrypi4", + "raspberrypi5-64", "tinker", ] @@ -196,6 +197,7 @@ def test_valid_machine(): "!raspberrypi3", "!raspberrypi4-64", "!raspberrypi4", + "!raspberrypi5-64", "!tinker", ] @@ -211,6 +213,7 @@ def test_valid_machine(): "raspberrypi", "raspberrypi4-64", "raspberrypi4", + "raspberrypi5-64", "!tinker", ] diff --git a/tests/test_arch.py b/tests/test_arch.py index 193356fe7c9..ed66968e8e6 100644 --- a/tests/test_arch.py +++ b/tests/test_arch.py @@ -103,6 +103,16 @@ async def test_raspberrypi4_64_arch(coresys, sys_machine, sys_supervisor): assert coresys.arch.supported == ["aarch64", "armv7", "armhf"] +async def test_raspberrypi5_64_arch(coresys, sys_machine, sys_supervisor): + """Test arch for raspberrypi5_64.""" + sys_machine.return_value = "raspberrypi5-64" + sys_supervisor.arch = "aarch64" + await coresys.arch.load() + + assert coresys.arch.default == "aarch64" + assert coresys.arch.supported == ["aarch64", "armv7", "armhf"] + + async def test_yellow_arch(coresys, sys_machine, sys_supervisor): """Test arch for yellow.""" sys_machine.return_value = "yellow"