diff options
Diffstat (limited to 'meta-aspeed/recipes-bsp/u-boot')
6 files changed, 152 insertions, 19 deletions
diff --git a/meta-aspeed/recipes-bsp/u-boot/files/patch-2013.07/0003-u-boot-snapshot-of-OpenBMC-f926614.patch b/meta-aspeed/recipes-bsp/u-boot/files/patch-2013.07/0003-u-boot-snapshot-of-OpenBMC-f926614.patch new file mode 100644 index 0000000..559e65b --- /dev/null +++ b/meta-aspeed/recipes-bsp/u-boot/files/patch-2013.07/0003-u-boot-snapshot-of-OpenBMC-f926614.patch @@ -0,0 +1,13 @@ +diff --git a/meta-aspeed/recipes-bsp/u-boot/files/u-boot-v2013.07/include/configs/fbyosemite.h b/meta-aspeed/recipes-bsp/u-boot/files/u-boot-v2013.07/include/configs/fbyosemite.h +index 73a3cf9..397ca48 100644 +--- a/meta-aspeed/recipes-bsp/u-boot/files/u-boot-v2013.07/include/configs/fbyosemite.h ++++ b/meta-aspeed/recipes-bsp/u-boot/files/u-boot-v2013.07/include/configs/fbyosemite.h +@@ -155,7 +155,7 @@ + */ + #define CONFIG_NR_DRAM_BANKS 1 /* we have 1 bank of DRAM */ + #define PHYS_SDRAM_1 0x40000000 /* SDRAM Bank #1 */ +-#define PHYS_SDRAM_1_SIZE 0x8000000 /* 128 MB */ ++#define PHYS_SDRAM_1_SIZE 0x10000000 /* 256 MB */ + + #define CONFIG_SYS_SDRAM_BASE 0x40000000 + diff --git a/meta-aspeed/recipes-bsp/u-boot/u-boot-fw-utils_2013.07%.bbappend b/meta-aspeed/recipes-bsp/u-boot/u-boot-fw-utils_2013.07%.bbappend deleted file mode 100644 index be61682..0000000 --- a/meta-aspeed/recipes-bsp/u-boot/u-boot-fw-utils_2013.07%.bbappend +++ /dev/null @@ -1,13 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" - -SRC_URI += "file://fw_env.config \ - file://patch-2013.07/0000-u-boot-aspeed-064.patch \ - file://patch-2013.07/0001-u-boot-openbmc.patch \ - file://patch-2013.07/0002-Create-snapshot-of-OpenBMC.patch;striplevel=6 \ - " -do_install_append() { - if [ -e ${WORKDIR}/fw_env.config ] ; then - install -d ${D}${sysconfdir} - install -m 644 ${WORKDIR}/fw_env.config ${D}${sysconfdir}/fw_env.config - fi -} diff --git a/meta-aspeed/recipes-bsp/u-boot/u-boot-fw-utils_2013.07.bb b/meta-aspeed/recipes-bsp/u-boot/u-boot-fw-utils_2013.07.bb new file mode 100644 index 0000000..fcf8ac8 --- /dev/null +++ b/meta-aspeed/recipes-bsp/u-boot/u-boot-fw-utils_2013.07.bb @@ -0,0 +1,38 @@ +SUMMARY = "U-Boot bootloader fw_printenv/setenv utilities" +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb" +SECTION = "bootloader" +DEPENDS = "mtd-utils" + +# This revision corresponds to the tag "v2013.07" +# We use the revision in order to avoid having to fetch it from the +# repo during parse +SRCREV = "62c175fbb8a0f9a926c88294ea9f7e88eb898f6c" + +PV = "v2013.07" + +SRC_URI = "git://git.denx.de/u-boot.git;branch=master;protocol=git \ + file://patch-2013.07/0000-u-boot-aspeed-064.patch \ + file://patch-2013.07/0001-u-boot-openbmc.patch \ + file://patch-2013.07/0002-Create-snapshot-of-OpenBMC.patch;striplevel=6 \ + file://patch-2013.07/0003-u-boot-snapshot-of-OpenBMC-f926614.patch;striplevel=6 \ + " + +S = "${WORKDIR}/git" + +EXTRA_OEMAKE = 'HOSTCC="${CC}" HOSTSTRIP="true"' + +inherit uboot-config + +do_compile () { + oe_runmake ${UBOOT_MACHINE} + oe_runmake env +} + +do_install () { + install -d ${D}${base_sbindir} + 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 +} + +PACKAGE_ARCH = "${MACHINE_ARCH}" diff --git a/meta-aspeed/recipes-bsp/u-boot/u-boot.inc b/meta-aspeed/recipes-bsp/u-boot/u-boot.inc new file mode 100644 index 0000000..cb1c403 --- /dev/null +++ b/meta-aspeed/recipes-bsp/u-boot/u-boot.inc @@ -0,0 +1,78 @@ +SUMMARY = "Universal Boot Loader for embedded devices" +HOMEPAGE = "http://www.denx.de/wiki/U-Boot/WebHome" +SECTION = "bootloaders" +PROVIDES = "virtual/bootloader" + +inherit uboot-config deploy + +EXTRA_OEMAKE = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS}"' + +# Allow setting an additional version string that will be picked up by the +# u-boot build system and appended to the u-boot version. If the .scmversion +# file already exists it will not be overwritten. +UBOOT_LOCALVERSION ?= "" + +# Some versions of u-boot use .bin and others use .img. By default use .bin +# but enable individual recipes to change this value. +UBOOT_SUFFIX ?= "bin" +UBOOT_IMAGE ?= "u-boot-${MACHINE}-${PV}-${PR}.${UBOOT_SUFFIX}" +UBOOT_BINARY ?= "u-boot.${UBOOT_SUFFIX}" +UBOOT_SYMLINK ?= "u-boot-${MACHINE}.${UBOOT_SUFFIX}" +UBOOT_MAKE_TARGET ?= "all" + +# Some versions of u-boot build an SPL (Second Program Loader) image that +# should be packaged along with the u-boot binary as well as placed in the +# deploy directory. For those versions they can set the following variables +# to allow packaging the SPL. +SPL_BINARY ?= "" +SPL_IMAGE ?= "${SPL_BINARY}-${MACHINE}-${PV}-${PR}" +SPL_SYMLINK ?= "${SPL_BINARY}-${MACHINE}" + +do_compile () { + if [ "${@base_contains('DISTRO_FEATURES', 'ld-is-gold', 'ld-is-gold', '', d)}" = "ld-is-gold" ] ; then + sed -i 's/$(CROSS_COMPILE)ld$/$(CROSS_COMPILE)ld.bfd/g' config.mk + fi + + unset LDFLAGS + unset CFLAGS + unset CPPFLAGS + + if [ ! -e ${B}/.scmversion -a ! -e ${S}/.scmversion ] + then + echo ${UBOOT_LOCALVERSION} > ${B}/.scmversion + echo ${UBOOT_LOCALVERSION} > ${S}/.scmversion + fi + + oe_runmake ${UBOOT_MACHINE} + oe_runmake ${UBOOT_MAKE_TARGET} +} + +do_install () { + if [ -e ${WORKDIR}/fw_env.config ] ; then + install -d ${D}${sysconfdir} + install -m 644 ${WORKDIR}/fw_env.config ${D}${sysconfdir}/fw_env.config + fi +} + +FILES_${PN} = "${sysconfdir}" +FILESPATH =. "${FILE_DIRNAME}/u-boot-git/${MACHINE}:" + +do_deploy () { + install -d ${DEPLOYDIR} + install ${S}/${UBOOT_BINARY} ${DEPLOYDIR}/${UBOOT_IMAGE} + + cd ${DEPLOYDIR} + rm -f ${UBOOT_BINARY} ${UBOOT_SYMLINK} + ln -sf ${UBOOT_IMAGE} ${UBOOT_SYMLINK} + ln -sf ${UBOOT_IMAGE} ${UBOOT_BINARY} + + if [ "x${SPL_BINARY}" != "x" ] + then + install ${S}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE} + rm -f ${DEPLOYDIR}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_SYMLINK} + ln -sf ${SPL_IMAGE} ${DEPLOYDIR}/${SPL_BINARY} + ln -sf ${SPL_IMAGE} ${DEPLOYDIR}/${SPL_SYMLINK} + fi +} + +addtask deploy before do_build after do_compile diff --git a/meta-aspeed/recipes-bsp/u-boot/u-boot_2013.07%.bbappend b/meta-aspeed/recipes-bsp/u-boot/u-boot_2013.07%.bbappend deleted file mode 100644 index a2f26a5..0000000 --- a/meta-aspeed/recipes-bsp/u-boot/u-boot_2013.07%.bbappend +++ /dev/null @@ -1,6 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" - -SRC_URI += "file://patch-2013.07/0000-u-boot-aspeed-064.patch \ - file://patch-2013.07/0001-u-boot-openbmc.patch \ - file://patch-2013.07/0002-Create-snapshot-of-OpenBMC.patch;striplevel=6 \ - " diff --git a/meta-aspeed/recipes-bsp/u-boot/u-boot_2013.07.bb b/meta-aspeed/recipes-bsp/u-boot/u-boot_2013.07.bb new file mode 100644 index 0000000..253c525 --- /dev/null +++ b/meta-aspeed/recipes-bsp/u-boot/u-boot_2013.07.bb @@ -0,0 +1,23 @@ +require u-boot.inc + +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb \ + file://README;beginline=1;endline=22;md5=78b195c11cb6ef63e6985140db7d7bab" + +# This revision corresponds to the tag "v2013.07" +# We use the revision in order to avoid having to fetch it from the repo during parse +SRCREV = "62c175fbb8a0f9a926c88294ea9f7e88eb898f6c" + +PV = "v2013.07" + +SRC_URI = "git://git.denx.de/u-boot.git;branch=master \ + file://fw_env.config \ + file://patch-2013.07/0000-u-boot-aspeed-064.patch \ + file://patch-2013.07/0001-u-boot-openbmc.patch \ + file://patch-2013.07/0002-Create-snapshot-of-OpenBMC.patch;striplevel=6 \ + file://patch-2013.07/0003-u-boot-snapshot-of-OpenBMC-f926614.patch;striplevel=6 \ + " + +S = "${WORKDIR}/git" + +PACKAGE_ARCH = "${MACHINE_ARCH}" |