From 74ad3a824ec843f94b918dd7e5e39cbfa085a1c7 Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Mon, 2 Dec 2019 15:07:30 +0000 Subject: u-boot-toradex: use new versioning Use toradex-u-boot-localversion class to implement the new versioning scheme for U-Boot. Signed-off-by: Stefan Agner --- classes/tegra-u-boot-localversion.bbclass | 29 ------------------------ recipes-bsp/u-boot/u-boot-toradex-common-tk1.inc | 6 +---- 2 files changed, 1 insertion(+), 34 deletions(-) delete mode 100644 classes/tegra-u-boot-localversion.bbclass diff --git a/classes/tegra-u-boot-localversion.bbclass b/classes/tegra-u-boot-localversion.bbclass deleted file mode 100644 index c7de249..0000000 --- a/classes/tegra-u-boot-localversion.bbclass +++ /dev/null @@ -1,29 +0,0 @@ -# Toradex Tegra U-Boot LOCALVERSION extension -# -# This allow to easy reuse of code between different U-Boot recipes -# -# The following options are supported: -# -# SCMVERSION Puts the Git hash in U-Boot local version -# LOCALVERSION Value used in LOCALVERSION (default to '+fslc') -# -# Copied from meta-freescale/classes/fsl-u-boot-localversion.bbclass -# Copyright 2014 (C) O.S. Systems Software LTDA. -# Copyright 2017 (C) Toradex Inc. - -SCMVERSION ??= "y" -LOCALVERSION ??= "-${TDX_VER_ITEM}" - -UBOOT_LOCALVERSION = "${LOCALVERSION}" - -do_compile_prepend() { - if [ "${SCMVERSION}" = "y" ]; then - # Add GIT revision to the local version - head=`cd ${S} ; git rev-parse --verify --short HEAD 2> /dev/null` - printf "%s%s%s" "${UBOOT_LOCALVERSION}" +g $head > ${S}/.scmversion - printf "%s%s%s" "${UBOOT_LOCALVERSION}" +g $head > ${B}/.scmversion - else - printf "%s" "${UBOOT_LOCALVERSION}" > ${S}/.scmversion - printf "%s" "${UBOOT_LOCALVERSION}" > ${B}/.scmversion - fi -} diff --git a/recipes-bsp/u-boot/u-boot-toradex-common-tk1.inc b/recipes-bsp/u-boot/u-boot-toradex-common-tk1.inc index ed5cf49..907b3f4 100644 --- a/recipes-bsp/u-boot/u-boot-toradex-common-tk1.inc +++ b/recipes-bsp/u-boot/u-boot-toradex-common-tk1.inc @@ -7,8 +7,7 @@ LIC_FILES_CHKSUM = "file://Licenses/README;md5=30503fd321432fc713238f582193b78e" PE = "1" PV = "2019.07+git${SRCPV}" -LOCALVERSION = "-${TDX_VER_ITEM}" -inherit tegra-u-boot-localversion +inherit toradex-u-boot-localversion # We use the revision in order to avoid having to fetch it from the # repo during parse @@ -20,6 +19,3 @@ SRCBRANCH_use-head-next = "toradex_2019.07-next" SRC_URI = "git://git.toradex.com/u-boot-toradex.git;protocol=https;branch=${SRCBRANCH}" S = "${WORKDIR}/git" - -# defaults -TDX_VER_ITEM ??= "0" -- cgit v1.2.3