OHOS ERROR] exceptions.ohos_exception.OHOSException: COMPILE Failed! Please check error in /home/zhang/Desktop/OpenHarmony-v5.0.0-Release/OpenHarmony/out/rk3568/error.log, and for more build information in /home/zhang/Desktop/OpenHarmony-v5.0.0-Release/OpenHarmony/out/rk3568/build.log
[OHOS ERROR]
[OHOS ERROR] Code: 4000
[OHOS ERROR]
[OHOS ERROR] Reason: COMPILE Failed! Please check error in /home/zhang/Desktop/OpenHarmony-v5.0.0-Release/OpenHarmony/out/rk3568/error.log, and for more build information in /home/zhang/Desktop/OpenHarmony-v5.0.0-Release/OpenHarmony/out/rk3568/build.log
[OHOS ERROR]
[OHOS ERROR] Error Type: Ninja build error
[OHOS ERROR]
[OHOS ERROR] Description: An unknown error occurred while executing 'ninja -C'.
[OHOS ERROR]
[OHOS ERROR] Solution: no solution
[OHOS ERROR]
=====build error=====
# Copyright (c) 2021-2023 HiHope Open Source Organization .
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#update linux-6.6 kernel stdarg.h path to linux/stdarg.h
if [ ${KERNEL_VERSION} == "linux-6.6" ]
then
sed -i 's/<stdarg.h>/<linux\/stdarg.h>/' ${KERNEL_SRC_TMP_PATH}/bounds_checking_function/include/securec.h
sed -i 's/"stdarg.h"/"linux\/stdarg.h"/' ${ROOT_DIR}/drivers/hdf_core/framework/support/platform/src/fwk/platform_device.c
fi
#kernel patch
patch -p1 < ${KERNEL_PATCH}
#newip
if [ -f $NEWIP_PATCH_FILE ]; then
bash $NEWIP_PATCH_FILE ${ROOT_DIR} ${KERNEL_SRC_TMP_PATH} ${DEVICE_NAME} ${KERNEL_VERSION}
fi
#tzdriver
if [ -f $TZDRIVER_PATCH_FILE ]; then
bash $TZDRIVER_PATCH_FILE ${ROOT_DIR} ${KERNEL_SRC_TMP_PATH} ${DEVICE_NAME} ${KERNEL_VERSION}
fi
#xpm
if [ -f $XPM_PATCH_FILE ]; then
bash $XPM_PATCH_FILE ${ROOT_DIR} ${KERNEL_SRC_TMP_PATH} ${DEVICE_NAME} ${KERNEL_VERSION}
fi
#ced
if [ -f $CED_PATCH_FILE ]; then
bash $CED_PATCH_FILE ${ROOT_DIR} ${KERNEL_SRC_TMP_PATH} ${DEVICE_NAME} ${KERNEL_VERSION}
fi
#qos_auth
if [ -f $QOS_AUTH_PATCH_FILE ]; then
bash $QOS_AUTH_PATCH_FILE ${ROOT_DIR} ${KERNEL_SRC_TMP_PATH} ${DEVICE_NAME} ${KERNEL_VERSION}
fi
#hideaddr
if [ -f $HIDEADDR_PATCH_FILE ]; then
bash $HIDEADDR_PATCH_FILE ${ROOT_DIR} ${KERNEL_SRC_TMP_PATH} ${DEVICE_NAME} ${KERNEL_VERSION}
fi
#ucollection
if [ -f $UNIFIED_COLLECTION_PATCH_FILE ]; then
bash $UNIFIED_COLLECTION_PATCH_FILE ${ROOT_DIR} ${KERNEL_SRC_TMP_PATH} ${DEVICE_NAME} ${KERNEL_VERSION}
fi
#code_sign
if [ -f $CODE_SIGN_PATCH_FILE ]; then
bash $CODE_SIGN_PATCH_FILE ${ROOT_DIR} ${KERNEL_SRC_TMP_PATH} ${DEVICE_NAME} ${KERNEL_VERSION}
fi
#config
if [ ! -f "$DEFCONFIG_FORM_FILE" ]; then
DEFCONFIG_FORM_FILE=
echo "warning no form config file $(DEFCONFIG_FORM_FILE)"
fi
if [ ! -f "$DEFCONFIG_PROC_FILE" ]; then
DEFCONFIG_PROC_FILE=
echo "warning no prod config file $(DEFCONFIG_PROC_FILE)"
fi
bash ${ROOT_DIR}/kernel/linux/${KERNEL_VERSION}/scripts/kconfig/merge_config.sh -O ${KERNEL_SRC_TMP_PATH}/arch/arm64/configs/ -m ${DEFCONFIG_TYPE_FILE} ${DEFCONFIG_FORM_FILE} ${DEFCONFIG_ARCH_FILE} ${DEFCONFIG_PROC_FILE} ${DEFCONFIG_BASE_FILE}
mv ${KERNEL_SRC_TMP_PATH}/arch/arm64/configs/.config ${KERNEL_SRC_TMP_PATH}/arch/arm64/configs/rockchip_linux_defconfig
#selinux config patch
for arg in "$@"; do
if [ "$arg" = "is_release" ]; then
echo "close selinux kernel config CONFIG_SECURITY_SELINUX_DEVELOP in release version"
${KERNEL_SOURCE}/scripts/config --file ${KERNEL_SRC_TMP_PATH}/arch/arm64/configs/rockchip_linux_defconfig -d SECURITY_SELINUX_DEVELOP
fi
done
if [ $MAKE_OHOS_ENV == "GPUDRIVER=mesa3d" ]; then
python ${ROOT_DIR}/third_party/mesa3d/ohos/modifyDtsi.py ${KERNEL_SRC_TMP_PATH}/arch/arm64/boot/dts/rockchip/rk3568.dtsi
fi
}
set +e
is_kernel_change ${ROOT_DIR}
KERNEL_SOURCE_CHANGED=$?
set -e
if [ ${KERNEL_SOURCE_CHANGED} -ne 0 ]; then
echo "kernel or it's deps changed, start source update."
copy_and_patch_kernel_source
else
echo "no changes to kernel, skip source copy."
fi
# revert linux-6.6 hdf stdarg.h path
if [ ${KERNEL_VERSION} == "linux-6.6" ]
then
sed -i 's/"linux\/stdarg.h"/"stdarg.h"/' ${ROOT_DIR}/drivers/hdf_core/framework/support/platform/src/fwk/platform_device.c
fi
mkdir -p ${2}
if [ "enable_ramdisk" != "${13}" ]; then
cp ${KERNEL_OBJ_TMP_PATH}/boot_linux.img ${2}/boot_linux.img
fi
cp ${KERNEL_OBJ_TMP_PATH}/resource.img ${2}/resource.img
cp ${3}/loader/MiniLoaderAll.bin ${2}/MiniLoaderAll.bin
cp ${3}/loader/uboot.img ${2}/uboot.img
if [ "enable_absystem" == "${15}" ]; then
cp ${3}/loader/parameter_ab.txt ${2}/parameter_ab.txt
cp ${3}/loader/config_ab.cfg ${2}/config_ab.cfg
else
cp ${3}/loader/parameter.txt ${2}/parameter.txt
cp ${3}/loader/config.cfg ${2}/config.cfg
fi