Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
avocado
提交
26e41c59
A
avocado
项目概览
openeuler
/
avocado
通知
0
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
A
avocado
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
26e41c59
编写于
11月 05, 2018
作者:
C
Caio Carrara
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'praveen/fix_kernel'
Signed-off-by:
N
Caio Carrara
<
ccarrara@redhat.com
>
上级
639f77bd
c84ac6ba
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
17 addition
and
6 deletion
+17
-6
avocado/utils/kernel.py
avocado/utils/kernel.py
+17
-6
未找到文件。
avocado/utils/kernel.py
浏览文件 @
26e41c59
...
@@ -71,9 +71,15 @@ class KernelBuild(object):
...
@@ -71,9 +71,15 @@ class KernelBuild(object):
source tarball
source tarball
:type url: str or None
:type url: str or None
"""
"""
kernel_file
=
self
.
SOURCE
.
format
(
version
=
self
.
version
)
kernel_file
=
self
.
SOURCE
.
format
(
version
=
self
.
version
)
if
url
is
not
None
:
# if there's no url to override, the default is the one
# specified in the class
if
url
is
None
:
base_url
=
self
.
URL
.
format
(
major
=
self
.
version
.
split
(
'.'
,
1
)[
0
])
base_url
=
self
.
URL
.
format
(
major
=
self
.
version
.
split
(
'.'
,
1
)[
0
])
# however, if there's a url informed as a parameter, this one
# should be used as the base url.
else
:
else
:
base_url
=
url
base_url
=
url
full_url
=
base_url
+
kernel_file
full_url
=
base_url
+
kernel_file
...
@@ -94,7 +100,8 @@ class KernelBuild(object):
...
@@ -94,7 +100,8 @@ class KernelBuild(object):
Configure/prepare kernel source to build.
Configure/prepare kernel source to build.
"""
"""
self
.
linux_dir
=
os
.
path
.
join
(
self
.
work_dir
,
'linux-%s'
%
self
.
version
)
self
.
linux_dir
=
os
.
path
.
join
(
self
.
work_dir
,
'linux-%s'
%
self
.
version
)
build
.
make
(
self
.
linux_dir
,
extra_args
=
'-C %s mrproper'
%
self
.
linux_dir
)
build
.
make
(
self
.
linux_dir
,
extra_args
=
'-C %s mrproper'
%
self
.
linux_dir
)
if
self
.
config_path
is
not
None
:
if
self
.
config_path
is
not
None
:
dotconfig
=
os
.
path
.
join
(
self
.
linux_dir
,
'.config'
)
dotconfig
=
os
.
path
.
join
(
self
.
linux_dir
,
'.config'
)
shutil
.
copy
(
self
.
config_path
,
dotconfig
)
shutil
.
copy
(
self
.
config_path
,
dotconfig
)
...
@@ -114,10 +121,13 @@ class KernelBuild(object):
...
@@ -114,10 +121,13 @@ class KernelBuild(object):
if
self
.
distro
.
name
==
"Ubuntu"
:
if
self
.
distro
.
name
==
"Ubuntu"
:
build_output_format
=
"deb-pkg"
build_output_format
=
"deb-pkg"
if
self
.
config_path
is
None
:
if
self
.
config_path
is
None
:
build
.
make
(
self
.
linux_dir
,
extra_args
=
'-C %s defconfig'
%
self
.
linux_dir
)
build
.
make
(
self
.
linux_dir
,
extra_args
=
'-C %s defconfig'
%
self
.
linux_dir
)
else
:
else
:
build
.
make
(
self
.
linux_dir
,
extra_args
=
'-C %s olddefconfig'
%
self
.
linux_dir
)
build
.
make
(
self
.
linux_dir
,
extra_args
=
'-C %s olddefconfig'
%
build
.
make
(
self
.
linux_dir
,
extra_args
=
'-C %s %s'
%
(
self
.
linux_dir
,
build_output_format
))
self
.
linux_dir
)
build
.
make
(
self
.
linux_dir
,
extra_args
=
'-C %s %s'
%
(
self
.
linux_dir
,
build_output_format
))
def
install
(
self
):
def
install
(
self
):
"""
"""
...
@@ -125,7 +135,8 @@ class KernelBuild(object):
...
@@ -125,7 +135,8 @@ class KernelBuild(object):
"""
"""
log
.
info
(
"Starting kernel install"
)
log
.
info
(
"Starting kernel install"
)
if
self
.
distro
.
name
==
"Ubuntu"
:
if
self
.
distro
.
name
==
"Ubuntu"
:
process
.
run
(
'dpkg -i %s/*.deb'
%
self
.
work_dir
,
shell
=
True
,
sudo
=
True
)
process
.
run
(
'dpkg -i %s/*.deb'
%
self
.
work_dir
,
shell
=
True
,
sudo
=
True
)
else
:
else
:
log
.
info
(
"Skipping kernel install"
)
log
.
info
(
"Skipping kernel install"
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录