diff options
Diffstat (limited to 'recipes-bsp')
| -rw-r--r-- | recipes-bsp/boot-format/boot-format_git.bb | 19 | ||||
| -rw-r--r-- | recipes-bsp/rcw/rcw_git.bb | 39 | ||||
| -rw-r--r-- | recipes-bsp/u-boot/u-boot_git.bb | 139 |
3 files changed, 197 insertions, 0 deletions
diff --git a/recipes-bsp/boot-format/boot-format_git.bb b/recipes-bsp/boot-format/boot-format_git.bb new file mode 100644 index 0000000..ac1504d --- /dev/null +++ b/recipes-bsp/boot-format/boot-format_git.bb | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | DESCRIPTION = "Boot format utility for booting from eSDHC/eSPI" | ||
| 2 | LICENSE = "GPLv2" | ||
| 3 | PR = "r6" | ||
| 4 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" | ||
| 5 | |||
| 6 | SRC_URI = "git://git.freescale.com/ppc/sdk/boot-format.git" | ||
| 7 | SRCREV = "d9bbfaba0c9316ae33455099c47bae429479e530" | ||
| 8 | |||
| 9 | S = "${WORKDIR}/git" | ||
| 10 | EXTRA_OEMAKE = 'CC="${CC}"' | ||
| 11 | |||
| 12 | do_install(){ | ||
| 13 | oe_runmake DESTDIR=${D} PREFIX=${prefix} install | ||
| 14 | } | ||
| 15 | |||
| 16 | PACKAGES =+ "${PN}-config" | ||
| 17 | FILES_${PN}-config += "${datadir}/*" | ||
| 18 | |||
| 19 | BBCLASSEXTEND = "native nativesdk" | ||
diff --git a/recipes-bsp/rcw/rcw_git.bb b/recipes-bsp/rcw/rcw_git.bb new file mode 100644 index 0000000..c532a9d --- /dev/null +++ b/recipes-bsp/rcw/rcw_git.bb | |||
| @@ -0,0 +1,39 @@ | |||
| 1 | DESCRIPTION = "Reset Control Words (RCW)" | ||
| 2 | SECTION = "rcw" | ||
| 3 | LICENSE = "BSD" | ||
| 4 | PR = "r8" | ||
| 5 | |||
| 6 | LIC_FILES_CHKSUM = "file://rcw.py;beginline=8;endline=28;md5=9ba0b28922dd187b06b6c8ebcfdd208e" | ||
| 7 | |||
| 8 | # this package is specific to the machine itself | ||
| 9 | INHIBIT_DEFAULT_DEPS = "1" | ||
| 10 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
| 11 | COMPATIBLE_HOST_fslmachine = ".*" | ||
| 12 | COMPATIBLE_HOST ?= "(none)" | ||
| 13 | |||
| 14 | inherit deploy | ||
| 15 | |||
| 16 | SRC_URI = "git://git.freescale.com/ppc/sdk/rcw.git" | ||
| 17 | SRCREV = "5d3c819bcca6d09dcf7b52b3f2855dda304a5997" | ||
| 18 | |||
| 19 | S = "${WORKDIR}/git" | ||
| 20 | |||
| 21 | do_install () { | ||
| 22 | make install | ||
| 23 | |||
| 24 | M=`echo ${MACHINE} | sed s/-64b//g` | ||
| 25 | install -d ${D}/boot/rcw | ||
| 26 | cp -r ${S}/${M}/${M}/* ${D}/boot/rcw | ||
| 27 | } | ||
| 28 | |||
| 29 | do_deploy () { | ||
| 30 | M=`echo ${MACHINE} | sed s/-64b//g` | ||
| 31 | install -d ${DEPLOYDIR}/rcw | ||
| 32 | cp -r ${S}/${M}/${M}/* ${DEPLOYDIR}/rcw | ||
| 33 | } | ||
| 34 | addtask deploy after do_install | ||
| 35 | |||
| 36 | PACKAGES += "${PN}-image" | ||
| 37 | FILES_${PN}-image += "/boot" | ||
| 38 | |||
| 39 | ALLOW_EMPTY_${PN} = "1" | ||
diff --git a/recipes-bsp/u-boot/u-boot_git.bb b/recipes-bsp/u-boot/u-boot_git.bb new file mode 100644 index 0000000..c3aa105 --- /dev/null +++ b/recipes-bsp/u-boot/u-boot_git.bb | |||
| @@ -0,0 +1,139 @@ | |||
| 1 | DESCRIPTION = "U-boot bootloader" | ||
| 2 | HOMEPAGE = "http://u-boot.sf.net" | ||
| 3 | SECTION = "bootloaders" | ||
| 4 | PROVIDES = "virtual/bootloader" | ||
| 5 | LICENSE = "GPLv2" | ||
| 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb" | ||
| 7 | |||
| 8 | PR = "r30" | ||
| 9 | INHIBIT_DEFAULT_DEPS = "1" | ||
| 10 | DEPENDS = "boot-format-native virtual/${TARGET_PREFIX}gcc libgcc" | ||
| 11 | |||
| 12 | inherit deploy | ||
| 13 | |||
| 14 | SRC_URI = "git://git.freescale.com/ppc/sdk/u-boot.git" | ||
| 15 | SRCREV = "831b30de4b768f0b3b7dbfa11739b14cea612d7e" | ||
| 16 | |||
| 17 | python () { | ||
| 18 | ml = d.getVar("MULTILIB_VARIANTS", True) | ||
| 19 | arch = d.getVar("OVERRIDES", True) | ||
| 20 | |||
| 21 | if ("e5500-64b:" in arch or "e6500-64b:" in arch) and not "lib32" in ml: | ||
| 22 | raise bb.parse.SkipPackage("Building the u-boot for this arch requires multilib to be enabled") | ||
| 23 | } | ||
| 24 | |||
| 25 | DEPENDS_append_e5500-64b = " lib32-gcc-cross lib32-libgcc" | ||
| 26 | PATH_append_e5500-64b = ":${STAGING_BINDIR_NATIVE}/${DEFAULTTUNE_virtclass-multilib-lib32}${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}/" | ||
| 27 | TOOLCHAIN_OPTIONS_append_e5500-64b = "/../lib32-${MACHINE}" | ||
| 28 | TARGET_VENDOR_virtclass-multilib-lib32 ?= "-${DISTRO}mllib32" | ||
| 29 | WRAP_TARGET_PREFIX_e5500-64b = "powerpc${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}-" | ||
| 30 | |||
| 31 | DEPENDS_append_e6500-64b = " lib32-gcc-cross lib32-libgcc" | ||
| 32 | PATH_append_e6500-64b = ":${STAGING_BINDIR_NATIVE}/${DEFAULTTUNE_virtclass-multilib-lib32}${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}/" | ||
| 33 | TOOLCHAIN_OPTIONS_append_e6500-64b = "/../lib32-${MACHINE}" | ||
| 34 | TARGET_VENDOR_virtclass-multilib-lib32 ?= "-${DISTRO}mllib32" | ||
| 35 | WRAP_TARGET_PREFIX_e6500-64b = "powerpc${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}-" | ||
| 36 | |||
| 37 | WRAP_TARGET_PREFIX = "${TARGET_PREFIX}" | ||
| 38 | EXTRA_OEMAKE = 'CROSS_COMPILE=${WRAP_TARGET_PREFIX} CC="${WRAP_TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS}"' | ||
| 39 | |||
| 40 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
| 41 | |||
| 42 | USRC ?= "" | ||
| 43 | S = '${@base_conditional("USRC", "", "${WORKDIR}/git", "${USRC}", d)}' | ||
| 44 | |||
| 45 | do_compile () { | ||
| 46 | unset LDFLAGS | ||
| 47 | unset CFLAGS | ||
| 48 | unset CPPFLAGS | ||
| 49 | |||
| 50 | if [ "x${UBOOT_MACHINES}" = "x" ]; then | ||
| 51 | UBOOT_MACHINES=${UBOOT_MACHINE} | ||
| 52 | fi | ||
| 53 | |||
| 54 | for board in ${UBOOT_MACHINES}; do | ||
| 55 | oe_runmake O=${board} distclean | ||
| 56 | oe_runmake O=${board} ${board} | ||
| 57 | oe_runmake O=${board} all | ||
| 58 | |||
| 59 | case "${board}" in | ||
| 60 | *SDCARD*) UBOOT_TARGET="u-boot-sd";; | ||
| 61 | *SPIFLASH*) UBOOT_TARGET="u-boot-spi";; | ||
| 62 | *NAND*) UBOOT_TARGET="u-boot-nand";; | ||
| 63 | *) UBOOT_TARGET="";; | ||
| 64 | esac | ||
| 65 | |||
| 66 | if [ "x${UBOOT_TARGET}" != "x" ]; then | ||
| 67 | if [ "${UBOOT_TARGET}" = "u-boot-sd" ]; then | ||
| 68 | cp ${S}/${board}/u-boot.bin ${S}/${board}/${UBOOT_TARGET}.bin | ||
| 69 | elif [ "${UBOOT_TARGET}" = "u-boot-nand" ];then | ||
| 70 | if [ "${DEFAULTTUNE}" = "ppce500v2" ];then | ||
| 71 | if echo $board |egrep "(P1010RDB|P1020RDB|P1021RDB|P1024RDB|P2020RDB|P1022DS|P1025RDB|BSC9131RDB|BSC9132QDS)" 2>&1 >/dev/null;then | ||
| 72 | cp ${S}/${board}/u-boot-with-spl.bin ${S}/${board}/${UBOOT_TARGET}.bin | ||
| 73 | fi | ||
| 74 | else | ||
| 75 | cp ${S}/${board}/u-boot.bin ${S}/${board}/${UBOOT_TARGET}.bin | ||
| 76 | fi | ||
| 77 | else | ||
| 78 | if [ -n "${BOOTFORMAT_CONFIG}" ];then | ||
| 79 | ${STAGING_BINDIR_NATIVE}/boot_format \ | ||
| 80 | ${STAGING_DATADIR_NATIVE}/boot_format/${BOOTFORMAT_CONFIG} \ | ||
| 81 | ${S}/${board}/u-boot.bin -spi ${S}/${board}/${UBOOT_TARGET}.bin | ||
| 82 | else | ||
| 83 | cp ${S}/${board}/u-boot.bin ${S}/${board}/${UBOOT_TARGET}.bin | ||
| 84 | fi | ||
| 85 | fi | ||
| 86 | fi | ||
| 87 | done | ||
| 88 | } | ||
| 89 | |||
| 90 | do_install(){ | ||
| 91 | if [ "x${UBOOT_MACHINES}" = "x" ]; then | ||
| 92 | UBOOT_MACHINES=${UBOOT_MACHINE} | ||
| 93 | fi | ||
| 94 | |||
| 95 | for board in ${UBOOT_MACHINES}; do | ||
| 96 | case "${board}" in | ||
| 97 | *SDCARD*) UBOOT_TARGET="u-boot-sd";; | ||
| 98 | *SPIFLASH*) UBOOT_TARGET="u-boot-spi";; | ||
| 99 | *NAND*) UBOOT_TARGET="u-boot-nand";; | ||
| 100 | *) UBOOT_TARGET="u-boot";; | ||
| 101 | esac | ||
| 102 | |||
| 103 | if [ -f ${S}/${board}/${UBOOT_TARGET}.bin ]; then | ||
| 104 | mkdir -p ${D}/boot/ | ||
| 105 | install ${S}/${board}/${UBOOT_TARGET}.bin ${D}/boot/${UBOOT_TARGET}-${board}-${PV}-${PR}.bin | ||
| 106 | ln -sf ${UBOOT_TARGET}-${board}-${PV}-${PR}.bin ${D}/boot/${UBOOT_TARGET}.bin | ||
| 107 | fi | ||
| 108 | done | ||
| 109 | } | ||
| 110 | |||
| 111 | do_deploy(){ | ||
| 112 | if [ "x${UBOOT_MACHINES}" = "x" ]; then | ||
| 113 | UBOOT_MACHINES=${UBOOT_MACHINE} | ||
| 114 | fi | ||
| 115 | |||
| 116 | for board in ${UBOOT_MACHINES}; do | ||
| 117 | case "${board}" in | ||
| 118 | *SDCARD*) UBOOT_TARGET="u-boot-sd";; | ||
| 119 | *SPIFLASH*) UBOOT_TARGET="u-boot-spi";; | ||
| 120 | *NAND*) UBOOT_TARGET="u-boot-nand";; | ||
| 121 | *) UBOOT_TARGET="u-boot";; | ||
| 122 | esac | ||
| 123 | |||
| 124 | if [ -f ${S}/${board}/${UBOOT_TARGET}.bin ]; then | ||
| 125 | mkdir -p ${DEPLOYDIR} | ||
| 126 | install ${S}/${board}/${UBOOT_TARGET}.bin ${DEPLOYDIR}/${UBOOT_TARGET}-${board}-${PV}-${PR}.bin | ||
| 127 | |||
| 128 | cd ${DEPLOYDIR} | ||
| 129 | rm -f ${UBOOT_TARGET}-${board}.bin | ||
| 130 | ln -sf ${UBOOT_TARGET}-${board}-${PV}-${PR}.bin ${UBOOT_TARGET}-${board}.bin | ||
| 131 | fi | ||
| 132 | done | ||
| 133 | } | ||
| 134 | addtask deploy after do_install | ||
| 135 | |||
| 136 | PACKAGES += "${PN}-images" | ||
| 137 | FILES_${PN}-images += "/boot" | ||
| 138 | |||
| 139 | ALLOW_EMPTY_${PN} = "1" | ||
