Skip to content

Commit

Permalink
fix: set target platform of Pi 4 images to linux/arm64/v8
Browse files Browse the repository at this point in the history
  • Loading branch information
nicomiguelino committed Jan 7, 2025
1 parent cb6dea1 commit c8dc36d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tools/image_builder/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def build_image(
elif service == 'test':
context.update(get_test_context())
elif service == 'wifi-connect':
context.update(get_wifi_connect_context(target_platform))
context.update(get_wifi_connect_context(board, target_platform))
elif service == 'server':
if environment == 'development':
base_apt_dependencies.extend(['nodejs', 'npm'])
Expand Down
11 changes: 7 additions & 4 deletions tools/image_builder/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def get_build_parameters(build_target: str) -> dict:
return {
'board': 'pi4',
'base_image': 'balenalib/raspberrypi3-debian',
'target_platform': 'linux/arm/v8',
'target_platform': 'linux/arm64/v8',
}
elif build_target == 'pi3':
return {
Expand Down Expand Up @@ -250,12 +250,15 @@ def get_viewer_context(board: str) -> dict:
}


def get_wifi_connect_context(target_platform: str) -> dict:
def get_wifi_connect_context(board: str, target_platform: str) -> dict:
if target_platform == 'linux/arm/v6':
architecture = 'rpi'
elif target_platform in ['linux/arm/v7', 'linux/arm/v8']:
elif (
target_platform in ['linux/arm/v7', 'linux/arm64/v8'] and
board != 'pi5'
):
architecture = 'armv7hf'
elif target_platform == 'linux/arm64/v8':
elif target_platform == 'linux/arm64/v8' and board == 'pi5':
architecture = 'aarch64'
elif target_platform == 'linux/amd64':
architecture = 'amd64'
Expand Down

0 comments on commit c8dc36d

Please sign in to comment.