提交 32d74021 编写于 作者: S SimonLi

IssueNo: #I3EPRJ

Description: build device with no need to hb set
Sig: build
Feature or Bugfix: Feature
Binary Source: No
上级 594cd559
__pycache__/
*.py[cod]
.vscode
\ No newline at end of file
.vscode
*.swp
cscope.*
tags
......@@ -186,6 +186,8 @@ class Build():
if self._target is None and Device.is_in_device():
# Compile device board
device_path, kernel, board = Device.device_menuconfig()
# xxx: build device, no need to set root manually, so set it speculatively.
self.config.root_path = os.path.dirname(os.path.dirname(os.path.dirname(os.getcwd())))
self.config.out_path = os.path.join(self.config.root_path,
'out',
board)
......
......@@ -26,8 +26,7 @@ class Device():
@staticmethod
def is_in_device():
cwd_pardir = os.path.dirname(os.path.dirname(os.getcwd()))
config = Config()
return os.path.join(config.root_path, 'device') == cwd_pardir
return os.path.basename(cwd_pardir) == 'device'
@staticmethod
def is_kernel(kernel_path):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册