aspeed: Add Aspeed SDK recipes for U-boot

Start by copying oe-core recipes-bsp/u-boot/ into the Aspeed BSP.  The
uboot recipes in oe-core master currently point to 2019.07 u-boot and
the Aspeed SDK branch being pointed to by this patch is based on uboot
upstream 2019.04.  There weren't any changes in oe-core going from
2019.04 to 2019.07 so thats OK.

After copying the oe-core recipes, fix up SRC_URI, HOMEPAGE, and a
couple other variables to point at the Aspeed u-boot fork.

The current aspeed-master-v2019.04 tip and evb-ast2600_defconfig will produce
a uboot binary but make returns non-zero:

  CFGCHK  u-boot.cfg
   Error: You must add new CONFIG options using Kconfig
   The following new ad-hoc CONFIG options were detected:
   CONFIG_RAM
   Please add these via Kconfig instead. Find a suitable Kconfig
   file and add a 'config' or 'menuconfig' option.
   make: *** [Makefile:1010: all] Error 1

As such the utility of this recipe is limited until the above issue is
addressed.

The Aspeed SDK is intended to be the basis for Aspeed G6 bringup.

(From meta-aspeed rev: fe03326ee328718a79138062a0db374c0685a9c7)

Change-Id: I266dc10dd8549c024ec7012da5e576a2436d195b
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/meta-aspeed/recipes-bsp/u-boot/u-boot-fw-utils-aspeed-sdk_2019.04.bb b/meta-aspeed/recipes-bsp/u-boot/u-boot-fw-utils-aspeed-sdk_2019.04.bb
new file mode 100644
index 0000000..59fdbde
--- /dev/null
+++ b/meta-aspeed/recipes-bsp/u-boot/u-boot-fw-utils-aspeed-sdk_2019.04.bb
@@ -0,0 +1,36 @@
+require u-boot-common-aspeed-sdk_${PV}.inc
+
+SUMMARY = "U-Boot bootloader fw_printenv/setenv utilities"
+DEPENDS += "mtd-utils"
+
+PROVIDES += "u-boot-fw-utils"
+
+INSANE_SKIP_${PN} = "already-stripped"
+EXTRA_OEMAKE_class-target = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" V=1'
+EXTRA_OEMAKE_class-cross = 'HOSTCC="${CC} ${CFLAGS} ${LDFLAGS}" V=1'
+
+inherit uboot-config
+
+do_compile () {
+	oe_runmake ${UBOOT_MACHINE}
+	oe_runmake envtools
+}
+
+do_install () {
+	install -d ${D}${base_sbindir}
+	install -d ${D}${sysconfdir}
+	install -m 755 ${S}/tools/env/fw_printenv ${D}${base_sbindir}/fw_printenv
+	install -m 755 ${S}/tools/env/fw_printenv ${D}${base_sbindir}/fw_setenv
+	install -m 0644 ${S}/tools/env/fw_env.config ${D}${sysconfdir}/fw_env.config
+}
+
+do_install_class-cross () {
+	install -d ${D}${bindir_cross}
+	install -m 755 ${S}/tools/env/fw_printenv ${D}${bindir_cross}/fw_printenv
+	install -m 755 ${S}/tools/env/fw_printenv ${D}${bindir_cross}/fw_setenv
+}
+
+SYSROOT_DIRS_append_class-cross = " ${bindir_cross}"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+BBCLASSEXTEND = "cross"