Skip to content

Commit

Permalink
Merge branch 'main' into feature/add-repka-pi
Browse files Browse the repository at this point in the history
  • Loading branch information
makermelissa committed Jan 10, 2024
2 parents 197c36d + ccc452f commit 5e148f4
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 7 deletions.
7 changes: 0 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,6 @@ jobs:
- name: Pre-commit hooks
run: |
pre-commit run --all-files
- name: Build assets
run: circuitpython-build-bundles --filename_prefix ${{ steps.repo-name.outputs.repo-name }} --library_location .
- name: Archive bundles
uses: actions/upload-artifact@v2
with:
name: bundles
path: ${{ github.workspace }}/bundles/
- name: Build docs
working-directory: docs
run: sphinx-build -E -W -b html . _build/html
Expand Down
10 changes: 10 additions & 0 deletions adafruit_platformdetect/board.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,8 @@ def id(self) -> Optional[str]:
board_id = self._armbian_id()
elif chip_id == chips.S905X:
board_id = boards.AML_S905X_CC
elif chip_id == chips.CV1800B:
board_id = boards.MILKV_DUO
self._board_id = board_id
return board_id

Expand Down Expand Up @@ -428,6 +430,8 @@ def _armbian_id(self) -> Optional[str]:
board = boards.REPKA_PI_3_H5
elif board_value == "repka-pi4-h6":
board = boards.REPKA_PI_4_H6
elif board_value == "milkv_duo":
board = boards.MILKV_DUO
return board

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

@property
def any_milkv_board(self) -> bool:
"""Check whether the current board is any MilkV device."""
return self.id in boards._MILKV_IDS_

@property
def any_rock_pi_board(self) -> bool:
"""Check whether the current board is any Rock Pi device."""
Expand Down Expand Up @@ -1031,6 +1040,7 @@ def lazily_generate_conditions():
yield self.any_walnutpi
yield self.any_olimex_lime2_board
yield self.any_repka_board
yield self.any_milkv_board

return any(condition for condition in lazily_generate_conditions())

Expand Down
2 changes: 2 additions & 0 deletions adafruit_platformdetect/chip.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,8 @@ def _linux_id(self) -> Optional[str]:
linux_id = chips.H5
if compatible and "odroid-xu4" in compatible:
linux_id = chips.EXYNOS5422
if compatible and "cvitek,cv180x" in compatible:
linux_id = chips.CV1800B
cpu_model = self.detector.get_cpuinfo_field("cpu model")

if cpu_model is not None:
Expand Down
5 changes: 5 additions & 0 deletions adafruit_platformdetect/constants/boards.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,9 @@
MAAXBOARD = "MAAXBOARD"
MAAXBOARD_MINI = "MAAXBOARD_MINI"

# Shenzhen MilkV Technology boards ids
MILKV_DUO = "MILKV_DUO"

# Khadas VIM3
KHADAS_VIM3 = "KHADAS_VIM3"

Expand Down Expand Up @@ -569,3 +572,5 @@
REPKA_PI_3_H5,
REPKA_PI_4_H6,
)

_MILKV_IDS_ = (MILKV_DUO,)
2 changes: 2 additions & 0 deletions adafruit_platformdetect/constants/chips.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,5 @@
ATOM_J4105 = "ATOM_J4105"

BCM_RANGE = {"BCM2708", "BCM2709", "BCM2711", "BCM2712", "BCM2835", "BCM2837"}

CV1800B = "CV1800B"
1 change: 1 addition & 0 deletions bin/detect.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
print("Is this a UDOO board?", detector.board.any_udoo_board)
print("Is this an ASUS Tinker board?", detector.board.any_asus_tinker_board)
print("Is this an STM32MP1 board?", detector.board.any_stm32mp1)
print("Is this a MilkV board?", detector.board.any_milkv_board)
print("Is this a generic Linux PC?", detector.board.generic_linux)
print(
"Is this an OS environment variable special case?", detector.board.os_environ_board
Expand Down

0 comments on commit 5e148f4

Please sign in to comment.