diff --git a/script/embedded/compile/build.sh b/script/embedded/compile/build.sh index 7b63de44334c73738f515c8fb979b43572ec9a2a..b48f9a54e4000c8e1275039520342cea3f8e862f 100755 --- a/script/embedded/compile/build.sh +++ b/script/embedded/compile/build.sh @@ -52,10 +52,12 @@ local is_download_code="$3" local is_install_tools="$4" [[ -z "$is_download_code" ]] && { is_download_code="yes"; } [[ -z "$is_install_tools" ]] && { is_install_tools="no"; } +local meta_branch="$5" +local software_branch="$6" chmod a+r "${SCRIPTS_DIR}"/*.sh ##download codes and install tools local datetime="$(date +%Y%m%d%H%M%S)" -[[ "${is_download_code}" == "yes" ]] && sh -x "${SCRIPTS_DIR}"/download.sh "$is_install_tools" +[[ "${is_download_code}" == "yes" ]] && sh -x "${SCRIPTS_DIR}"/download.sh "$is_install_tools" "$meta_branch" "$software_branch" #[[ -z "${archlist}" ]] && archlist="qemu-arm qemu-aarch64 raspberrypi4-64" [[ -z "${archlist}" ]] && archlist="arm-std aarch64-std aarch64-pro raspberrypi4-64" #delete log file from dnf diff --git a/script/embedded/compile/download.sh b/script/embedded/compile/download.sh index c359cc516ed7becf724d4862631dbd224cbe75c3..a9d107b0e6b7018748c44a561052693a07f43500 100755 --- a/script/embedded/compile/download.sh +++ b/script/embedded/compile/download.sh @@ -131,6 +131,9 @@ TOOLS_INSTALL_DIR="/opt/buildtools" URL_PREFIX="https://gitee.com/" is_install_tools=$1 +meta_branch="$2" +software_branch="$3" + if [[ "$is_install_tools" == "yes" ]];then download_gcc #install_ninja @@ -147,8 +150,12 @@ python --version | grep " 3" || ln -sf /usr/bin/python3 /usr/local/bin/python fi YOCTO_BRANCH="master" +if [[ -n "$meta_branch" ]]; then + YOCTO_BRANCH="$meta_branch" +fi + download_code #download kernel by tag, cannot change tag automatically rm -rf "${SRC_DIR}"/kernel-5.10 -sh "${SRC_DIR}"/yocto-meta-openeuler/scripts/download_code.sh +sh "${SRC_DIR}"/yocto-meta-openeuler/scripts/download_code.sh "" "$software_branch" exit $?