Skip to content

Commit d58ad44

Browse files
committed
Treat legacy branch same as vendor in target generation
- Add legacy to allowed branches filter - Give legacy same priority as vendor for branch selection - Group legacy boards with vendor in all generated YAML targets
1 parent ac14e28 commit d58ad44

1 file changed

Lines changed: 13 additions & 12 deletions

File tree

scripts/generate_targets.py

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -387,8 +387,8 @@ def extract_boards_by_support_level(image_info, extensions_map=None, remove_exte
387387
csc_tvb_boards = []
388388

389389
for key, data in board_data.items():
390-
# Filter branches: prefer current and vendor
391-
if data['branch'] not in ['current', 'vendor', 'edge']:
390+
# Filter branches: prefer current, vendor, and legacy
391+
if data['branch'] not in ['current', 'vendor', 'legacy', 'edge']:
392392
continue
393393

394394
if data['support_level'] in ['conf', 'wip']:
@@ -408,6 +408,7 @@ def select_one_branch_per_board(boards):
408408
branch_priority = {
409409
'current': 1,
410410
'vendor': 2,
411+
'legacy': 2,
411412
'edge': 3
412413
}
413414

@@ -568,11 +569,11 @@ def generate_stable_yaml(conf_wip_boards, manual_content=""):
568569
current_riscv64 = [b for b in conf_wip_boards if b['branch'] == 'current' and b['is_fast'] == 'riscv64']
569570
current_loongarch = [b for b in conf_wip_boards if b['branch'] == 'current' and b['is_fast'] == 'loongarch']
570571
current_headless = [b for b in conf_wip_boards if b['branch'] == 'current' and b['is_fast'] is None]
571-
vendor_fast = [b for b in conf_wip_boards if b['branch'] == 'vendor' and b['is_fast'] is True]
572-
vendor_slow = [b for b in conf_wip_boards if b['branch'] == 'vendor' and b['is_fast'] is False]
573-
vendor_riscv64 = [b for b in conf_wip_boards if b['branch'] == 'vendor' and b['is_fast'] == 'riscv64']
574-
vendor_loongarch = [b for b in conf_wip_boards if b['branch'] == 'vendor' and b['is_fast'] == 'loongarch']
575-
vendor_headless = [b for b in conf_wip_boards if b['branch'] == 'vendor' and b['is_fast'] is None]
572+
vendor_fast = [b for b in conf_wip_boards if b['branch'] in ('vendor', 'legacy') and b['is_fast'] is True]
573+
vendor_slow = [b for b in conf_wip_boards if b['branch'] in ('vendor', 'legacy') and b['is_fast'] is False]
574+
vendor_riscv64 = [b for b in conf_wip_boards if b['branch'] in ('vendor', 'legacy') and b['is_fast'] == 'riscv64']
575+
vendor_loongarch = [b for b in conf_wip_boards if b['branch'] in ('vendor', 'legacy') and b['is_fast'] == 'loongarch']
576+
vendor_headless = [b for b in conf_wip_boards if b['branch'] in ('vendor', 'legacy') and b['is_fast'] is None]
576577

577578
# Current branch lists
578579
yaml += """# Stable builds - fast HDMI (quad-core+ or modern SoCs)
@@ -1054,11 +1055,11 @@ def generate_community_yaml(csc_tvb_boards, manual_content=""):
10541055
current_riscv64 = [b for b in csc_tvb_boards if b['branch'] == 'current' and b['is_fast'] == 'riscv64']
10551056
current_loongarch = [b for b in csc_tvb_boards if b['branch'] == 'current' and b['is_fast'] == 'loongarch']
10561057

1057-
vendor_fast = [b for b in csc_tvb_boards if b['branch'] == 'vendor' and b['is_fast'] is True]
1058-
vendor_slow = [b for b in csc_tvb_boards if b['branch'] == 'vendor' and b['is_fast'] is False]
1059-
vendor_headless = [b for b in csc_tvb_boards if b['branch'] == 'vendor' and b['is_fast'] is None]
1060-
vendor_riscv64 = [b for b in csc_tvb_boards if b['branch'] == 'vendor' and b['is_fast'] == 'riscv64']
1061-
vendor_loongarch = [b for b in csc_tvb_boards if b['branch'] == 'vendor' and b['is_fast'] == 'loongarch']
1058+
vendor_fast = [b for b in csc_tvb_boards if b['branch'] in ('vendor', 'legacy') and b['is_fast'] is True]
1059+
vendor_slow = [b for b in csc_tvb_boards if b['branch'] in ('vendor', 'legacy') and b['is_fast'] is False]
1060+
vendor_headless = [b for b in csc_tvb_boards if b['branch'] in ('vendor', 'legacy') and b['is_fast'] is None]
1061+
vendor_riscv64 = [b for b in csc_tvb_boards if b['branch'] in ('vendor', 'legacy') and b['is_fast'] == 'riscv64']
1062+
vendor_loongarch = [b for b in csc_tvb_boards if b['branch'] in ('vendor', 'legacy') and b['is_fast'] == 'loongarch']
10621063

10631064
# Build set of boards that have current branch (to exclude from edge)
10641065
current_boards = {b['board'] for b in csc_tvb_boards if b['branch'] == 'current'}

0 commit comments

Comments
 (0)