@@ -1122,28 +1122,39 @@ def capitalize_board_name(board):
11221122 return board .capitalize ()
11231123
11241124
1125- def generate_exposed_map (conf_wip_boards ):
1125+ def generate_exposed_map (conf_wip_boards , csc_tvb_boards = None ):
11261126 """
11271127 Generate exposed.map with regex patterns for recommended images.
11281128 For each board, generates 2 patterns:
11291129 1. Minimal: Debian bookworm + current branch
11301130 2. For boards with video: Ubuntu noble + desktop (gnome/xfce)
11311131 For headless: Ubuntu noble + minimal
11321132 For riscv64: Ubuntu noble + xfce desktop
1133+
1134+ conf_wip_boards: stable boards (conf/wip support level) - images have no 'community_' prefix
1135+ csc_tvb_boards: community boards (csc/tvb support level) - images have 'community_' prefix
11331136 """
1137+ if csc_tvb_boards is None :
1138+ csc_tvb_boards = []
1139+
11341140 lines = []
11351141 single_image_boards = [] # Track boards with only minimal image (loongarch only)
11361142
1137- # Select one branch per board, prefer current then vendor
1138- boards = select_one_branch_per_board (conf_wip_boards )
1143+ # Mark boards with their type (stable vs community)
1144+ stable_boards = [{** board , 'board_type' : 'stable' } for board in conf_wip_boards ]
1145+ community_boards = [{** board , 'board_type' : 'community' } for board in csc_tvb_boards ]
1146+
1147+ # Combine and select one branch per board
1148+ all_boards = select_one_branch_per_board (stable_boards + community_boards )
11391149
11401150 # Sort by board name
1141- boards .sort (key = lambda x : x ['board' ])
1151+ all_boards .sort (key = lambda x : x ['board' ])
11421152
1143- for board_data in boards :
1153+ for board_data in all_boards :
11441154 board = board_data ['board' ]
11451155 branch = board_data ['branch' ]
11461156 is_fast = board_data ['is_fast' ]
1157+ board_type = board_data .get ('board_type' , 'stable' ) # 'stable' or 'community'
11471158 entry = board_data ['entry' ]
11481159 extensions = board_data .get ('extensions' , '' )
11491160
@@ -1162,12 +1173,18 @@ def generate_exposed_map(conf_wip_boards):
11621173 dir_prefix = f"{ board } /archive/"
11631174
11641175 # Pattern format: Armbian_[0-9].*BoardName_Release_Branch_[0-9]*.[0-9]*.[0-9]*_Type.ext
1176+ # Community images have 'community_' prefix, stable images don't
1177+ # This excludes nightly images (which come from armbian/os repo without 'community_' prefix)
1178+ community_prefix = '(community_)?' if board_type == 'community' else ''
11651179 # Capitalize board name for pattern
11661180 board_pattern = capitalize_board_name (board )
11671181
11681182 # 1. Minimal: Debian bookworm + current/vendor branch (all boards)
1169- minimal_pattern = f"{ dir_prefix } Armbian_[0-9].*{ board_pattern } _bookworm_{ branch } _[0-9]*.[0-9]*.[0-9]*_minimal{ file_ext } "
1183+ # Generate two patterns: one with dir prefix (for dl.armbian.com), one without (for GitHub releases)
1184+ minimal_pattern = f"{ dir_prefix } Armbian_{ community_prefix } [0-9].*{ board_pattern } _bookworm_{ branch } _[0-9]*.[0-9]*.[0-9]*_minimal{ file_ext } "
1185+ minimal_pattern_no_prefix = f"Armbian_{ community_prefix } [0-9].*{ board_pattern } _bookworm_{ branch } _[0-9]*.[0-9]*.[0-9]*_minimal{ file_ext } "
11701186 lines .append (minimal_pattern )
1187+ lines .append (minimal_pattern_no_prefix )
11711188
11721189 # 2. Second pattern: depends on board type
11731190 # For loongarch: only bookworm minimal (no noble)
@@ -1177,8 +1194,10 @@ def generate_exposed_map(conf_wip_boards):
11771194
11781195 # For riscv64: noble xfce desktop
11791196 if is_fast == 'riscv64' :
1180- riscv64_pattern = f"{ dir_prefix } Armbian_[0-9].*{ board_pattern } _noble_{ branch } _[0-9]*.[0-9]*.[0-9]*_xfce_desktop{ file_ext } "
1197+ riscv64_pattern = f"{ dir_prefix } Armbian_{ community_prefix } [0-9].*{ board_pattern } _noble_{ branch } _[0-9]*.[0-9]*.[0-9]*_xfce_desktop{ file_ext } "
1198+ riscv64_pattern_no_prefix = f"Armbian_{ community_prefix } [0-9].*{ board_pattern } _noble_{ branch } _[0-9]*.[0-9]*.[0-9]*_xfce_desktop{ file_ext } "
11811199 lines .append (riscv64_pattern )
1200+ lines .append (riscv64_pattern_no_prefix )
11821201 continue
11831202
11841203 # For boards with video: Ubuntu noble + desktop
@@ -1189,12 +1208,16 @@ def generate_exposed_map(conf_wip_boards):
11891208 else : # is_fast is False (slow hardware)
11901209 desktop_type = 'xfce_desktop'
11911210
1192- desktop_pattern = f"{ dir_prefix } Armbian_[0-9].*{ board_pattern } _noble_{ branch } _[0-9]*.[0-9]*.[0-9]*_{ desktop_type } { file_ext } "
1211+ desktop_pattern = f"{ dir_prefix } Armbian_{ community_prefix } [0-9].*{ board_pattern } _noble_{ branch } _[0-9]*.[0-9]*.[0-9]*_{ desktop_type } { file_ext } "
1212+ desktop_pattern_no_prefix = f"Armbian_{ community_prefix } [0-9].*{ board_pattern } _noble_{ branch } _[0-9]*.[0-9]*.[0-9]*_{ desktop_type } { file_ext } "
11931213 lines .append (desktop_pattern )
1214+ lines .append (desktop_pattern_no_prefix )
11941215 else :
11951216 # Headless boards: Ubuntu noble minimal
1196- noble_minimal_pattern = f"{ dir_prefix } Armbian_[0-9].*{ board_pattern } _noble_{ branch } _[0-9]*.[0-9]*.[0-9]*_minimal{ file_ext } "
1217+ noble_minimal_pattern = f"{ dir_prefix } Armbian_{ community_prefix } [0-9].*{ board_pattern } _noble_{ branch } _[0-9]*.[0-9]*.[0-9]*_minimal{ file_ext } "
1218+ noble_minimal_pattern_no_prefix = f"Armbian_{ community_prefix } [0-9].*{ board_pattern } _noble_{ branch } _[0-9]*.[0-9]*.[0-9]*_minimal{ file_ext } "
11971219 lines .append (noble_minimal_pattern )
1220+ lines .append (noble_minimal_pattern_no_prefix )
11981221
11991222 # Display warning for boards with only one image (loongarch only)
12001223 if single_image_boards :
@@ -1288,8 +1311,7 @@ def main():
12881311 # exposed.map
12891312 # Generate from stable + community boards (exclude nightly targets)
12901313 exposed_map_path = output_dir / 'exposed.map'
1291- exposed_map_boards = conf_wip_boards_stable + csc_tvb_boards_community
1292- exposed_map = generate_exposed_map (exposed_map_boards )
1314+ exposed_map = generate_exposed_map (conf_wip_boards_stable , csc_tvb_boards_community )
12931315 exposed_map_path .write_text (exposed_map )
12941316 print (f" Written { exposed_map_path } " , file = sys .stderr )
12951317
0 commit comments