Skip to content

Commit 5e148f4

Browse files
authored
Merge branch 'main' into feature/add-repka-pi
2 parents 197c36d + ccc452f commit 5e148f4

File tree

6 files changed

+20
-7
lines changed

6 files changed

+20
-7
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,6 @@ jobs:
4848
- name: Pre-commit hooks
4949
run: |
5050
pre-commit run --all-files
51-
- name: Build assets
52-
run: circuitpython-build-bundles --filename_prefix ${{ steps.repo-name.outputs.repo-name }} --library_location .
53-
- name: Archive bundles
54-
uses: actions/upload-artifact@v2
55-
with:
56-
name: bundles
57-
path: ${{ github.workspace }}/bundles/
5851
- name: Build docs
5952
working-directory: docs
6053
run: sphinx-build -E -W -b html . _build/html

adafruit_platformdetect/board.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,8 @@ def id(self) -> Optional[str]:
209209
board_id = self._armbian_id()
210210
elif chip_id == chips.S905X:
211211
board_id = boards.AML_S905X_CC
212+
elif chip_id == chips.CV1800B:
213+
board_id = boards.MILKV_DUO
212214
self._board_id = board_id
213215
return board_id
214216

@@ -428,6 +430,8 @@ def _armbian_id(self) -> Optional[str]:
428430
board = boards.REPKA_PI_3_H5
429431
elif board_value == "repka-pi4-h6":
430432
board = boards.REPKA_PI_4_H6
433+
elif board_value == "milkv_duo":
434+
board = boards.MILKV_DUO
431435
return board
432436

433437
# pylint: enable=too-many-return-statements
@@ -887,6 +891,11 @@ def any_pine64_board(self) -> bool:
887891
"""Check whether the current board is any Pine64 device."""
888892
return self.id in boards._PINE64_DEV_IDS
889893

894+
@property
895+
def any_milkv_board(self) -> bool:
896+
"""Check whether the current board is any MilkV device."""
897+
return self.id in boards._MILKV_IDS_
898+
890899
@property
891900
def any_rock_pi_board(self) -> bool:
892901
"""Check whether the current board is any Rock Pi device."""
@@ -1031,6 +1040,7 @@ def lazily_generate_conditions():
10311040
yield self.any_walnutpi
10321041
yield self.any_olimex_lime2_board
10331042
yield self.any_repka_board
1043+
yield self.any_milkv_board
10341044

10351045
return any(condition for condition in lazily_generate_conditions())
10361046

adafruit_platformdetect/chip.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,8 @@ def _linux_id(self) -> Optional[str]:
355355
linux_id = chips.H5
356356
if compatible and "odroid-xu4" in compatible:
357357
linux_id = chips.EXYNOS5422
358+
if compatible and "cvitek,cv180x" in compatible:
359+
linux_id = chips.CV1800B
358360
cpu_model = self.detector.get_cpuinfo_field("cpu model")
359361

360362
if cpu_model is not None:

adafruit_platformdetect/constants/boards.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,9 @@
214214
MAAXBOARD = "MAAXBOARD"
215215
MAAXBOARD_MINI = "MAAXBOARD_MINI"
216216

217+
# Shenzhen MilkV Technology boards ids
218+
MILKV_DUO = "MILKV_DUO"
219+
217220
# Khadas VIM3
218221
KHADAS_VIM3 = "KHADAS_VIM3"
219222

@@ -569,3 +572,5 @@
569572
REPKA_PI_3_H5,
570573
REPKA_PI_4_H6,
571574
)
575+
576+
_MILKV_IDS_ = (MILKV_DUO,)

adafruit_platformdetect/constants/chips.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,5 @@
7575
ATOM_J4105 = "ATOM_J4105"
7676

7777
BCM_RANGE = {"BCM2708", "BCM2709", "BCM2711", "BCM2712", "BCM2835", "BCM2837"}
78+
79+
CV1800B = "CV1800B"

bin/detect.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
print("Is this a UDOO board?", detector.board.any_udoo_board)
6969
print("Is this an ASUS Tinker board?", detector.board.any_asus_tinker_board)
7070
print("Is this an STM32MP1 board?", detector.board.any_stm32mp1)
71+
print("Is this a MilkV board?", detector.board.any_milkv_board)
7172
print("Is this a generic Linux PC?", detector.board.generic_linux)
7273
print(
7374
"Is this an OS environment variable special case?", detector.board.os_environ_board

0 commit comments

Comments
 (0)