From 59fc16fe202e2145379ca878e65c592bed7af880 Mon Sep 17 00:00:00 2001 From: Pavan-Nokia <120486223+Pavan-Nokia@users.noreply.github.com> Date: Wed, 31 May 2023 04:41:16 -0400 Subject: [PATCH] [arm64] Fix marvell-arm64 pipeline build (#15228) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Why I did it When git clone -b xxx command is used the versions-git will reset the HEAD of the git to the commit ID in the versions-git file. Which causes incorrect commit to be checked out causing build errors. Work item tracking Microsoft ADO (number only): How I did it Split ‘git clone -b’ into two steps to avoid owerwrite Git clone cd mrvl-prestera; git checkout ; cd .. How to verify it Build marvell-arm64 target using below instructions make init make configure PLATFORM=marvell-arm64 PLATFORM_ARCH=arm64 make target/sonic-marvell-arm64.bin SONIC_BUILD_JOBS=2 --- platform/marvell-arm64/prestera/debian/rules | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/platform/marvell-arm64/prestera/debian/rules b/platform/marvell-arm64/prestera/debian/rules index 8601b509ee..bf223af19b 100755 --- a/platform/marvell-arm64/prestera/debian/rules +++ b/platform/marvell-arm64/prestera/debian/rules @@ -21,7 +21,8 @@ clean: build: # get sources rm -rf mrvl-prestera || true - git clone -b ${MRVL_PRESTERA_SRC_TAG} ${MRVL_PRESTERA_SRC_URL} + git clone ${MRVL_PRESTERA_SRC_URL} + cd mrvl-prestera && git checkout ${MRVL_PRESTERA_SRC_TAG} && cd .. sed "s/KVERSION/${KVERSION}/g" /sonic/platform/marvell-arm64/prestera/debian/mrvlprestera.install.template > /sonic/platform/marvell-arm64/prestera/debian/mrvlprestera.install make modules -C $(KERNEL_SRC)/build M=$(MOD_SRC_DIR)/$(MODULE_DIR)/