Merge pull request #312 from bradbishop/ast2500

initial ast2500 stubs
diff --git a/common/recipes-bsp/u-boot/u-boot-fw-utils_2016.05.bb b/common/recipes-bsp/u-boot/u-boot-fw-utils_2016.05.bb
new file mode 100644
index 0000000..80d90fa
--- /dev/null
+++ b/common/recipes-bsp/u-boot/u-boot-fw-utils_2016.05.bb
@@ -0,0 +1,46 @@
+SUMMARY = "U-Boot bootloader fw_printenv/setenv utilities"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6"
+SECTION = "bootloader"
+DEPENDS = "mtd-utils"
+
+SRCREV = "47441cc36bb8e919a066837e4d7c5a8a1c475da4"
+UBRANCH = "v2016.05-ast2500"
+SRC_URI = "git://git@github.com/openbmc/u-boot.git;branch=${UBRANCH};protocol=https"
+
+PV = "v2016.05+git${SRCPV}"
+
+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'
+
+inherit uboot-config
+
+do_compile () {
+	oe_runmake ${UBOOT_MACHINE}
+	oe_runmake env
+}
+
+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_PREPROCESS_FUNCS_class-cross = "uboot_fw_utils_cross"
+uboot_fw_utils_cross() {
+	sysroot_stage_dir ${D}${bindir_cross} ${SYSROOT_DESTDIR}${bindir_cross}
+}
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+BBCLASSEXTEND = "cross"
diff --git a/common/recipes-bsp/u-boot/u-boot-mkimage_2016.05.bb b/common/recipes-bsp/u-boot/u-boot-mkimage_2016.05.bb
new file mode 100644
index 0000000..27ed131
--- /dev/null
+++ b/common/recipes-bsp/u-boot/u-boot-mkimage_2016.05.bb
@@ -0,0 +1,29 @@
+SUMMARY = "U-Boot bootloader image creation tool"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6"
+SECTION = "bootloader"
+
+DEPENDS = "openssl"
+
+SRCREV = "47441cc36bb8e919a066837e4d7c5a8a1c475da4"
+UBRANCH = "v2016.05-ast2500"
+SRC_URI = "git://git@github.com/openbmc/u-boot.git;branch=${UBRANCH};protocol=https"
+
+PV = "v2016.05+git${SRCPV}"
+
+S = "${WORKDIR}/git"
+
+EXTRA_OEMAKE = 'CROSS_COMPILE="${TARGET_PREFIX}" CC="${CC} ${CFLAGS} ${LDFLAGS}" STRIP=true V=1'
+
+do_compile () {
+	oe_runmake sandbox_defconfig
+	oe_runmake cross_tools NO_SDL=1
+}
+
+do_install () {
+	install -d ${D}${bindir}
+	install -m 0755 tools/mkimage ${D}${bindir}/uboot-mkimage
+	ln -sf uboot-mkimage ${D}${bindir}/mkimage
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/common/recipes-bsp/u-boot/u-boot_2016.05.bb b/common/recipes-bsp/u-boot/u-boot_2016.05.bb
new file mode 100644
index 0000000..f1d6318
--- /dev/null
+++ b/common/recipes-bsp/u-boot/u-boot_2016.05.bb
@@ -0,0 +1,12 @@
+require recipes-bsp/u-boot/u-boot.inc
+
+LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6"
+DEPENDS += "dtc-native"
+
+SRCREV = "47441cc36bb8e919a066837e4d7c5a8a1c475da4"
+UBRANCH = "v2016.05-ast2500"
+SRC_URI = "git://git@github.com/openbmc/u-boot.git;branch=${UBRANCH};protocol=https"
+
+PV = "v2016.05+git${SRCPV}"
+
+EXTRA_OEMAKE_append = " KCFLAGS=-fgnu89-inline"
diff --git a/common/recipes-kernel/linux/linux-obmc.inc b/common/recipes-kernel/linux/linux-obmc.inc
new file mode 100644
index 0000000..24db6f7
--- /dev/null
+++ b/common/recipes-kernel/linux/linux-obmc.inc
@@ -0,0 +1,27 @@
+DESCRIPTION = "Linux kernel for OpenBMC"
+SECTION = "kernel"
+LICENSE = "GPLv2"
+
+KCONFIG_MODE="--alldefconfig"
+
+KSRC ?= "git://github.com/openbmc/linux;protocol=git;branch=${KBRANCH}"
+SRC_URI = "${KSRC}"
+
+LINUX_VERSION_EXTENSION ?= "-${SRCREV}"
+
+PV = "${LINUX_VERSION}+git${SRCPV}"
+
+COMPATIBLE_MACHINE_${MACHINE} = "openbmc"
+
+do_patch_append() {
+        for DTB in "${KERNEL_DEVICETREE}"; do
+               DT=`basename ${DTB} .dtb`
+                if [ -r "${WORKDIR}/${DT}.dts" ]; then
+                        cp ${WORKDIR}/${DT}.dts \
+                                ${STAGING_KERNEL_DIR}/arch/${ARCH}/boot/dts
+               fi
+       done
+}
+
+inherit kernel
+require recipes-kernel/linux/linux-yocto.inc
diff --git a/common/recipes-kernel/linux/linux-obmc_4.4.bb b/common/recipes-kernel/linux/linux-obmc_4.4.bb
index 825a555..ef854a5 100644
--- a/common/recipes-kernel/linux/linux-obmc_4.4.bb
+++ b/common/recipes-kernel/linux/linux-obmc_4.4.bb
@@ -1,30 +1,5 @@
-DESCRIPTION = "Linux kernel for OpenBMC"
-SECTION = "kernel"
-LICENSE = "GPLv2"
-
 KBRANCH ?= "dev-4.4"
-KCONFIG_MODE="--alldefconfig"
-
-SRC_URI = "git://github.com/openbmc/linux;protocol=git;branch=${KBRANCH}"
-
 LINUX_VERSION ?= "4.4"
-LINUX_VERSION_EXTENSION ?= "-${SRCREV}"
-
 SRCREV="openbmc-20160606-1"
 
-PV = "${LINUX_VERSION}+git${SRCPV}"
-
-COMPATIBLE_MACHINE_${MACHINE} = "openbmc"
-
-inherit kernel
-require recipes-kernel/linux/linux-yocto.inc
-
-do_patch_append() {
-        for DTB in "${KERNEL_DEVICETREE}"; do
-               DT=`basename ${DTB} .dtb`
-                if [ -r "${WORKDIR}/${DT}.dts" ]; then
-                        cp ${WORKDIR}/${DT}.dts \
-                                ${STAGING_KERNEL_DIR}/arch/${ARCH}/boot/dts
-               fi
-       done
-}
+require linux-obmc.inc
diff --git a/common/recipes-kernel/linux/linux-obmc_4.6.bb b/common/recipes-kernel/linux/linux-obmc_4.6.bb
new file mode 100644
index 0000000..78bf3b2
--- /dev/null
+++ b/common/recipes-kernel/linux/linux-obmc_4.6.bb
@@ -0,0 +1,5 @@
+KBRANCH ?= "dev-4.6"
+LINUX_VERSION ?= "4.6"
+SRCREV="6bf0b62ef667270f8a8cce46abc6c1f9b68785a5"
+
+require linux-obmc.inc
diff --git a/common/recipes.txt b/common/recipes.txt
index ccd19b2..1a8adc7 100644
--- a/common/recipes.txt
+++ b/common/recipes.txt
@@ -1,3 +1,4 @@
+recipes-bsp          - Anything with links to specific hardware or hardware configuration information
 recipes-connectivity - Libraries and applications related to communication with other devices 
 recipes-core         - What's needed to build a basic working Linux image including commonly used dependencies
 recipes-devtools     - Tools primarily used by the build system (but can also be used on targets)