aspeedg7: linux-gbmc: Fetch kernel source from git instead of tarball

Refactor the recipe to fetch the Linux kernel source directly from the
stable git repository. This replaces the previous method of downloading
a source tarball and a separate patch file.

This change simplifies the recipe by removing the custom
`do_kernel_checkout`
function, which was a workaround to create a git repo from the extracted
source. Using a git `SRC_URI` is cleaner and more aligned with standard
BitBake practices.

no fusion2 since all g7 platforms are in preEVT stage.

Tested: can build
Google-Bug-Id: n/a
Change-Id: Ib2a06a8c0c3594b989687a62dc5abb96dafd65c3
Signed-off-by: Tom Tung <tomtung@google.com>
diff --git a/recipes-kernel/linux/linux-gbmc_aspeedg7.bb b/recipes-kernel/linux/linux-gbmc_aspeedg7.bb
index 115c87a..0309e40 100644
--- a/recipes-kernel/linux/linux-gbmc_aspeedg7.bb
+++ b/recipes-kernel/linux/linux-gbmc_aspeedg7.bb
@@ -6,12 +6,8 @@
 PV = "aspeedg7-${LINUX_VERSION}"
 LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
 
-S = "${WORKDIR}/linux-${LINUX_MAJOR}"
-
-SRC_URI:prepend = " \
-  ${KERNELORG_MIRROR}/linux/kernel/v6.x/linux-${LINUX_MAJOR}.tar.xz;sha256sum=d926a06c63dd8ac7df3f86ee1ffc2ce2a3b81a2d168484e76b5b389aba8e56d0 \
-  ${KERNELORG_MIRROR}/linux/kernel/v6.x/patch-${LINUX_VERSION}.xz;sha256sum=5cf8db0daba2311c9dc3cfe95d7895e7217896520c49927f6e3dd2b6538b81f1 \
-  "
+SRC_URI:prepend = "git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git;protocol=https;branch=linux-${LINUX_MAJOR}.y"
+SRCREV = "ea583fe68de4fcceaf7131ad55866eafb195c8f2"
 
 SRC_URI:append = " \
   file://0001-jffs2-add-RENAME_EXCHANGE-support.patch \
@@ -86,34 +82,3 @@
 KCONFIG_MODE="--allnoconfig"
 # TODO(b/373416015) Remove this to enable CONFIGCHECK
 GBMC_CONFIGCHECK = "0"
-
-# Override poky/meta/classes-recipe/kernel-yocto.bbclass
-# Note: Applying patch-${LINUX_VERSION}.xz requires the presence of .gitignore
-# in the kernel source. We do not remove this file.
-do_kernel_checkout() {
-	set +e
-
-	source_dir=`echo ${S} | sed 's%/$%%'`
-	source_workdir="${WORKDIR}/git"
-
-	# case: we have no git repository at all. 
-	# To support low bandwidth options for building the kernel, we'll just 
-	# convert the tree to a git repo and let the rest of the process work unchanged
-
-	# if ${S} hasn't been set to the proper subdirectory a default of "linux" is 
-	# used, but we can't initialize that empty directory. So check it and throw a
-	# clear error
-
-	cd ${S}
-	if [ ! -f "Makefile" ]; then
-		bberror "S is not set to the linux source directory. Check "
-		bbfatal "the recipe and set S to the proper extracted subdirectory"
-	fi
-	git init
-	check_git_config
-	git add .
-	git commit -q -n -m "baseline commit: creating repo for ${PN}-${PV}"
-	git clean -d -f
-
-	set -e
-}