u-boot: add u-boot-common.inc
Factor out variables needed by both fw-utils and the base recipe into a
common include.
u-boot.inc tried to do this but a number of ubi bootenv patches that
aren't needed by fw-utils were pulled in there.
Change-Id: Ia7006e620892030d05cb62cfb251143d0af54b42
Tested: Built witherspoon and palmetto images, verified u-boot, fw-utils
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/meta-phosphor/common/recipes-bsp/u-boot/u-boot-common.inc b/meta-phosphor/common/recipes-bsp/u-boot/u-boot-common.inc
new file mode 100644
index 0000000..8e278bd
--- /dev/null
+++ b/meta-phosphor/common/recipes-bsp/u-boot/u-boot-common.inc
@@ -0,0 +1,17 @@
+HOMEPAGE = "https://github.com/openbmc/u-boot"
+SECTION = "bootloaders"
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6"
+PE = "1"
+
+# We use the revision in order to avoid having to fetch it from the
+# repo during parse
+SRCREV = "7fb88a88d08c19b0e6f88c0a484ab001a4476a27"
+
+UBRANCH = "v2016.07-aspeed-openbmc"
+SRC_URI = "git://git@github.com/openbmc/u-boot.git;branch=${UBRANCH};protocol=https"
+
+S = "${WORKDIR}/git"
+
+PV = "v2016.07+git${SRCPV}"
diff --git a/meta-phosphor/common/recipes-bsp/u-boot/u-boot-fw-utils_2016.07.bb b/meta-phosphor/common/recipes-bsp/u-boot/u-boot-fw-utils_2016.07.bb
index 251e044..6e2aeac 100644
--- a/meta-phosphor/common/recipes-bsp/u-boot/u-boot-fw-utils_2016.07.bb
+++ b/meta-phosphor/common/recipes-bsp/u-boot/u-boot-fw-utils_2016.07.bb
@@ -1,11 +1,7 @@
SUMMARY = "U-Boot bootloader fw_printenv/setenv utilities"
-LICENSE = "GPLv2+"
-SECTION = "bootloader"
DEPENDS = "mtd-utils"
-require u-boot.inc
-
-S = "${WORKDIR}/git"
+require u-boot-common.inc
INSANE_SKIP_${PN} = "already-stripped"
EXTRA_OEMAKE_class-target = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${CC} ${CFLAGS} ${LDFLAGS}" V=1'
diff --git a/meta-phosphor/common/recipes-bsp/u-boot/u-boot.inc b/meta-phosphor/common/recipes-bsp/u-boot/u-boot.inc
index 2ab0961..f2f2d31 100644
--- a/meta-phosphor/common/recipes-bsp/u-boot/u-boot.inc
+++ b/meta-phosphor/common/recipes-bsp/u-boot/u-boot.inc
@@ -1,9 +1,3 @@
-LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6"
-
-SRCREV = "7fb88a88d08c19b0e6f88c0a484ab001a4476a27"
-UBRANCH = "v2016.07-aspeed-openbmc"
-SRC_URI = "git://git@github.com/openbmc/u-boot.git;branch=${UBRANCH};protocol=https"
-
inherit image_version
SRC_URI += "file://0001-configs-ast-Add-redundnant-env.patch"
@@ -26,5 +20,3 @@
sed -i "s/kernel-0/kernel-${VERSION_ID}/g" \
${S}/include/configs/ast-common.h &> /dev/null
}
-
-PV = "v2016.07+git${SRCPV}"
diff --git a/meta-phosphor/common/recipes-bsp/u-boot/u-boot_2016.07.bb b/meta-phosphor/common/recipes-bsp/u-boot/u-boot_2016.07.bb
index 2800623..bcb95fe 100644
--- a/meta-phosphor/common/recipes-bsp/u-boot/u-boot_2016.07.bb
+++ b/meta-phosphor/common/recipes-bsp/u-boot/u-boot_2016.07.bb
@@ -1,5 +1,5 @@
-LICENSE = "GPLv2+"
require recipes-bsp/u-boot/u-boot.inc
+require u-boot-common.inc
require u-boot.inc
DEPENDS += "dtc-native"