Skip to contentSkip to conversation

u-boot: Factor out common bits

PATCH In review Marek Vasut 4 participants 20 messages Oct 18, 2016 – Oct 20, 2016

lore
Share & tools
lore
#4 lore raw

PATCH 3/5 u-boot: Drop the +git part from PV

In reply to Marek Vasut

The U-Boot package is using release versions of U-Boot, so drop the extra +git part from PV.

Cc Richard Purdie <[email protected]>
Cc Denys Dmytriyenko <[email protected]>
---
 meta/recipes-bsp/u-boot/u-boot-common_2016.09.01.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-bsp/u-boot/u-boot-common_2016.09.01.inc +1 -1
index ead5077..0a90621 100644
@@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6"
 # repo during parse
 SRCREV = "f3363c060497515ca8b71451cb56f3ec0abacaa9"
 
-PV = "v2016.09.01+git${SRCPV}"
+PV = "v2016.09.01"
 
 SRC_URI = "git://git.denx.de/u-boot.git;branch=u-boot-2016.09.y"
 
Signature · 1 line
2.9.3
#6 lore raw

PATCH 4/5 u-boot: Drop PV altogether

In reply to Marek Vasut

Drop the explicit setting of PV altogether. This changes the U-Boot version string from "v20yy.mm" to "20yy.mm" , so layer setting the PREFERRED_VERSION_u-boot must be updated by removing the leading 'v'.

Cc Richard Purdie <[email protected]>
Cc Denys Dmytriyenko <[email protected]>
---
 meta/recipes-bsp/u-boot/u-boot-common_2016.09.01.inc | 2 --
 1 file changed, 2 deletions(-)
meta/recipes-bsp/u-boot/u-boot-common_2016.09.01.inc +0 -2
index 0a90621..a535df1 100644
@@ -9,8 +9,6 @@ LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6"
 # repo during parse
 SRCREV = "f3363c060497515ca8b71451cb56f3ec0abacaa9"
 
-PV = "v2016.09.01"
-
 SRC_URI = "git://git.denx.de/u-boot.git;branch=u-boot-2016.09.y"
 
 S = "${WORKDIR}/git"
Signature · 1 line
2.9.3
#0 lore raw

PATCH 1/5 u-boot: Factor out common bits

The u-boot recipes share a couple of common variables, which makes updating of the recipes error prone and a toil. Factor those common bits into u-boot-common_${PV}.inc so that they are in one place.

The u-boot_${PV}.bb now explicitly require u-boot-common_${PV}.inc before require u-boot.inc , as doing require u-boot-common_${PV}.inc from u-boot.inc would fail due to ${PV} not being set. This is a functional change.

Cc Richard Purdie <[email protected]>
Cc Denys Dmytriyenko <[email protected]>
---
 meta/recipes-bsp/u-boot/u-boot-common_2016.03.inc  | 16 ++++++++++++++++
 meta/recipes-bsp/u-boot/u-boot-fw-utils_2016.03.bb | 16 ++--------------
 meta/recipes-bsp/u-boot/u-boot-mkimage_2016.03.bb  | 17 ++---------------
 meta/recipes-bsp/u-boot/u-boot.inc                 |  8 --------
 meta/recipes-bsp/u-boot/u-boot_2016.03.bb          |  8 +-------
 5 files changed, 21 insertions(+), 44 deletions(-)
 create mode 100644 meta/recipes-bsp/u-boot/u-boot-common_2016.03.inc
meta/recipes-bsp/u-boot/u-boot-common_2016.03.inc new file +16 -0
new file mode 100644
index 0000000..403e316
@@ -0,0 +1,16 @@
+HOMEPAGE = "http://www.denx.de/wiki/U-Boot/WebHome"
+SECTION = "bootloaders"
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6"
+
+# This revision corresponds to the tag "v2016.03"
+# We use the revision in order to avoid having to fetch it from the
+# repo during parse
+SRCREV = "df61a74e6845ec9bdcdd48d2aff5e9c2c6debeaa"
+
+PV = "v2016.03+git${SRCPV}"
+
+SRC_URI = "git://git.denx.de/u-boot.git;branch=master"
+
+S = "${WORKDIR}/git"
meta/recipes-bsp/u-boot/u-boot-fw-utils_2016.03.bb +2 -14
index 79f1548..f56862c 100644
@@ -1,20 +1,8 @@
+require u-boot-common_${PV}.inc
+
 SUMMARY = "U-Boot bootloader fw_printenv/setenv utilities"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6"
-SECTION = "bootloader"
 DEPENDS = "mtd-utils"
 
-# This revision corresponds to the tag "v2016.03"
-# We use the revision in order to avoid having to fetch it from the
-# repo during parse
-SRCREV = "df61a74e6845ec9bdcdd48d2aff5e9c2c6debeaa"
-
-PV = "v2016.03+git${SRCPV}"
-
-SRC_URI = "git://git.denx.de/u-boot.git;branch=master"
-
-S = "${WORKDIR}/git"
-
 INSANE_SKIP_${PN} = "already-stripped"
 EXTRA_OEMAKE_class-target = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${CC} ${CFLAGS} ${LDFLAGS}" V=1'
 EXTRA_OEMAKE_class-cross = 'ARCH=${TARGET_ARCH} CC="${CC} ${CFLAGS} ${LDFLAGS}" V=1'
