Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Kernel Liteos A
提交
aaa9018a
K
Kernel Liteos A
项目概览
OpenHarmony
/
Kernel Liteos A
8 个月 前同步成功
通知
450
Star
414
Fork
55
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
4
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel Liteos A
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
4
Issue
4
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
aaa9018a
编写于
7月 22, 2021
作者:
O
openharmony_ci
提交者:
Gitee
7月 22, 2021
浏览文件
操作
浏览文件
下载
差异文件
!455 内核二进制生成到target_out_dir中,避免误打包到rootfs中
Merge pull request !455 from Caoruihong/target_out_dir
上级
fa056ce2
3b5268f0
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
45 addition
and
16 deletion
+45
-16
BUILD.gn
BUILD.gn
+23
-9
kernel/BUILD.gn
kernel/BUILD.gn
+1
-0
kernel/extended/vdso/BUILD.gn
kernel/extended/vdso/BUILD.gn
+1
-1
kernel/extended/vdso/usr/BUILD.gn
kernel/extended/vdso/usr/BUILD.gn
+12
-4
kernel/user/BUILD.gn
kernel/user/BUILD.gn
+8
-2
未找到文件。
BUILD.gn
浏览文件 @
aaa9018a
...
...
@@ -160,7 +160,15 @@ config("public") {
]
}
config("los_config") {
config("los_nostdinc") {
cflags = [ "-nostdinc" ]
}
config("los_nostdlib") {
ldflags = [ "-nostdlib" ]
}
config("los_common") {
cflags = [
"-imacros",
"$LITEOS_MENUCONFIG_H",
...
...
@@ -168,16 +176,11 @@ config("los_config") {
defines = [ "__LITEOS__" ]
configs = [ ":arch_config" ]
ldflags = [ "-nostdlib" ]
cflags_c = [ "-std=c99" ]
cflags += [
"-fno-pic",
"-fno-builtin",
"-nostdinc",
"-Wall",
"-Werror",
"-fms-extensions",
...
...
@@ -250,6 +253,15 @@ config("los_config") {
asmflags = cflags
}
config("los_config") {
configs = [
":los_common",
":arch_config",
":los_nostdinc",
":los_nostdlib",
]
}
liteos_name = "liteos2"
liteos_out = rebase_path("$target_out_dir/$liteos_name")
executable(liteos_name) {
...
...
@@ -267,12 +279,14 @@ executable(liteos_name) {
libgcc = exec_script("//build/lite/run_shell_cmd.py", [ "$cc -print-libgcc-file-name" ], "trim string")
libs = [ libgcc ]
if (defined(LOSCFG_COMPILER_CLANG_LLVM)) {
l
ibs += [ "tools/build/liteos_llvm.ld"
]
l
dflags += [ "-Wl,-T" + rebase_path("tools/build/liteos_llvm.ld", root_build_dir)
]
} else {
l
ibs += [ "tools/build/liteos.ld"
]
l
dflags += [ "-Wl,-T" + rebase_path("tools/build/liteos.ld", root_build_dir)
]
ldflags += [ "-nostartfiles" ]
}
output_dir = target_out_dir
deps = [
":modules",
]
...
...
@@ -285,7 +299,7 @@ build_ext_component("build_liteos_bin") {
objcopy = "${compile_prefix}objcopy$toolchain_cmd_suffix"
objdump = "${compile_prefix}objdump$toolchain_cmd_suffix"
liteos = rebase_path("$
roo
t_out_dir/unstripped/bin/$liteos_name")
liteos = rebase_path("$
targe
t_out_dir/unstripped/bin/$liteos_name")
command = "$objcopy -O binary $liteos $liteos_out.bin"
command += " && sh -c '$objdump -t $liteos | sort >$liteos_out.sym.sorted'"
...
...
kernel/BUILD.gn
浏览文件 @
aaa9018a
...
...
@@ -44,5 +44,6 @@ config("public") {
"base:public",
"common:public",
"extended:public",
"user:public",
]
}
kernel/extended/vdso/BUILD.gn
浏览文件 @
aaa9018a
...
...
@@ -48,6 +48,6 @@ config("public") {
copy("copy_ohos_vdso") {
deps = [ "usr:OHOS-vdso" ]
sources = [
"$root_out_dir
/libOHOS-vdso.so" ]
sources = [
get_path_info("usr/", "out_dir") + "
/libOHOS-vdso.so" ]
outputs = [ "$root_out_dir/OHOS-vdso.so" ]
}
kernel/extended/vdso/usr/BUILD.gn
浏览文件 @
aaa9018a
...
...
@@ -40,15 +40,23 @@ shared_library("OHOS-vdso") {
]
cflags = [
"-nostdlib",
"-fPIC",
"-fno-common",
"-fno-strict-aliasing",
]
configs = []
configs += [ "$LITEOSTOPDIR:los_common" ]
configs += [ "$LITEOSTOPDIR:los_nostdlib" ]
configs += [ "$LITEOSTOPDIR:arch_config" ]
defines = [ "_XOPEN_SOURCE=700" ]
ldflags = [
"-s",
"-Bsymbolic",
"-
Tlos_vdso.ld"
,
"-
Wl,-
s",
"-
Wl,-
Bsymbolic",
"-
Wl,-T" + rebase_path("los_vdso.ld", root_build_dir)
,
]
output_dir = target_out_dir
}
kernel/user/BUILD.gn
浏览文件 @
aaa9018a
...
...
@@ -30,7 +30,7 @@
import("//kernel/liteos_a/liteos.gni")
module_name = "userinit"
shared_library
(module_name) {
executable
(module_name) {
sources = [ "src/los_user_init.c" ]
include_dirs = [
...
...
@@ -46,12 +46,18 @@ shared_library(module_name) {
ldflags = [
"-static",
"-r",
"-
Wl,-
r",
]
output_dir = target_out_dir
output_name = "lib$module_name"
output_extension = "O"
}
group("user") {
public_deps = [ ":$module_name" ]
}
config("public") {
lib_dirs = [ "$target_out_dir/unstripped/bin" ]
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录