Skip to content

Commit 2a3807b

Browse files
committed
make raspbian_lepotato download latest image automatically, better checksum url
1 parent 0a39a13 commit 2a3807b

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

src/custompios_core/base_image_downloader.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ def download_image_rpi(board: Dict[str, Any], dest_folder: str):
166166
return
167167

168168
def get_checksum_libre_computer(os_name: str, os_version: str, file_name: str) -> Optional[str]:
169-
checksum_url = f"https://computer-libre-distro.us-east-1.linodeobjects.com/ci/{os_name}/{os_version}/SHA256SUMS"
169+
checksum_url = f"https://distro.libre.computer/ci/{os_name}/{os_version}/SHA256SUMS"
170170
checksum_files_data = download_webpage(checksum_url)
171171
for line in checksum_files_data.splitlines():
172172
checksum, name = line.split(maxsplit=1)
@@ -191,7 +191,8 @@ def download_image_libre_computer(board: Dict[str, Any], dest_folder: str):
191191
if os_name == "debian":
192192
file_name = f"{os_name}-{os_version}-{port}-{arch}-{board}.img.xz"
193193
download_url = f"https://distro.libre.computer/ci/{os_name}/{os_version}/{urllib.parse.quote(file_name)}"
194-
194+
elif os_name == "raspbian":
195+
download_url = f"https://distro.libre.computer/ci/{os_name}/{os_version}/{urllib.parse.quote(file_name)}"
195196
checksum = get_checksum_libre_computer(os_name, os_version, file_name)
196197
if checksum is None:
197198
print(f"Error: Can't find the correct checksum for {file_name}")

src/images.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,11 @@ images:
5454
BASE_IMAGE_RASPBIAN: "no"
5555
raspbian_lepotato:
5656
description: "Le Potato AML-S905X-CC Raspbian image"
57-
url: "https://distro.libre.computer/ci/raspbian/11/2023-05-03-raspbian-bullseye-arm64-lite%2Baml-s905x-cc.img.xz"
58-
checksum: "https://distro.libre.computer/ci/raspbian/11/SHA256SUMS"
59-
type: http
57+
type: libre.computer
58+
os_name: raspbian
59+
os_version: 12
60+
distribution: bookworm
61+
port: lite
6062
env:
6163
BASE_ARCH: arm64
6264
BASE_DISTRO: raspbian

0 commit comments

Comments
 (0)