0
0
mirror of https://github.com/libretro/Lakka-LibreELEC.git synced 2025-02-28 16:51:23 +00:00
GavinDarkglider 82e5d624f6 More Nintendo Switch fixes (#1548)
* Downgrade glibc to 2.27 for L4T Builds.
* Downgrade binutils to 2.32 for L4T Builds.
* Update L4T Project Options
* Refactor tegra-bsp package
* Import/Rebase CTC's ffmpeg patches, and switch decoder to nvv4l2 from nvmpi. Fixes decoder issues
* Enable all disabled cores
* Remove hack in busybox package to dump firmware into L4T Builds, we now handle this in tegra-bsp package.
* More L4T project cleanups
* Bring switch-bootloader package.mk inline with upstream formatting
* Fix reboot_payload
* Add proper tegra-bsp:init support
* Bootloader cleanups, seperate bootloader stuff for libreelec builds
* Update init for supporting all distros on Nintendo Switch
* Add proper splash images for libreelec builds.
* Final bootloader fixes
* switch-bootloader-merge-fixes
* Fix uboot merge issues
* fix bmp
* It all builds
* add Basic USB Gadget(Serial console only)
* Properly fix mtp, and finish gadget stuff
2021-11-24 00:06:43 +01:00

58 lines
2.0 KiB
Plaintext
Executable File

# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)
# Handler for git, creates shallow clone of the package repository
# Usage (in package.mk):
# PKG_URL (mandatory) must point to a git repository (git://... or https://example.com/repo.git)
# PKG_VERSION (mandatory) must point to a full commit SHA
# PKG_GIT_CLONE_BRANCH (optional) clone specific branch (used here only for stamp, but can be used by other scripts to update the PKG_VERSION)
GIT_STAMP="${PKG_URL}|${PKG_VERSION}"
[ -n "${PKG_GIT_CLONE_BRANCH}" ] && GIT_STAMP+="|${PKG_GIT_CLONE_BRANCH}"
GIT_TARBALL="${PACKAGE}.tar.xz"
GIT_STAMP_FILE="${GIT_TARBALL}.gitstamp"
GIT_TAR_SOURCE="${1}-${PKG_VERSION}"
_get_repo_already_downloaded() {
if [ -f "${GIT_TARBALL}" -a -f "${GIT_STAMP_FILE}" ]; then
[ "${GIT_STAMP}" = "$(cat ${GIT_STAMP_FILE} 2>/dev/null)" ] && return 0
fi
return 1
}
# Latest file already present, exit now...
_get_repo_already_downloaded && exit 0
lock_source_dir "${1}"
# Check again in case of concurrent access - if nothing needs to be downloaded, exit now...
_get_repo_already_downloaded && exit 0
# At this point, we need to download something...
build_msg "CLR_GET" "GET" "${1} (git)" "indent"
pkg_lock_status "GETPKG" "${PKG_NAME}" "unpack" "processing package repository..."
rm -rf "${STAMP_URL}" "${STAMP_SHA}" "${PACKAGE}" "${GIT_TARBALL}" "${GIT_STAMP_FILE}"
mkdir -p "${PACKAGE}"
git -C "${PACKAGE}" init
git -C "${PACKAGE}" remote add origin ${PKG_URL}
build_msg "CLR_GET" "GIT FETCH" "${1}"
git -C "${PACKAGE}" fetch --depth 1 origin ${PKG_VERSION}
git -C "${PACKAGE}" checkout FETCH_HEAD
if [ "${GET_SKIP_SUBMODULE}" != "yes" ]; then
build_msg "CLR_GET" "GIT SUBMODULE" "${1}"
git -C "${PACKAGE}" submodule update --init --recursive --depth 1
fi
build_msg "CLR_GET" "GIT TARBALL" "${1}"
echo "Creating tarball from the package repository..."
tar --create --file ${GIT_TARBALL} --remove-files --xz --directory=${SOURCES}/${1} ${GIT_TAR_SOURCE}
echo "${GIT_STAMP}" > ${GIT_STAMP_FILE}