Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Kernel Liteos A
提交
bf7b2c0a
K
Kernel Liteos A
项目概览
OpenHarmony
/
Kernel Liteos A
1 年多 前同步成功
通知
460
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看板
提交
bf7b2c0a
编写于
7月 01, 2021
作者:
O
openharmony_ci
提交者:
Gitee
7月 01, 2021
浏览文件
操作
浏览文件
下载
差异文件
!386 支持单独编译内核
Merge pull request !386 from Caoruihong/build_alone
上级
abbeca1c
d7672d47
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
21 addition
and
15 deletion
+21
-15
Makefile
Makefile
+15
-9
apps/config.mk
apps/config.mk
+1
-1
apps/mksh/Makefile
apps/mksh/Makefile
+2
-2
apps/toybox/Makefile
apps/toybox/Makefile
+2
-2
kernel/extended/vdso/usr/Makefile
kernel/extended/vdso/usr/Makefile
+1
-1
未找到文件。
Makefile
浏览文件 @
bf7b2c0a
...
...
@@ -116,6 +116,15 @@ else
$(HIDE)$(SCRIPTS_PATH)
/mklibversion.sh
endif
##### make sysroot #####
sysroot
:
ifeq
($(LOSCFG_COMPILER_CLANG_LLVM), y)
ifeq
($(wildcard $(SYSROOT_PATH)/usr/include/$(LLVM_TARGET)/),)
$(HIDE)$(MAKE)
-C
$(SYSROOT_PATH)
/build
TARGETS
=
liteos_a_user
endif
$(HIDE)
echo
"sysroot:"
$(
abspath
$(SYSROOT_PATH)
)
endif
##### make dynload #####
-include
$(LITEOS_MK_PATH)/dynload.mk
...
...
@@ -132,7 +141,7 @@ $(OUT): $(LITEOS_MENUCONFIG_H)
$(BUILD)
:
$(HIDE)
mkdir
-p
$(BUILD)
$(LITEOS_LIBS_TARGET)
:
$(__LIBS)
$(LITEOS_LIBS_TARGET)
:
$(__LIBS)
sysroot
$(HIDE)
for
dir
in
$(LIB_SUBDIRS)
;
\
do
$(MAKE)
-C
$$
dir
all
||
exit
1
;
\
done
...
...
@@ -151,7 +160,7 @@ genconfig:$(MENUCONFIG_CONF)
$(LITEOS_MENUCONFIG_H)
:
.config
$(HIDE)$(MAKE)
genconfig
$(LITEOS_TARGET)
:
$(__LIBS)
$(LITEOS_TARGET)
:
$(__LIBS)
sysroot
$(HIDE)
touch
$(LOSCFG_ENTRY_SRC)
$(HIDE)for
dir
in
$(LITEOS_SUBDIRS);
\
...
...
@@ -165,18 +174,14 @@ $(LITEOS_TARGET): $(__LIBS)
$(OBJDUMP)
-d
$(OUT)/$@
>$(OUT)/$@.asm
# $(NM) -S --size-sort $(OUT)/$@ >$(OUT)/$@.size
$(APPS)
:
$(LITEOS_TARGET)
$(APPS)
:
$(LITEOS_TARGET)
sysroot
$(HIDE)$(MAKE)
-C
apps all
ifeq
($(LOSCFG_COMPILER_CLANG_LLVM), y)
MULTILIB
:=
$(
patsubst
$(
shell
$(CC)
--target
=
$(LLVM_TARGET)
$(ARCH_CFLAGS)
-print-file-name
=
lib/
$(LLVM_TARGET)
/
)
%,%,
$(
dir
$(
shell
$(CC)
--target
=
$(LLVM_TARGET)
$(ARCH_CFLAGS)
-print-libgcc-file-name
)))
endif
prepare
:
$(HIDE)
mkdir
-p
$(OUT)
/musl
ifeq
($(LOSCFG_COMPILER_CLANG_LLVM), y)
$(HIDE)
cp
-f
$
(SYSROOT_PATH)
/usr/lib/
$(LLVM_TARGET)
/
$(MULTILIB)
/libc.so
$(OUT)
/musl
$(HIDE)
cp
-f
$
(LITEOS_COMPILER_PATH)
/lib/
$(LLVM_TARGET)
/c++/
$(MULTILIB)
/libc++.so
$(OUT)
/musl
$(HIDE)
cp
-f
$
$
(
$(CC)
--target
=
$(LLVM_TARGET)
--sysroot
=
$(SYSROOT_PATH)
$(LITEOS_CFLAGS)
-print-file-name
=
libc.so
)
$(OUT)
/musl
$(HIDE)
cp
-f
$
$
(
$(GPP)
--target
=
$(LLVM_TARGET)
--sysroot
=
$(SYSROOT_PATH)
$(LITEOS_CXXFLAGS)
-print-file-name
=
libc++.so
)
$(OUT)
/musl
else
$(HIDE)
cp
-f
$(LITEOS_COMPILER_PATH)
/target/usr/lib/libc.so
$(OUT)
/musl
$(HIDE)
cp
-f
$(LITEOS_COMPILER_PATH)
/arm-linux-musleabi/lib/libstdc++.so.6
$(OUT)
/musl
...
...
@@ -225,3 +230,4 @@ update_all_config:
$(HIDE)
test
-f
tools/build/config/
$@
&&
cp
tools/build/config/
$@
.config
&&
$(MENUCONFIG_MCONF)
$(KCONFIG_FILE_PATH)
&&
$(MENUCONFIG_CONF)
--savedefconfig
tools/build/config/
$@
$(KCONFIG_FILE_PATH)
.PHONY
:
all lib clean cleanall $(LITEOS_TARGET) debug release help update_all_config
.PHONY
:
prepare sysroot cleanrootfs $(ROOTFS) $(ROOTFSDIR) $(APPS) menuconfig genconfig $(LITEOS_LIBS_TARGET) $(__LIBS) $(OUT)
apps/config.mk
浏览文件 @
bf7b2c0a
...
...
@@ -44,7 +44,7 @@ CFLAGS := -std=c99 -fno-exceptions $(BASE_OPTS) $(LITEOS_COPTS_OPTMIZE)
CXXFLAGS
:=
-std
=
c++11
-fexceptions
-fpermissive
-frtti
$(BASE_OPTS)
$(LITEOS_COPTS_OPTMIZE)
LDCFLAGS
:=
-lc
ifeq
($(LOSCFG_COMPILER_CLANG_LLVM), y)
LLVM_SYSROOT
:=
--sysroot
=
$(SYSROOT_PATH)
$(ARCH_CFLAGS)
LLVM_SYSROOT
:=
--sysroot
=
$(SYSROOT_PATH)
LDCXXFLGS
:=
-lc
++
-lc
++abi
-lc
else
BASE_OPTS
+=
-Wl
,-z,relro,-z,now
...
...
apps/mksh/Makefile
浏览文件 @
bf7b2c0a
...
...
@@ -39,10 +39,10 @@ BUILD_LOG := $(MKSH_DIR)/build.log
TARGET_OS
:=
OpenHarmony
LOCAL_CFLAGS
:=
-flto
-fdata-sections
-ffunction-sections
-Oz
-fstack-protector-strong
-D_FORTIFY_SOURCE
=
2
LOCAL_CFLAGS
+=
--target
=
arm-liteos
$(LLVM_SYSROOT)
LOCAL_CFLAGS
+=
--target
=
$(LLVM_TARGET)
$(LLVM_SYSROOT)
LOCAL_CFLAGS
+=
-DMKSH_DISABLE_TTY_WARNING
-DMKSH_SMALL
=
1
-DMKSH_ASSUME_UTF8
=
1
-DMKSH_SMALL_BUT_FAST
=
0
-DMKSH_S_NOVI
=
1
-DHAVE_CAN_FSTACKPROTECTORSTRONG
=
1
LOCAL_CFLAGS
+=
-DMKSH_LESS_CMDLINE_EDITING
-DMKSH_LESS_BUILDINS
-DMKSH_NO_INITCOMS
-DADAPT_FOR_LITEOS_A
LOCAL_LDFLAGS
:=
-Wl
,--gc-sections
-flto
-O2
--target
=
arm-liteos
$(LLVM_SYSROOT)
LOCAL_LDFLAGS
:=
-Wl
,--gc-sections
-flto
-O2
--target
=
$(LLVM_TARGET)
$(LLVM_SYSROOT)
all
:
$(MKSH)
...
...
apps/toybox/Makefile
浏览文件 @
bf7b2c0a
...
...
@@ -46,8 +46,8 @@ else
$(HIDE)$(CP)
$(LITEOSTHIRDPARTY)
/
$(TOYBOX)
/.
$(BUILD_DIR)
$(HIDE)$(CP)
-p
$(LITEOSTHIRDPARTY)
/
$(TOYBOX)
/porting/liteos_a/.
$(BUILD_DIR)
endif
$(HIDE)CFLAGS
=
"-D_FORTIFY_SOURCE=2 -fstack-protector-strong --target=
arm-liteos
$(LLVM_SYSROOT)
"
CC
=
"
$(CC)
"
OUTNAME
=
$(OUTNAME)
\
LDFLAGS
=
"--target=
arm-liteos
$(LLVM_SYSROOT)
"
\
$(HIDE)CFLAGS
=
"-D_FORTIFY_SOURCE=2 -fstack-protector-strong --target=
$(LLVM_TARGET)
$(LLVM_SYSROOT)
"
CC
=
"
$(CC)
"
OUTNAME
=
$(OUTNAME)
\
LDFLAGS
=
"--target=
$(LLVM_TARGET)
$(LLVM_SYSROOT)
"
\
make
-C
$(BUILD_DIR)
toybox
-j
>
$(BUILD_LOG)
2>&1
$(HIDE)$(CP)
$(BUILD_DIR)
/
$(TOYBOX)
.
$(HIDE)$(STRIP)
$(TOYBOX)
...
...
kernel/extended/vdso/usr/Makefile
浏览文件 @
bf7b2c0a
...
...
@@ -40,7 +40,7 @@ VDSO_INCLUDE := -I $(LITEOSTOPDIR)/kernel/extended/vdso/include \
VDSO_CCFLAGS
:=
-nostdlib
-fPIC
-fno-common
-fno-strict-aliasing
\
$(LITEOS_SSP)
$(LITEOS_CORE_COPTS)
$(WARNING_AS_ERROR)
$(LITEOS_COPTS_OPTMIZE)
ifeq
($(LOSCFG_COMPILER_CLANG_LLVM), y)
VDSO_CCFLAGS
+=
$(LLVM_EXTRA_OPTS)
--sysroot
=
$(SYSROOT_PATH)
$(ARCH_CFLAGS)
VDSO_CCFLAGS
+=
$(LLVM_EXTRA_OPTS)
--sysroot
=
$(SYSROOT_PATH)
endif
VDSO_LDFLAGS
:=
-shared
-s
-Bsymbolic
-T
los_vdso.ld
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录