提交 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__/ __pycache__/
*.py[cod] *.py[cod]
.vscode .vscode
\ No newline at end of file *.swp
cscope.*
tags
...@@ -186,6 +186,8 @@ class Build(): ...@@ -186,6 +186,8 @@ class Build():
if self._target is None and Device.is_in_device(): if self._target is None and Device.is_in_device():
# Compile device board # Compile device board
device_path, kernel, board = Device.device_menuconfig() 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, self.config.out_path = os.path.join(self.config.root_path,
'out', 'out',
board) board)
......
...@@ -26,8 +26,7 @@ class Device(): ...@@ -26,8 +26,7 @@ class Device():
@staticmethod @staticmethod
def is_in_device(): def is_in_device():
cwd_pardir = os.path.dirname(os.path.dirname(os.getcwd())) cwd_pardir = os.path.dirname(os.path.dirname(os.getcwd()))
config = Config() return os.path.basename(cwd_pardir) == 'device'
return os.path.join(config.root_path, 'device') == cwd_pardir
@staticmethod @staticmethod
def is_kernel(kernel_path): def is_kernel(kernel_path):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册