diff options
| author | Manuel Traut <manut@linutronix.de> | 2016-01-12 12:00:25 +0100 |
|---|---|---|
| committer | Manuel Traut <manut@linutronix.de> | 2016-01-12 12:00:25 +0100 |
| commit | 498830a97001a793c12aef3d011c5374a05b4a83 (patch) | |
| tree | 2c7e64e9ddb6556e22d21393f10cddc5bd990952 /examples/yocto/meta-mini/recipes-bsp | |
| parent | c99be12a9a7b6270e9b3db4c5f96cb8e8eb0c7c1 (diff) | |
mv yocto examples into example dir
Signed-off-by: Manuel Traut <manut@linutronix.de>
Diffstat (limited to 'examples/yocto/meta-mini/recipes-bsp')
6 files changed, 186 insertions, 0 deletions
diff --git a/examples/yocto/meta-mini/recipes-bsp/mini-image/maxi-mini-image.bb b/examples/yocto/meta-mini/recipes-bsp/mini-image/maxi-mini-image.bb new file mode 100644 index 0000000..3808764 --- /dev/null +++ b/examples/yocto/meta-mini/recipes-bsp/mini-image/maxi-mini-image.bb @@ -0,0 +1,3 @@ +require /home/local/src/poky/meta-mini/recipes-bsp/mini-image/mini-image.bb +IMAGE_INSTALL = "glibc hello hellocm autohello" +DESCRIPTION = "" diff --git a/examples/yocto/meta-mini/recipes-bsp/mini-image/mini-image.bb b/examples/yocto/meta-mini/recipes-bsp/mini-image/mini-image.bb new file mode 100644 index 0000000..e2536a9 --- /dev/null +++ b/examples/yocto/meta-mini/recipes-bsp/mini-image/mini-image.bb @@ -0,0 +1,3 @@ +IMAGE_LINGUAS = " " +inherit core-image +IMAGE_INSTALL += "sysvinit" diff --git a/examples/yocto/meta-mini/recipes-bsp/mini-image/tiny-image.bb b/examples/yocto/meta-mini/recipes-bsp/mini-image/tiny-image.bb new file mode 100644 index 0000000..ad787d5 --- /dev/null +++ b/examples/yocto/meta-mini/recipes-bsp/mini-image/tiny-image.bb @@ -0,0 +1,3 @@ +require recipes-bsp/mini-image/mini-image.bb +IMAGE_INSTALL = "eglibc hello hellocm autohello" +DESCRIPTION = "" diff --git a/examples/yocto/meta-mini/recipes-bsp/u-boot/u-boot-script_git.bb b/examples/yocto/meta-mini/recipes-bsp/u-boot/u-boot-script_git.bb new file mode 100644 index 0000000..c0b88e1 --- /dev/null +++ b/examples/yocto/meta-mini/recipes-bsp/u-boot/u-boot-script_git.bb @@ -0,0 +1,63 @@ +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://Licenses/README;md5=025bf9f768cbcb1a165dbe1a110babfb" +DEPENDS = "u-boot-mkimage-native" + +PV = "v2014.01+git${SRCPV}" + +SRCREV = "aed9475361820a65e37ed936c833322cbbc0f2b5" +SRCBRANCH = "v2014.04-20140419" +SRC_URI = "git://github.com/boundarydevices/u-boot-imx6.git;protocol=https;branch=${SRCBRANCH}" + +S = "${WORKDIR}/git" + +inherit deploy + +do_mkimage () { + + # allow deploy to use the ${MACHINE} name to simplify things + if [ ! -d board/boundary/${MACHINE} ]; then + mkdir board/boundary/${MACHINE} + fi + bootscript=board/boundary/nitrogen6x/6x_bootscript-yocto.txt; + if ! [ -f $bootscript ]; then + bootscript=board/boundary/nitrogen6x/6x_bootscript-yocto.txt; + fi + echo "bootscript == $bootscript" + + upgradescript=board/boundary/nitrogen6x/6x_upgrade.txt; + if ! [ -f $upgradescript ]; then + upgradescript=board/boundary/nitrogen6x/6x_upgrade.txt; + fi + + uboot-mkimage -A arm -O linux -T script -C none -a 0 -e 0 \ + -n "boot script" -d $bootscript \ + board/boundary/${MACHINE}/6x_bootscript + + uboot-mkimage -A arm -O linux -T script -C none -a 0 -e 0 \ + -n "upgrade script" -d $upgradescript \ + board/boundary/${MACHINE}/6x_upgrade +} + +addtask mkimage after do_compile before do_install + +do_deploy () { + install -d ${DEPLOYDIR} + install ${S}/board/boundary/${MACHINE}/6x_bootscript \ + ${DEPLOYDIR}/6x_bootscript-${MACHINE}-${PV}-${PR} + install ${S}/board/boundary/${MACHINE}/6x_upgrade \ + ${DEPLOYDIR}/6x_upgrade-${MACHINE}-${PV}-${PR} + + cd ${DEPLOYDIR} + rm -f 6x_bootscript-${MACHINE} 6x_upgrade-${MACHINE} + ln -sf 6x_bootscript-${MACHINE}-${PV}-${PR} 6x_bootscript-${MACHINE} + ln -sf 6x_upgrade-${MACHINE}-${PV}-${PR} 6x_upgrade-${MACHINE} +} + +addtask deploy after do_install before do_build + +do_compile[noexec] = "1" +do_install[noexec] = "1" +do_populate_sysroot[noexec] = "1" + +PACKAGE_ARCH = "${MACHINE_ARCH}" +COMPATIBLE_MACHINE = "(imx6qsabrelite)" diff --git a/examples/yocto/meta-mini/recipes-bsp/u-boot/u-boot.inc b/examples/yocto/meta-mini/recipes-bsp/u-boot/u-boot.inc new file mode 100644 index 0000000..f49bb5d --- /dev/null +++ b/examples/yocto/meta-mini/recipes-bsp/u-boot/u-boot.inc @@ -0,0 +1,88 @@ +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 () { + install -d ${D}/boot + install ${S}/${UBOOT_BINARY} ${D}/boot/${UBOOT_IMAGE} + ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_BINARY} + + if [ -e ${WORKDIR}/fw_env.config ] ; then + install -d ${D}${sysconfdir} + install -m 644 ${WORKDIR}/fw_env.config ${D}${sysconfdir}/fw_env.config + fi + + if [ "x${SPL_BINARY}" != "x" ] + then + install ${S}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE} + ln -sf ${SPL_IMAGE} ${D}/boot/${SPL_BINARY} + fi +} + +FILES_${PN} = "/boot ${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/examples/yocto/meta-mini/recipes-bsp/u-boot/u-boot_2014.07.bb b/examples/yocto/meta-mini/recipes-bsp/u-boot/u-boot_2014.07.bb new file mode 100644 index 0000000..e53f51e --- /dev/null +++ b/examples/yocto/meta-mini/recipes-bsp/u-boot/u-boot_2014.07.bb @@ -0,0 +1,26 @@ +require u-boot.inc + +# To build u-boot for your machine, provide the following lines in your machine +# config, replacing the assignments as appropriate for your machine. +# UBOOT_MACHINE = "omap3_beagle_config" +# UBOOT_ENTRYPOINT = "0x80008000" +# UBOOT_LOADADDRESS = "0x80008000" + +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://README;beginline=1;endline=6;md5=157ab8408beab40cd8ce1dc69f702a6c" + +# 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 = "524123a70761110c5cf3ccc5f52f6d4da071b959" + +PV = "v2014.07+git${SRCPV}" + +SRC_URI = "git://git.denx.de/u-boot.git;branch=master" + +S = "${WORKDIR}/git" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +do_deploy_append () { + echo "bootpart=0" > ${DEPLOYDIR}/uEnv.txt +} |
