Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OS
U-Boot.Mirror
提交
00ef2cd6
U
U-Boot.Mirror
项目概览
OS
/
U-Boot.Mirror
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
U-Boot.Mirror
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
00ef2cd6
编写于
5月 16, 2018
作者:
T
Tom Rini
浏览文件
操作
浏览文件
下载
差异文件
Merge
git://git.denx.de/u-boot-dm
上级
f2d0f5e7
f717b4c8
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
44 addition
and
3 deletion
+44
-3
drivers/pinctrl/pinctrl-uclass.c
drivers/pinctrl/pinctrl-uclass.c
+6
-0
tools/buildman/builderthread.py
tools/buildman/builderthread.py
+4
-0
tools/buildman/control.py
tools/buildman/control.py
+25
-3
tools/buildman/func_test.py
tools/buildman/func_test.py
+9
-0
未找到文件。
drivers/pinctrl/pinctrl-uclass.c
浏览文件 @
00ef2cd6
...
...
@@ -198,6 +198,12 @@ static int pinctrl_select_state_simple(struct udevice *dev)
int
pinctrl_select_state
(
struct
udevice
*
dev
,
const
char
*
statename
)
{
/*
* Some device which is logical like mmc.blk, do not have
* a valid ofnode.
*/
if
(
!
ofnode_valid
(
dev
->
node
))
return
0
;
/*
* Try full-implemented pinctrl first.
* If it fails or is not implemented, try simple one.
...
...
tools/buildman/builderthread.py
浏览文件 @
00ef2cd6
...
...
@@ -6,6 +6,7 @@ import errno
import
glob
import
os
import
shutil
import
sys
import
threading
import
command
...
...
@@ -26,6 +27,9 @@ def Mkdir(dirname, parents = False):
os
.
mkdir
(
dirname
)
except
OSError
as
err
:
if
err
.
errno
==
errno
.
EEXIST
:
if
os
.
path
.
realpath
(
'.'
)
==
os
.
path
.
realpath
(
dirname
):
print
"Cannot create the current working directory '%s'!"
%
dirname
sys
.
exit
(
1
)
pass
else
:
raise
...
...
tools/buildman/control.py
浏览文件 @
00ef2cd6
...
...
@@ -80,6 +80,28 @@ def ShowActions(series, why_selected, boards_selected, builder, options):
print
(
'Total boards to build for each commit: %d
\n
'
%
len
(
why_selected
[
'all'
]))
def
CheckOutputDir
(
output_dir
):
"""Make sure that the output directory is not within the current directory
If we try to use an output directory which is within the current directory
(which is assumed to hold the U-Boot source) we may end up deleting the
U-Boot source code. Detect this and print an error in this case.
Args:
output_dir: Output directory path to check
"""
path
=
os
.
path
.
realpath
(
output_dir
)
cwd_path
=
os
.
path
.
realpath
(
'.'
)
while
True
:
if
os
.
path
.
realpath
(
path
)
==
cwd_path
:
Print
(
"Cannot use output directory '%s' since it is within the current directtory '%s'"
%
(
path
,
cwd_path
))
sys
.
exit
(
1
)
parent
=
os
.
path
.
dirname
(
path
)
if
parent
==
path
:
break
path
=
parent
def
DoBuildman
(
options
,
args
,
toolchains
=
None
,
make_func
=
None
,
boards
=
None
,
clean_dir
=
False
):
"""The main control code for buildman
...
...
@@ -251,9 +273,9 @@ def DoBuildman(options, args, toolchains=None, make_func=None, boards=None,
# output directory itself rather than any subdirectory.
if
not
options
.
no_subdirs
:
output_dir
=
os
.
path
.
join
(
options
.
output_dir
,
dirname
)
if
(
clean_dir
and
output_dir
!=
options
.
output_dir
and
os
.
path
.
exists
(
output_dir
)):
shutil
.
rmtree
(
output_dir
)
if
clean_dir
and
os
.
path
.
exists
(
output_dir
):
shutil
.
rmtree
(
output_dir
)
CheckOutputDir
(
output_dir
)
builder
=
Builder
(
toolchains
,
output_dir
,
options
.
git_dir
,
options
.
threads
,
options
.
jobs
,
gnu_make
=
gnu_make
,
checkout
=
True
,
show_unknown
=
options
.
show_unknown
,
step
=
options
.
step
,
...
...
tools/buildman/func_test.py
浏览文件 @
00ef2cd6
...
...
@@ -519,3 +519,12 @@ class TestFunctional(unittest.TestCase):
self
.
_RunControl
(
'-b'
,
self
.
_test_branch
,
clean_dir
=
False
)
self
.
assertEqual
(
self
.
_builder
.
count
,
self
.
_total_builds
)
self
.
assertEqual
(
self
.
_builder
.
fail
,
0
)
def
testBadOutputDir
(
self
):
"""Test building with an output dir the same as out current dir"""
self
.
_test_branch
=
'/__dev/__testbranch'
with
self
.
assertRaises
(
SystemExit
):
self
.
_RunControl
(
'-b'
,
self
.
_test_branch
,
'-o'
,
os
.
getcwd
())
with
self
.
assertRaises
(
SystemExit
):
self
.
_RunControl
(
'-b'
,
self
.
_test_branch
,
'-o'
,
os
.
path
.
join
(
os
.
getcwd
(),
'test'
))
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录