Skip to content

Commit 691cb2b

Browse files
committed
conf/genconf.py: use core key in the json config if present
Signed-off-by: Huaqi Fang <578567190@qq.com>
1 parent d0ebafc commit 691cb2b

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

conf/genconf.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/python3
1+
#!/bin/env python3
22
import re
33
import json
44
import glob
@@ -323,12 +323,16 @@ def update_openocd_config(file_path, **kwargs):
323323
board_timer_freq = None
324324
board_irqmax = None
325325

326+
board_cpucore = "ux900fd"
326327
try:
327328
cust_file = args.custsoc
328329

329330
with open(args.conf, 'r') as conf_file:
330331
conf_data = json.load(conf_file)
331332

333+
if 'cpu_config' in conf_data:
334+
board_cpucore = conf_data['cpu_config'].get("core", "ux900fd")
335+
332336
if 'general_config' in conf_data:
333337
general_config = conf_data['general_config']
334338
if 'ddr' in general_config:
@@ -557,10 +561,10 @@ def update_openocd_config(file_path, **kwargs):
557561

558562
print("\n===generate successfully!===\n")
559563
print("Here are the reference build commands for compiling Linux SDK for you:")
560-
print("$cd ..")
561-
print("$make SOC=%s CORE=ux900fd BOOT_MODE=sd freeloader bootimages" % args.custsoc)
562-
print("$make SOC=%s CORE=ux900fd BOOT_MODE=sd run_qemu" % args.custsoc)
563-
print("Please adjust the compilation parameters according to your real environment.")
564+
print("$ cd ..")
565+
print("$ make SOC=%s CORE=%s BOOT_MODE=sd freeloader bootimages" % (args.custsoc, board_cpucore))
566+
print("$ make SOC=%s CORE=%s BOOT_MODE=sd run_qemu" % (args.custsoc, board_cpucore))
567+
print("Please adjust the compilation parameters according to your real hardware environment.")
564568
except Exception as e:
565569
print(f'Exception occur: {e}')
566570
# back to orgin working directory,remote generated files

0 commit comments

Comments
 (0)