|
1 | | -#!/bin/python3 |
| 1 | +#!/bin/env python3 |
2 | 2 | import re |
3 | 3 | import json |
4 | 4 | import glob |
@@ -342,12 +342,16 @@ def update_openocd_config(file_path, **kwargs): |
342 | 342 | board_timer_freq = None |
343 | 343 | board_irqmax = None |
344 | 344 |
|
| 345 | + board_cpucore = "ux900fd" |
345 | 346 | try: |
346 | 347 | cust_file = args.custsoc |
347 | 348 |
|
348 | 349 | with open(args.conf, 'r') as conf_file: |
349 | 350 | conf_data = json.load(conf_file) |
350 | 351 |
|
| 352 | + if 'cpu_config' in conf_data: |
| 353 | + board_cpucore = conf_data['cpu_config'].get("core", "ux900fd") |
| 354 | + |
351 | 355 | if 'general_config' in conf_data: |
352 | 356 | general_config = conf_data['general_config'] |
353 | 357 | if 'ddr' in general_config: |
@@ -583,10 +587,10 @@ def update_openocd_config(file_path, **kwargs): |
583 | 587 |
|
584 | 588 | print("\n===generate successfully!===\n") |
585 | 589 | print("Here are the reference build commands for compiling Linux SDK for you:") |
586 | | - print("$cd ..") |
587 | | - print("$make SOC=%s CORE=ux900fd BOOT_MODE=sd freeloader bootimages" % args.custsoc) |
588 | | - print("$make SOC=%s CORE=ux900fd BOOT_MODE=sd run_qemu" % args.custsoc) |
589 | | - print("Please adjust the compilation parameters according to your real environment.") |
| 590 | + print("$ cd ..") |
| 591 | + print("$ make SOC=%s CORE=%s BOOT_MODE=sd freeloader bootimages" % (args.custsoc, board_cpucore)) |
| 592 | + print("$ make SOC=%s CORE=%s BOOT_MODE=sd run_qemu" % (args.custsoc, board_cpucore)) |
| 593 | + print("Please adjust the compilation parameters according to your real hardware environment.") |
590 | 594 | except Exception as e: |
591 | 595 | print(f'Exception occur: {e}') |
592 | 596 | # back to orgin working directory,remote generated files |
|
0 commit comments