From 09b23225bdc30a50f5dd7cbf6a18d517dd2198ce Mon Sep 17 00:00:00 2001 From: saarloos <9090-90-90-9090@163.com> Date: Fri, 10 Jun 2022 16:40:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B5=8C=E5=85=A5=E5=BC=8F=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E5=88=86=E6=94=AF=E6=8C=87=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script/embedded/compile/build.sh | 4 +++- script/embedded/compile/download.sh | 9 ++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/script/embedded/compile/build.sh b/script/embedded/compile/build.sh index 7b63de4..b48f9a5 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 c359cc5..a9d107b 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 $? -- Gitee