chore: place .config files under config dir of products
place .config files under config dir of products Signed-off-by: Caoruihong <crh.cao@huawei.com> Change-Id: I80c6641ae462d4888a6f3124f92b4c9d7fa1567b
This commit is contained in:
parent
72d9aa1bcb
commit
6d948a42bb
6
BUILD.gn
6
BUILD.gn
|
@ -73,14 +73,10 @@ lite_subsystem("kernel") {
|
||||||
|
|
||||||
build_ext_component("make") {
|
build_ext_component("make") {
|
||||||
exec_path = rebase_path(".", root_build_dir)
|
exec_path = rebase_path(".", root_build_dir)
|
||||||
tee_enable = "false"
|
|
||||||
if (board_name == "hi3516dv300" && enable_tee_ree) {
|
|
||||||
tee_enable = "tee"
|
|
||||||
}
|
|
||||||
outdir = rebase_path(get_path_info(".", "out_dir"))
|
outdir = rebase_path(get_path_info(".", "out_dir"))
|
||||||
sysroot_path = rebase_path(ohos_current_sysroot)
|
sysroot_path = rebase_path(ohos_current_sysroot)
|
||||||
arch_cflags = string_join(" ", target_arch_cflags)
|
arch_cflags = string_join(" ", target_arch_cflags)
|
||||||
command = "./build.sh ${board_name} ${ohos_build_compiler} ${root_build_dir} ${ohos_build_type} ${tee_enable}"
|
command = "./build.sh ${board_name} ${ohos_build_compiler} ${root_build_dir} ${ohos_build_type} \"${tee_enable}\""
|
||||||
command += " \"${device_company}\" \"${product_path}\" $outdir \"${ohos_version}\" ${sysroot_path} \"${arch_cflags}\""
|
command += " \"${device_company}\" \"${product_path}\" $outdir \"${ohos_version}\" ${sysroot_path} \"${arch_cflags}\""
|
||||||
command += " \"${device_path}\""
|
command += " \"${device_path}\""
|
||||||
}
|
}
|
||||||
|
|
33
build.sh
33
build.sh
|
@ -48,44 +48,33 @@ echo "sh param:" "$@"
|
||||||
|
|
||||||
function main() {
|
function main() {
|
||||||
destination=".config"
|
destination=".config"
|
||||||
config_file=""
|
|
||||||
tee=""
|
tee=""
|
||||||
if [ "${tee_enable}" = "tee" ]; then
|
if [ "${tee_enable}" = "true" ]; then
|
||||||
tee="_tee"
|
tee="_tee"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
config_file="${product_path}/config/${ohos_build_type}${tee}.config"
|
||||||
|
if [ -f "${config_file}" ]; then
|
||||||
|
cp "${config_file}" "${destination}"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
product_name=$(basename "${product_path}")
|
product_name=$(basename "${product_path}")
|
||||||
source="tools/build/config/${product_name}_release.config"
|
config_file="${product_name}_release.config"
|
||||||
if [ "${ohos_build_compiler}" = "clang" ]; then
|
if [ "${ohos_build_compiler}" = "clang" ]; then
|
||||||
if [ "${ohos_build_type}" = "debug" ]; then
|
if [ "${ohos_build_type}" = "debug" ]; then
|
||||||
config_file="${product_name}_${ohos_build_compiler}${tee}.config"
|
config_file="debug/${product_name}_${ohos_build_compiler}${tee}.config"
|
||||||
source="tools/build/config/debug/${config_file}"
|
|
||||||
else
|
else
|
||||||
config_file="${product_name}_${ohos_build_compiler}_release${tee}.config"
|
config_file="${product_name}_${ohos_build_compiler}_release${tee}.config"
|
||||||
source="tools/build/config/${config_file}"
|
|
||||||
fi
|
fi
|
||||||
elif [ "${ohos_build_compiler}" = "gcc" ]; then
|
elif [ "${ohos_build_compiler}" = "gcc" ]; then
|
||||||
if [ "${ohos_build_type}" = "debug" ]; then
|
if [ "${ohos_build_type}" = "debug" ]; then
|
||||||
config_file="${product_name}_debug_shell${tee}.config"
|
config_file="${product_name}_debug_shell${tee}.config"
|
||||||
source="tools/build/config/${config_file}"
|
|
||||||
else
|
else
|
||||||
config_file="${product_name}_release${tee}.config"
|
config_file="${product_name}_release${tee}.config"
|
||||||
source="tools/build/config/${config_file}"
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [ -d "./out" ]; then
|
cp "tools/build/config/${config_file}" "${destination}"
|
||||||
rm -rf ./out
|
|
||||||
fi
|
|
||||||
if [ -f "${destination}" ]; then
|
|
||||||
rm -rf ${destination}
|
|
||||||
fi
|
|
||||||
if [ ! -f "${source}" ]; then
|
|
||||||
source="${product_path}/config/sys/${config_file}"
|
|
||||||
fi
|
|
||||||
cp "${source}" ${destination}
|
|
||||||
|
|
||||||
test_info_outdir="../..${root_build_dir}/test_info/gen/kernel/test"
|
|
||||||
mkdir -p "${test_info_outdir}"
|
|
||||||
cp kernel_test.sources "${test_info_outdir}"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ "x" != "x${sysroot_path}" ]; then
|
if [ "x" != "x${sysroot_path}" ]; then
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
../../kernel/liteos_a/test/apps/src/osTest.c
|
|
Loading…
Reference in New Issue