diff options
author | Ting Liu <b28495@freescale.com> | 2013-07-08 11:08:16 +0800 |
---|---|---|
committer | Zhenhua Luo <zhenhua.luo@freescale.com> | 2013-07-10 11:22:18 +0800 |
commit | 851c7ff26de131b871bd5a64274c1a2b13d60fc3 (patch) | |
tree | 92eac21a1e1e6c3c0d27bdeaca2ff967e85c2e65 /recipes-bsp/u-boot | |
parent | 55f7692b69fe273aa41f7362a9324c80515d7b52 (diff) | |
download | meta-fsl-ppc-851c7ff26de131b871bd5a64274c1a2b13d60fc3.tar.gz |
change layout to follow oe-core guidelines of recipes
Follow the rules defined in:
http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes.txt
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)
recipes-extended - Applications which whilst not essential add
features compared to the alternatives in
core. May be needed for full tool functionality
or LSB compliance.
recipes-gnome - All things related to the GTK+ application
framework
recipes-graphics - X and other graphically related system libraries
recipes-kernel - The kernel and generic applications/libraries
with strong kernel dependencies
recipes-lsb4 - Recipes added for the sole purpose of supporting
the Linux Standard Base (LSB) 4.x
recipes-multimedia - Codecs and support utilties for audio, images and
video
recipes-rt - Provides package and image recipes for using and
testing the PREEMPT_RT kernel
recipes-qt - All things related to the Qt application
framework
recipes-sato - The Sato demo/reference UI/UX, its associated
apps and configuration
recipes-support - Recipes used by other recipes but that are not
directly included in images
recipes-dpaa - recipes related to fsl dpaa feature
recipes-virtualization - recipes related to fsl virtualization feature
Signed-off-by: Ting Liu <b28495@freescale.com>
Diffstat (limited to 'recipes-bsp/u-boot')
-rw-r--r-- | recipes-bsp/u-boot/u-boot_git.bb | 139 |
1 files changed, 139 insertions, 0 deletions
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" | ||