Skip to content

Commit

Permalink
Add Raspberry Pi 5 (#4757)
Browse files Browse the repository at this point in the history
  • Loading branch information
agners authored Dec 11, 2023
1 parent 5cfb45c commit a042917
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions supervisor/addons/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@
r"|raspberrypi3"
r"|raspberrypi4-64"
r"|raspberrypi4"
r"|raspberrypi5-64"
r"|yellow"
r"|green"
r"|tinker"
Expand Down
1 change: 1 addition & 0 deletions supervisor/data/arch.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand Down
3 changes: 3 additions & 0 deletions tests/addons/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ def test_valid_machine():
"raspberrypi3",
"raspberrypi4-64",
"raspberrypi4",
"raspberrypi5-64",
"tinker",
]

Expand All @@ -196,6 +197,7 @@ def test_valid_machine():
"!raspberrypi3",
"!raspberrypi4-64",
"!raspberrypi4",
"!raspberrypi5-64",
"!tinker",
]

Expand All @@ -211,6 +213,7 @@ def test_valid_machine():
"raspberrypi",
"raspberrypi4-64",
"raspberrypi4",
"raspberrypi5-64",
"!tinker",
]

Expand Down
10 changes: 10 additions & 0 deletions tests/test_arch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit a042917

Please sign in to comment.