meta/recipes-bsp/u-boot/u-boot-mkimage_2016.03.bb +2 -15
index d5921a0..5025961 100644
@@ -1,21 +1,8 @@
-SUMMARY = "U-Boot bootloader image creation tool"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6"
-SECTION = "bootloader"
+require u-boot-common_${PV}.inc
 
+SUMMARY = "U-Boot bootloader image creation tool"
 DEPENDS = "openssl"
 
-# This revision corresponds to the tag "v2016.03"
-# We use the revision in order to avoid having to fetch it from the
-# repo during parse
-SRCREV = "df61a74e6845ec9bdcdd48d2aff5e9c2c6debeaa"
-
-PV = "v2016.03+git${SRCPV}"
-
-SRC_URI = "git://git.denx.de/u-boot.git;branch=master"
-
-S = "${WORKDIR}/git"
-
 EXTRA_OEMAKE = 'CROSS_COMPILE="${TARGET_PREFIX}" CC="${CC} ${CFLAGS} ${LDFLAGS}" STRIP=true V=1'
 
 do_compile () {
meta/recipes-bsp/u-boot/u-boot.inc +0 -8
index 252aae9..afe3fe9 100644
@@ -1,14 +1,6 @@
 SUMMARY = "Universal Boot Loader for embedded devices"
-HOMEPAGE = "http://www.denx.de/wiki/U-Boot/WebHome"
-SECTION = "bootloaders"
 PROVIDES = "virtual/bootloader"
 
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6"
-
-SRC_URI = "git://git.denx.de/u-boot.git;branch=master"
-
-S = "${WORKDIR}/git"
 B = "${WORKDIR}/build"
 
 PACKAGE_ARCH = "${MACHINE_ARCH}"
meta/recipes-bsp/u-boot/u-boot_2016.03.bb +1 -7
index 836b0ce..dabe709 100644
@@ -1,10 +1,4 @@
+require u-boot-common_${PV}.inc
 require u-boot.inc
 
 DEPENDS += "dtc-native"
-
-# This revision corresponds to the tag "v2016.03"
-# We use the revision in order to avoid having to fetch it from the
-# repo during parse
-SRCREV = "df61a74e6845ec9bdcdd48d2aff5e9c2c6debeaa"
-
-PV = "v2016.03+git${SRCPV}"
Signature · 1 line
2.9.3
#1 lore raw

PATCH 2/5 u-boot: Update to 2016.09.01 release

Upgrade U-Boot to the latest version.

Cc Richard Purdie <[email protected]>
Cc Denys Dmytriyenko <[email protected]>
---
 .../{u-boot-common_2016.03.inc => u-boot-common_2016.09.01.inc}   | 8 ++++----
 .../{u-boot-fw-utils_2016.03.bb => u-boot-fw-utils_2016.09.01.bb} | 0
 .../{u-boot-mkimage_2016.03.bb => u-boot-mkimage_2016.09.01.bb}   | 0
 .../u-boot/{u-boot_2016.03.bb => u-boot_2016.09.01.bb}            | 0
 4 files changed, 4 insertions(+), 4 deletions(-)
 rename meta/recipes-bsp/u-boot/{u-boot-common_2016.03.inc => u-boot-common_2016.09.01.inc} (59%)
 rename meta/recipes-bsp/u-boot/{u-boot-fw-utils_2016.03.bb => u-boot-fw-utils_2016.09.01.bb} (100%)
 rename meta/recipes-bsp/u-boot/{u-boot-mkimage_2016.03.bb => u-boot-mkimage_2016.09.01.bb} (100%)
 rename meta/recipes-bsp/u-boot/{u-boot_2016.03.bb => u-boot_2016.09.01.bb} (100%)
meta/recipes-bsp/u-boot/u-boot-common_2016.09.01.inc renamed from meta/recipes-bsp/u-boot/u-boot-common_2016.03.inc +4 -4
similarity index 59%
rename from meta/recipes-bsp/u-boot/u-boot-common_2016.03.inc
rename to meta/recipes-bsp/u-boot/u-boot-common_2016.09.01.inc
index 403e316..ead5077 100644
@@ -4,13 +4,13 @@ SECTION = "bootloaders"
 LICENSE = "GPLv2+"
 LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6"
 
-# This revision corresponds to the tag "v2016.03"
+# This revision corresponds to the tag "v2016.09.01"
 # We use the revision in order to avoid having to fetch it from the
 # repo during parse
-SRCREV = "df61a74e6845ec9bdcdd48d2aff5e9c2c6debeaa"
+SRCREV = "f3363c060497515ca8b71451cb56f3ec0abacaa9"
 
-PV = "v2016.03+git${SRCPV}"
+PV = "v2016.09.01+git${SRCPV}"
 
-SRC_URI = "git://git.denx.de/u-boot.git;branch=master"
+SRC_URI = "git://git.denx.de/u-boot.git;branch=u-boot-2016.09.y"
 
 S = "${WORKDIR}/git"
meta/recipes-bsp/u-boot/u-boot-fw-utils_2016.09.01.bb renamed from meta/recipes-bsp/u-boot/u-boot-fw-utils_2016.03.bb +0 -0
similarity index 100%
rename from meta/recipes-bsp/u-boot/u-boot-fw-utils_2016.03.bb
rename to meta/recipes-bsp/u-boot/u-boot-fw-utils_2016.09.01.bb
meta/recipes-bsp/u-boot/u-boot-mkimage_2016.09.01.bb renamed from meta/recipes-bsp/u-boot/u-boot-mkimage_2016.03.bb +0 -0
similarity index 100%
rename from meta/recipes-bsp/u-boot/u-boot-mkimage_2016.03.bb
rename to meta/recipes-bsp/u-boot/u-boot-mkimage_2016.09.01.bb
meta/recipes-bsp/u-boot/u-boot_2016.09.01.bb renamed from meta/recipes-bsp/u-boot/u-boot_2016.03.bb +0 -0
similarity index 100%
rename from meta/recipes-bsp/u-boot/u-boot_2016.03.bb
rename to meta/recipes-bsp/u-boot/u-boot_2016.09.01.bb
Signature · 1 line
2.9.3
#16 lore raw

PATCH 5/5 u-boot: Drop redundant comment

In reply to Marek Vasut

Drop comment stating that the SRCREV corresponds to particular U-Boot version. This comment is redundant, since the U-Boot version is part of the recipe filename.

Cc Richard Purdie <[email protected]>
Cc Denys Dmytriyenko <[email protected]>
---
 meta/recipes-bsp/u-boot/u-boot-common_2016.09.01.inc | 1 -
 1 file changed, 1 deletion(-)
meta/recipes-bsp/u-boot/u-boot-common_2016.09.01.inc +0 -1
index a535df1..5b02c87 100644
@@ -4,7 +4,6 @@ SECTION = "bootloaders"
 LICENSE = "GPLv2+"
 LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6"
 
-# This revision corresponds to the tag "v2016.09.01"
 # We use the revision in order to avoid having to fetch it from the
 # repo during parse
 SRCREV = "f3363c060497515ca8b71451cb56f3ec0abacaa9"
Signature · 1 line
2.9.3
#2 lore raw

Re: [PATCH 2/5] u-boot: Update to 2016.09.01 release

In reply to Marek Vasut
Quoted 1 line · Marek Vasut

Upgrade U-Boot to the latest version.

Patches 3 and 5 should be squashed into this one.

Alex

#7 lore raw

Re: [PATCH 4/5] u-boot: Drop PV altogether

In reply to Marek Vasut
Quoted 3 lines · Marek Vasut

Drop the explicit setting of PV altogether. This changes the U-Boot version string from "v20yy.mm" to "20yy.mm" , so layer setting the PREFERRED_VERSION_u-boot must be updated by removing the leading 'v'.

Don't drop the 'v'. Package versions need to monotonically increase, and also package version needs to match git tags so that upstream version check can work.

Basically, rename the recipe filenames so that 'v' is in their versions, and then you can drop the PV from the recipes. All in a single patch.

Alex

Acked-by on v1 4/5
#9 lore raw

Re: [PATCH 4/5] u-boot: Drop PV altogether

In reply to Marek Vasut
Quoted 3 lines · Marek Vasut

Drop the explicit setting of PV altogether. This changes the U-Boot version string from "v20yy.mm" to "20yy.mm" , so layer setting the PREFERRED_VERSION_u-boot must be updated by removing the leading 'v'.

Finally!
But do we need to bump PE to ensure upgrade path and proper sorting?

Quoted 3 lines
Cc Richard Purdie <[email protected]>
Cc Denys Dmytriyenko <[email protected]>
Quoted 20 lines
---
 meta/recipes-bsp/u-boot/u-boot-common_2016.09.01.inc | 2 --
 1 file changed, 2 deletions(-)
meta/recipes-bsp/u-boot/u-boot-common_2016.09.01.inc +0 -2
index 0a90621..a535df1 100644
@@ -9,8 +9,6 @@ LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6"
 # repo during parse
 SRCREV = "f3363c060497515ca8b71451cb56f3ec0abacaa9"
 
-PV = "v2016.09.01"
-
 SRC_URI = "git://git.denx.de/u-boot.git;branch=u-boot-2016.09.y"
 
 S = "${WORKDIR}/git"
Signature · 1 line
2.9.3
Acked-by on v1 2/5
#3 lore raw

Re: [PATCH 2/5] u-boot: Update to 2016.09.01 release

In reply to Marek Vasut
Quoted 5 lines · Marek Vasut

Upgrade U-Boot to the latest version.

Cc Richard Purdie <[email protected]>
Cc Denys Dmytriyenko <[email protected]>
Quoted 51 lines
---
 .../{u-boot-common_2016.03.inc => u-boot-common_2016.09.01.inc}   | 8 ++++----
 .../{u-boot-fw-utils_2016.03.bb => u-boot-fw-utils_2016.09.01.bb} | 0
 .../{u-boot-mkimage_2016.03.bb => u-boot-mkimage_2016.09.01.bb}   | 0
 .../u-boot/{u-boot_2016.03.bb => u-boot_2016.09.01.bb}            | 0
 4 files changed, 4 insertions(+), 4 deletions(-)
 rename meta/recipes-bsp/u-boot/{u-boot-common_2016.03.inc => u-boot-common_2016.09.01.inc} (59%)
 rename meta/recipes-bsp/u-boot/{u-boot-fw-utils_2016.03.bb => u-boot-fw-utils_2016.09.01.bb} (100%)
 rename meta/recipes-bsp/u-boot/{u-boot-mkimage_2016.03.bb => u-boot-mkimage_2016.09.01.bb} (100%)
 rename meta/recipes-bsp/u-boot/{u-boot_2016.03.bb => u-boot_2016.09.01.bb} (100%)
meta/recipes-bsp/u-boot/u-boot-common_2016.09.01.inc renamed from meta/recipes-bsp/u-boot/u-boot-common_2016.03.inc +4 -4
similarity index 59%
rename from meta/recipes-bsp/u-boot/u-boot-common_2016.03.inc
rename to meta/recipes-bsp/u-boot/u-boot-common_2016.09.01.inc
index 403e316..ead5077 100644
@@ -4,13 +4,13 @@ SECTION = "bootloaders"
 LICENSE = "GPLv2+"
 LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6"
 
-# This revision corresponds to the tag "v2016.03"
+# This revision corresponds to the tag "v2016.09.01"
 # We use the revision in order to avoid having to fetch it from the
 # repo during parse
-SRCREV = "df61a74e6845ec9bdcdd48d2aff5e9c2c6debeaa"
+SRCREV = "f3363c060497515ca8b71451cb56f3ec0abacaa9"
 
-PV = "v2016.03+git${SRCPV}"
+PV = "v2016.09.01+git${SRCPV}"
 
-SRC_URI = "git://git.denx.de/u-boot.git;branch=master"
+SRC_URI = "git://git.denx.de/u-boot.git;branch=u-boot-2016.09.y"
 
 S = "${WORKDIR}/git"
meta/recipes-bsp/u-boot/u-boot-fw-utils_2016.09.01.bb renamed from meta/recipes-bsp/u-boot/u-boot-fw-utils_2016.03.bb +0 -0
similarity index 100%
rename from meta/recipes-bsp/u-boot/u-boot-fw-utils_2016.03.bb
rename to meta/recipes-bsp/u-boot/u-boot-fw-utils_2016.09.01.bb
meta/recipes-bsp/u-boot/u-boot-mkimage_2016.09.01.bb renamed from meta/recipes-bsp/u-boot/u-boot-mkimage_2016.03.bb +0 -0
similarity index 100%
rename from meta/recipes-bsp/u-boot/u-boot-mkimage_2016.03.bb
rename to meta/recipes-bsp/u-boot/u-boot-mkimage_2016.09.01.bb
meta/recipes-bsp/u-boot/u-boot_2016.09.01.bb renamed from meta/recipes-bsp/u-boot/u-boot_2016.03.bb +0 -0
similarity index 100%
rename from meta/recipes-bsp/u-boot/u-boot_2016.03.bb
rename to meta/recipes-bsp/u-boot/u-boot_2016.09.01.bb
Signature · 1 line
2.9.3
Acked-by on v1 5/5
#17 lore raw

Re: [PATCH 5/5] u-boot: Drop redundant comment

In reply to Marek Vasut
Quoted 7 lines · Marek Vasut

Drop comment stating that the SRCREV corresponds to particular U-Boot version. This comment is redundant, since the U-Boot version is part of the recipe filename.

Cc Richard Purdie <[email protected]>
Cc Denys Dmytriyenko <[email protected]>
Quoted 19 lines
---
 meta/recipes-bsp/u-boot/u-boot-common_2016.09.01.inc | 1 -
 1 file changed, 1 deletion(-)
meta/recipes-bsp/u-boot/u-boot-common_2016.09.01.inc +0 -1
index a535df1..5b02c87 100644
@@ -4,7 +4,6 @@ SECTION = "bootloaders"
 LICENSE = "GPLv2+"
 LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6"
 
-# This revision corresponds to the tag "v2016.09.01"
 # We use the revision in order to avoid having to fetch it from the
 # repo during parse
 SRCREV = "f3363c060497515ca8b71451cb56f3ec0abacaa9"
Signature · 1 line
2.9.3
#18 lore raw
In reply to Marek Vasut
Quoted 8 lines · Marek Vasut

The u-boot recipes share a couple of common variables, which makes updating of the recipes error prone and a toil. Factor those common bits into u-boot-common_${PV}.inc so that they are in one place.

The u-boot_${PV}.bb now explicitly require u-boot-common_${PV}.inc before require u-boot.inc , as doing require u-boot-common_${PV}.inc from u-boot.inc would fail due to ${PV} not being set. This is a functional change.

Any issues making .inc file version-agnostic and moving SRCREV out to .bb?

Quoted 127 lines
Cc Richard Purdie <[email protected]>
Cc Denys Dmytriyenko <[email protected]>
---
 meta/recipes-bsp/u-boot/u-boot-common_2016.03.inc  | 16 ++++++++++++++++
 meta/recipes-bsp/u-boot/u-boot-fw-utils_2016.03.bb | 16 ++--------------
 meta/recipes-bsp/u-boot/u-boot-mkimage_2016.03.bb  | 17 ++---------------
 meta/recipes-bsp/u-boot/u-boot.inc                 |  8 --------
 meta/recipes-bsp/u-boot/u-boot_2016.03.bb          |  8 +-------
 5 files changed, 21 insertions(+), 44 deletions(-)
 create mode 100644 meta/recipes-bsp/u-boot/u-boot-common_2016.03.inc
meta/recipes-bsp/u-boot/u-boot-common_2016.03.inc new file +16 -0
new file mode 100644
index 0000000..403e316
@@ -0,0 +1,16 @@
+HOMEPAGE = "http://www.denx.de/wiki/U-Boot/WebHome"
+SECTION = "bootloaders"
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6"
+
+# This revision corresponds to the tag "v2016.03"
+# We use the revision in order to avoid having to fetch it from the
+# repo during parse
+SRCREV = "df61a74e6845ec9bdcdd48d2aff5e9c2c6debeaa"
+
+PV = "v2016.03+git${SRCPV}"
+
+SRC_URI = "git://git.denx.de/u-boot.git;branch=master"
+
+S = "${WORKDIR}/git"
meta/recipes-bsp/u-boot/u-boot-fw-utils_2016.03.bb +2 -14
index 79f1548..f56862c 100644
@@ -1,20 +1,8 @@
+require u-boot-common_${PV}.inc
+
 SUMMARY = "U-Boot bootloader fw_printenv/setenv utilities"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6"
-SECTION = "bootloader"
 DEPENDS = "mtd-utils"
 
-# This revision corresponds to the tag "v2016.03"
-# We use the revision in order to avoid having to fetch it from the
-# repo during parse
-SRCREV = "df61a74e6845ec9bdcdd48d2aff5e9c2c6debeaa"
-
-PV = "v2016.03+git${SRCPV}"
-
-SRC_URI = "git://git.denx.de/u-boot.git;branch=master"
-
-S = "${WORKDIR}/git"
-
 INSANE_SKIP_${PN} = "already-stripped"
 EXTRA_OEMAKE_class-target = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${CC} ${CFLAGS} ${LDFLAGS}" V=1'
 EXTRA_OEMAKE_class-cross = 'ARCH=${TARGET_ARCH} CC="${CC} ${CFLAGS} ${LDFLAGS}" V=1'
meta/recipes-bsp/u-boot/u-boot-mkimage_2016.03.bb +2 -15
index d5921a0..5025961 100644
@@ -1,21 +1,8 @@
-SUMMARY = "U-Boot bootloader image creation tool"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6"
-SECTION = "bootloader"
+require u-boot-common_${PV}.inc
 
+SUMMARY = "U-Boot bootloader image creation tool"
 DEPENDS = "openssl"
 
-# This revision corresponds to the tag "v2016.03"
-# We use the revision in order to avoid having to fetch it from the
-# repo during parse
-SRCREV = "df61a74e6845ec9bdcdd48d2aff5e9c2c6debeaa"
-
-PV = "v2016.03+git${SRCPV}"
-
-SRC_URI = "git://git.denx.de/u-boot.git;branch=master"
-
-S = "${WORKDIR}/git"
-
 EXTRA_OEMAKE = 'CROSS_COMPILE="${TARGET_PREFIX}" CC="${CC} ${CFLAGS} ${LDFLAGS}" STRIP=true V=1'
 
 do_compile () {
meta/recipes-bsp/u-boot/u-boot.inc +0 -8
index 252aae9..afe3fe9 100644
@@ -1,14 +1,6 @@
 SUMMARY = "Universal Boot Loader for embedded devices"
-HOMEPAGE = "http://www.denx.de/wiki/U-Boot/WebHome"
-SECTION = "bootloaders"
 PROVIDES = "virtual/bootloader"
 
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6"
-
-SRC_URI = "git://git.denx.de/u-boot.git;branch=master"
-
-S = "${WORKDIR}/git"
 B = "${WORKDIR}/build"
 
 PACKAGE_ARCH = "${MACHINE_ARCH}"
meta/recipes-bsp/u-boot/u-boot_2016.03.bb +1 -7
index 836b0ce..dabe709 100644
@@ -1,10 +1,4 @@
+require u-boot-common_${PV}.inc
 require u-boot.inc
 
 DEPENDS += "dtc-native"
-
-# This revision corresponds to the tag "v2016.03"
-# We use the revision in order to avoid having to fetch it from the
-# repo during parse
-SRCREV = "df61a74e6845ec9bdcdd48d2aff5e9c2c6debeaa"
-
-PV = "v2016.03+git${SRCPV}"
Signature · 1 line
2.9.3
Acked-by on v1 3/5
#5 lore raw

Re: [PATCH 3/5] u-boot: Drop the +git part from PV

In reply to Marek Vasut
Quoted 2 lines · Marek Vasut

The U-Boot package is using release versions of U-Boot, so drop the extra +git part from PV.

As long as it's using release-based SRCREV, should be fine. IIRC, +git suffix was from the days when we needed to pick up additional commits after the release for bug fixes and such...

Quoted 3 lines
Cc Richard Purdie <[email protected]>
Cc Denys Dmytriyenko <[email protected]>
Quoted 20 lines
---
 meta/recipes-bsp/u-boot/u-boot-common_2016.09.01.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-bsp/u-boot/u-boot-common_2016.09.01.inc +1 -1
index ead5077..0a90621 100644
@@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6"
 # repo during parse
 SRCREV = "f3363c060497515ca8b71451cb56f3ec0abacaa9"
 
-PV = "v2016.09.01+git${SRCPV}"
+PV = "v2016.09.01"
 
 SRC_URI = "git://git.denx.de/u-boot.git;branch=u-boot-2016.09.y"
 
Signature · 1 line
2.9.3
#8 lore raw

Re: [PATCH 4/5] u-boot: Drop PV altogether

In reply to Alexander Kanavin
Quoted 5 lines · Alexander Kanavin
Quoted 3 lines · Marek Vasut

Drop the explicit setting of PV altogether. This changes the U-Boot version string from "v20yy.mm" to "20yy.mm" , so layer setting the PREFERRED_VERSION_u-boot must be updated by removing the leading 'v'.

Quoted 7 lines

Don't drop the 'v'. Package versions need to monotonically increase, and also package version needs to match git tags so that upstream version check can work.

Basically, rename the recipe filenames so that 'v' is in their versions, and then you can drop the PV from the recipes. All in a single patch.

This has been discussed at OEDEM - we are trying to unify u-boot recipes. Looking at the layer index, it seems there's 50/50 split of using vXXXX.YY vs. just XXXX.YY versions:

https://layers.openembedded.org/layerindex/branch/master/recipes/?q=u-boot

So, I'd vote to drop "v" prefix and bump PE to get it sorted out...

Signature · 1 line
Denys
#19 lore raw
In reply to Denys Dmytriyenko
Quoted 11 lines · Denys Dmytriyenko
Quoted 8 lines · Marek Vasut

The u-boot recipes share a couple of common variables, which makes updating of the recipes error prone and a toil. Factor those common bits into u-boot-common_${PV}.inc so that they are in one place.

The u-boot_${PV}.bb now explicitly require u-boot-common_${PV}.inc before require u-boot.inc , as doing require u-boot-common_${PV}.inc from u-boot.inc would fail due to ${PV} not being set. This is a functional change.

Any issues making .inc file version-agnostic and moving SRCREV out to .bb?

That's what it was initially, but got review comment to not do that. I'm fine either way.

Quoted 127 lines
Quoted 127 lines
Cc Richard Purdie <[email protected]>
Cc Denys Dmytriyenko <[email protected]>
---
 meta/recipes-bsp/u-boot/u-boot-common_2016.03.inc  | 16 ++++++++++++++++
 meta/recipes-bsp/u-boot/u-boot-fw-utils_2016.03.bb | 16 ++--------------
 meta/recipes-bsp/u-boot/u-boot-mkimage_2016.03.bb  | 17 ++---------------
 meta/recipes-bsp/u-boot/u-boot.inc                 |  8 --------
 meta/recipes-bsp/u-boot/u-boot_2016.03.bb          |  8 +-------
 5 files changed, 21 insertions(+), 44 deletions(-)
 create mode 100644 meta/recipes-bsp/u-boot/u-boot-common_2016.03.inc
meta/recipes-bsp/u-boot/u-boot-common_2016.03.inc new file +16 -0
new file mode 100644
index 0000000..403e316
@@ -0,0 +1,16 @@
+HOMEPAGE = "http://www.denx.de/wiki/U-Boot/WebHome"
+SECTION = "bootloaders"
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6"
+
+# This revision corresponds to the tag "v2016.03"
+# We use the revision in order to avoid having to fetch it from the
+# repo during parse
+SRCREV = "df61a74e6845ec9bdcdd48d2aff5e9c2c6debeaa"
+
+PV = "v2016.03+git${SRCPV}"
+
+SRC_URI = "git://git.denx.de/u-boot.git;branch=master"
+
+S = "${WORKDIR}/git"
meta/recipes-bsp/u-boot/u-boot-fw-utils_2016.03.bb +2 -14
index 79f1548..f56862c 100644
@@ -1,20 +1,8 @@
+require u-boot-common_${PV}.inc
+
 SUMMARY = "U-Boot bootloader fw_printenv/setenv utilities"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6"
-SECTION = "bootloader"
 DEPENDS = "mtd-utils"
 
-# This revision corresponds to the tag "v2016.03"
-# We use the revision in order to avoid having to fetch it from the
-# repo during parse
-SRCREV = "df61a74e6845ec9bdcdd48d2aff5e9c2c6debeaa"
-
-PV = "v2016.03+git${SRCPV}"
-
-SRC_URI = "git://git.denx.de/u-boot.git;branch=master"
-
-S = "${WORKDIR}/git"
-
 INSANE_SKIP_${PN} = "already-stripped"
 EXTRA_OEMAKE_class-target = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${CC} ${CFLAGS} ${LDFLAGS}" V=1'
 EXTRA_OEMAKE_class-cross = 'ARCH=${TARGET_ARCH} CC="${CC} ${CFLAGS} ${LDFLAGS}" V=1'
meta/recipes-bsp/u-boot/u-boot-mkimage_2016.03.bb +2 -15
index d5921a0..5025961 100644
@@ -1,21 +1,8 @@
-SUMMARY = "U-Boot bootloader image creation tool"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6"
-SECTION = "bootloader"
+require u-boot-common_${PV}.inc
 
+SUMMARY = "U-Boot bootloader image creation tool"
 DEPENDS = "openssl"
 
-# This revision corresponds to the tag "v2016.03"
-# We use the revision in order to avoid having to fetch it from the
-# repo during parse
-SRCREV = "df61a74e6845ec9bdcdd48d2aff5e9c2c6debeaa"
-
-PV = "v2016.03+git${SRCPV}"
-
-SRC_URI = "git://git.denx.de/u-boot.git;branch=master"
-
-S = "${WORKDIR}/git"
-
 EXTRA_OEMAKE = 'CROSS_COMPILE="${TARGET_PREFIX}" CC="${CC} ${CFLAGS} ${LDFLAGS}" STRIP=true V=1'
 
 do_compile () {
meta/recipes-bsp/u-boot/u-boot.inc +0 -8
index 252aae9..afe3fe9 100644
@@ -1,14 +1,6 @@
 SUMMARY = "Universal Boot Loader for embedded devices"
-HOMEPAGE = "http://www.denx.de/wiki/U-Boot/WebHome"
-SECTION = "bootloaders"
 PROVIDES = "virtual/bootloader"
 
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6"
-
-SRC_URI = "git://git.denx.de/u-boot.git;branch=master"
-
-S = "${WORKDIR}/git"
 B = "${WORKDIR}/build"
 
 PACKAGE_ARCH = "${MACHINE_ARCH}"
meta/recipes-bsp/u-boot/u-boot_2016.03.bb +1 -7
index 836b0ce..dabe709 100644
@@ -1,10 +1,4 @@
+require u-boot-common_${PV}.inc
 require u-boot.inc
 
 DEPENDS += "dtc-native"
-
-# This revision corresponds to the tag "v2016.03"
-# We use the revision in order to avoid having to fetch it from the
-# repo during parse
-SRCREV = "df61a74e6845ec9bdcdd48d2aff5e9c2c6debeaa"
-
-PV = "v2016.03+git${SRCPV}"
Signature · 1 line
2.9.3
Signature · 2 lines
Best regards,
Marek Vasut
#10 lore raw

Re: [PATCH 4/5] u-boot: Drop PV altogether

In reply to Denys Dmytriyenko
Quoted 7 lines · Denys Dmytriyenko
Quoted 3 lines · Marek Vasut

Drop the explicit setting of PV altogether. This changes the U-Boot version string from "v20yy.mm" to "20yy.mm" , so layer setting the PREFERRED_VERSION_u-boot must be updated by removing the leading 'v'.

Finally!
But do we need to bump PE to ensure upgrade path and proper sorting?

I don't think so, since the whole U-Boot version got updated.

Quoted 5 lines
Quoted 3 lines
Cc Richard Purdie <[email protected]>
Cc Denys Dmytriyenko <[email protected]>

Thanks!

btw. given the layout of the u-boot package after this, updating is a matter of mv+sed combo :)

Quoted 12 lines
Quoted 12 lines
---
 meta/recipes-bsp/u-boot/u-boot-common_2016.09.01.inc | 2 --
 1 file changed, 2 deletions(-)
meta/recipes-bsp/u-boot/u-boot-common_2016.09.01.inc +0 -0
index 0a90621..a535df1 100644
@@ -9,8 +9,6 @@ LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6"
 # repo during parse
 SRCREV = "f3363c060497515ca8b71451cb56f3ec0abacaa9"
 
Quoted 3 lines

meta/recipes-bsp/u-boot/u-boot-common_2016.09.01.inc LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6" · line 12

Quoted 3 lines
meta/recipes-bsp/u-boot/u-boot-common_2016.09.01.inc +0 -2
-PV = "v2016.09.01"
-
 SRC_URI = "git://git.denx.de/u-boot.git;branch=u-boot-2016.09.y"

And once 2016.11 is out, I believe I can even drop the ;branch= bit here.

Quoted 4 lines
Quoted 4 lines
meta/recipes-bsp/u-boot/u-boot-common_2016.09.01.inc +0 -0
 S = "${WORKDIR}/git"
Signature · 1 line
2.9.3
Signature · 2 lines
Best regards,
Marek Vasut
#11 lore raw

Re: [PATCH 4/5] u-boot: Drop PV altogether

Quoted 10 lines · Marek Vasut
Quoted 7 lines · Denys Dmytriyenko
Quoted 3 lines · Marek Vasut

Drop the explicit setting of PV altogether. This changes the U-Boot version string from "v20yy.mm" to "20yy.mm" , so layer setting the PREFERRED_VERSION_u-boot must be updated by removing the leading 'v'.

Finally!
But do we need to bump PE to ensure upgrade path and proper sorting?

I don't think so, since the whole U-Boot version got updated.

Still, vXXXX.YY will always sort higher than XXXX.YY no matter what digits there are. That's what PE is for, to get the sorting working even when versioning schema gets changed in major way like this one...

Quoted 39 lines
Quoted 5 lines
Quoted 3 lines
Cc Richard Purdie <[email protected]>
Cc Denys Dmytriyenko <[email protected]>

Thanks!

btw. given the layout of the u-boot package after this, updating is a matter of mv+sed combo :)

Quoted 12 lines
Quoted 12 lines
---
 meta/recipes-bsp/u-boot/u-boot-common_2016.09.01.inc | 2 --
 1 file changed, 2 deletions(-)
meta/recipes-bsp/u-boot/u-boot-common_2016.09.01.inc +0 -0
index 0a90621..a535df1 100644
@@ -9,8 +9,6 @@ LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6"
 # repo during parse
 SRCREV = "f3363c060497515ca8b71451cb56f3ec0abacaa9"
 
Quoted 3 lines

meta/recipes-bsp/u-boot/u-boot-common_2016.09.01.inc LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6" · line 12

Quoted 3 lines
meta/recipes-bsp/u-boot/u-boot-common_2016.09.01.inc +0 -2
-PV = "v2016.09.01"
-
 SRC_URI = "git://git.denx.de/u-boot.git;branch=u-boot-2016.09.y"

And once 2016.11 is out, I believe I can even drop the ;branch= bit here.

Quoted 4 lines
Quoted 4 lines
meta/recipes-bsp/u-boot/u-boot-common_2016.09.01.inc +0 -0
 S = "${WORKDIR}/git"
Signature · 1 line
2.9.3
Signature · 2 lines
Best regards,
Marek Vasut
#12 lore raw

Re: [PATCH 4/5] u-boot: Drop PV altogether

Quoted 7 lines · Denys Dmytriyenko
Quoted 3 lines
Quoted 1 line

But do we need to bump PE to ensure upgrade path and proper sorting?

I don't think so, since the whole U-Boot version got updated.

Still, vXXXX.YY will always sort higher than XXXX.YY no matter what digits there are. That's what PE is for, to get the sorting working even when versioning schema gets changed in major way like this one...

Agreed, PE is required here.

Ross

#13 lore raw

Re: [PATCH 4/5] u-boot: Drop PV altogether

Quoted 8 lines · Ross
Quoted 3 lines · On 19 October 2016 at 22:15, Denys Dmytriyenko <[email protected]…
Quoted 1 line

But do we need to bump PE to ensure upgrade path and proper sorting?

I don't think so, since the whole U-Boot version got updated.

Quoted 7 lines

Still, vXXXX.YY will always sort higher than XXXX.YY no matter what digits
there are. That's what PE is for, to get the sorting working even when versioning schema gets changed in major way like this one...

Agreed, PE is required here.

OK, snap. Can you pick 1,2,3,5 so I don't have to resubmit them ? They should apply cleanly and they are pretty orthogonal from the 4/5.

I will check PE ASAP.

Thanks!

Signature · 2 lines
Best regards,
Marek Vasut
#14 lore raw

Re: [PATCH 4/5] u-boot: Drop PV altogether

Quoted 3 lines · Marek Vasut

OK, snap. Can you pick 1,2,3,5 so I don't have to resubmit them ? They should apply cleanly and they are pretty orthogonal from the 4/5.

1 is standalone and I've merged this into ross/mut already, but 3/4/5 are all basically fixing problems in 2 so I think they should all be squashed together.

Ross

#15 lore raw

Re: [PATCH 4/5] u-boot: Drop PV altogether

Quoted 10 lines · Ross

On 19 October 2016 at 23:53, Marek Vasut <[email protected] <mailto:[email protected]>> wrote:

OK, snap. Can you pick 1,2,3,5 so I don't have to resubmit them ? They should apply cleanly and they are pretty orthogonal from the 4/5.

1 is standalone and I've merged this into ross/mut already, but 3/4/5 are all basically fixing problems in 2 so I think they should all be squashed together.

I'm not a huge fan of patches doing multiple things at the same time, so I sent them separately. Feel free to squash them if you really want to, I won't object either way.

Thanks for the PE hint :)

Signature · 2 lines
Best regards,
Marek Vasut