summaryrefslogtreecommitdiffstats
path: root/recipes-bsp
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-bsp')
-rw-r--r--recipes-bsp/boot-format/boot-format_git.bb19
-rw-r--r--recipes-bsp/rcw/rcw_git.bb41
-rw-r--r--recipes-bsp/u-boot/files/Fix-the-depend-race-issue.patch38
-rw-r--r--recipes-bsp/u-boot/u-boot_git.bb148
4 files changed, 246 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 @@
1DESCRIPTION = "Boot format utility for booting from eSDHC/eSPI"
2LICENSE = "GPLv2"
3PR = "r6"
4LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
5
6SRC_URI = "git://git.freescale.com/ppc/sdk/boot-format.git"
7SRCREV = "d9bbfaba0c9316ae33455099c47bae429479e530"
8
9S = "${WORKDIR}/git"
10EXTRA_OEMAKE = 'CC="${CC}"'
11
12do_install(){
13 oe_runmake DESTDIR=${D} PREFIX=${prefix} install
14}
15
16PACKAGES =+ "${PN}-config"
17FILES_${PN}-config += "${datadir}/*"
18
19BBCLASSEXTEND = "native nativesdk"
diff --git a/recipes-bsp/rcw/rcw_git.bb b/recipes-bsp/rcw/rcw_git.bb
new file mode 100644
index 0000000..7d87783
--- /dev/null
+++ b/recipes-bsp/rcw/rcw_git.bb
@@ -0,0 +1,41 @@
1DESCRIPTION = "Reset Control Words (RCW)"
2SECTION = "rcw"
3LICENSE = "BSD"
4PR = "r8"
5
6LIC_FILES_CHKSUM = "file://rcw.py;beginline=8;endline=28;md5=9ba0b28922dd187b06b6c8ebcfdd208e"
7
8# this package is specific to the machine itself
9INHIBIT_DEFAULT_DEPS = "1"
10PACKAGE_ARCH = "${MACHINE_ARCH}"
11COMPATIBLE_HOST_fslmachine = ".*"
12COMPATIBLE_HOST ?= "(none)"
13
14inherit deploy
15
16SRC_URI = "git://git.freescale.com/ppc/sdk/rcw.git"
17SRCREV = "5d3c819bcca6d09dcf7b52b3f2855dda304a5997"
18
19S = "${WORKDIR}/git"
20
21export PYTHON
22
23do_install () {
24 make install
25
26 M=`echo ${MACHINE} | sed s/-64b//g`
27 install -d ${D}/boot/rcw
28 cp -r ${S}/${M}/${M}/* ${D}/boot/rcw
29}
30
31do_deploy () {
32 M=`echo ${MACHINE} | sed s/-64b//g`
33 install -d ${DEPLOYDIR}/rcw
34 cp -r ${S}/${M}/${M}/* ${DEPLOYDIR}/rcw
35}
36addtask deploy after do_install
37
38PACKAGES += "${PN}-image"
39FILES_${PN}-image += "/boot"
40
41ALLOW_EMPTY_${PN} = "1"
diff --git a/recipes-bsp/u-boot/files/Fix-the-depend-race-issue.patch b/recipes-bsp/u-boot/files/Fix-the-depend-race-issue.patch
new file mode 100644
index 0000000..1ddc667
--- /dev/null
+++ b/recipes-bsp/u-boot/files/Fix-the-depend-race-issue.patch
@@ -0,0 +1,38 @@
1Upstream-Status: Pending
2
3From 301832414369b749918e0d5db850eed19b81c0fc Mon Sep 17 00:00:00 2001
4From: Zhenhua Luo <zhenhua.luo@freescale.com>
5Date: Tue, 24 Sep 2013 00:54:40 -0500
6Subject: [PATCH] Fix the depend race issue
7
8| make[3]: Entering directory `/srv/home/pokybuild/yocto-autobuilder-new/yocto-slave/nightly-fsl-ppc/build/build/tmp/work/p1022ds-poky-linux-gnuspe/u-boot/git-r30/git/arch/powerpc/cpu/mpc85xx'
9| /srv/home/pokybuild/yocto-autobuilder-new/yocto-slave/nightly-fsl-ppc/build/build/tmp/work/p1022ds-poky-linux-gnuspe/u-boot/git-r30/git/P1022DS_NAND/spl/arch/powerpc/cpu/mpc85xx/.depend:125: *** missing separator. Stop.
10| make[3]: Leaving directory `/srv/home/pokybuild/yocto-autobuilder-new/yocto-slave/nightly-fsl-ppc/build/build/tmp/work/p1022ds-poky-linux-gnuspe/u-boot/git-r30/git/arch/powerpc/cpu/mpc85xx'
11| make[2]: *** [/srv/home/pokybuild/yocto-autobuilder-new/yocto-slave/nightly-fsl-ppc/build/build/tmp/work/p1022ds-poky-linux-gnuspe/u-boot/git-r30/git/P1022DS_NAND/spl/arch/powerpc/cpu/mpc85xx/start.o] Error 2
12| make[2]: *** Waiting for unfinished jobs....
13
14Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com>
15---
16 spl/Makefile | 6 +++++-
17 1 file changed, 5 insertions(+), 1 deletion(-)
18
19diff --git a/spl/Makefile b/spl/Makefile
20index 6dbb105..3156d87 100644
21--- a/spl/Makefile
22+++ b/spl/Makefile
23@@ -185,7 +185,11 @@ $(eval $(call make_u_boot_list, $(obj)u-boot.lst, $(LIBS)))
24 $(obj)u-boot-spl.lds: $(LDSCRIPT) $(obj)u-boot.lst depend
25 $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(obj). -ansi -D__ASSEMBLY__ -P - < $< > $@
26
27-depend: $(obj).depend
28+# Explicitly make _depend in subdirs containing multiple targets to prevent
29+# parallel sub-makes creating .depend files simultaneously.
30+depend dep: $(obj).depend
31+ for dir in $(SUBDIRS) $(CPUDIR) $(LDSCRIPT_MAKEFILE_DIR) ; do \
32+ $(MAKE) -C $(SRCTREE)/$$dir _depend ; done
33 .PHONY: depend
34
35 # defines $(obj).depend target
36--
371.8.2.1
38
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..3479b23
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot_git.bb
@@ -0,0 +1,148 @@
1DESCRIPTION = "U-boot bootloader"
2HOMEPAGE = "http://u-boot.sf.net"
3SECTION = "bootloaders"
4PROVIDES = "virtual/bootloader"
5LICENSE = "GPLv2"
6LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb"
7
8PR = "r30"
9INHIBIT_DEFAULT_DEPS = "1"
10DEPENDS = "boot-format-native virtual/${TARGET_PREFIX}gcc libgcc"
11
12inherit deploy
13
14SRC_URI = "git://git.freescale.com/ppc/sdk/u-boot.git \
15 file://Fix-the-depend-race-issue.patch"
16SRCREV = "831b30de4b768f0b3b7dbfa11739b14cea612d7e"
17
18python () {
19 ml = d.getVar("MULTILIB_VARIANTS", True)
20 arch = d.getVar("OVERRIDES", True)
21
22 if ("e5500-64b:" in arch or "e6500-64b:" in arch) and not "lib32" in ml:
23 raise bb.parse.SkipPackage("Building the u-boot for this arch requires multilib to be enabled")
24}
25
26DEPENDS_append_e5500-64b = " lib32-gcc-cross lib32-libgcc"
27PATH_append_e5500-64b = ":${STAGING_BINDIR_NATIVE}/${DEFAULTTUNE_virtclass-multilib-lib32}${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}/"
28TOOLCHAIN_OPTIONS_append_e5500-64b = "/../lib32-${MACHINE}"
29TARGET_VENDOR_virtclass-multilib-lib32 ?= "-${DISTRO}mllib32"
30WRAP_TARGET_PREFIX_e5500-64b = "powerpc${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}-"
31
32DEPENDS_append_e6500-64b = " lib32-gcc-cross lib32-libgcc"
33PATH_append_e6500-64b = ":${STAGING_BINDIR_NATIVE}/${DEFAULTTUNE_virtclass-multilib-lib32}${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}/"
34TOOLCHAIN_OPTIONS_append_e6500-64b = "/../lib32-${MACHINE}"
35TARGET_VENDOR_virtclass-multilib-lib32 ?= "-${DISTRO}mllib32"
36WRAP_TARGET_PREFIX_e6500-64b = "powerpc${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}-"
37
38WRAP_TARGET_PREFIX = "${TARGET_PREFIX}"
39EXTRA_OEMAKE = 'CROSS_COMPILE=${WRAP_TARGET_PREFIX} CC="${WRAP_TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS}"'
40
41PACKAGE_ARCH = "${MACHINE_ARCH}"
42
43UBOOT_LOCALVERSION = "${@d.getVar('SDK_VERSION', True).partition(' ')[0]}"
44
45USRC ?= ""
46S = '${@base_conditional("USRC", "", "${WORKDIR}/git", "${USRC}", d)}'
47
48do_compile () {
49 unset LDFLAGS
50 unset CFLAGS
51 unset CPPFLAGS
52
53 if [ ! -e ${B}/.scmversion -a ! -e ${S}/.scmversion ]
54 then
55 echo ${UBOOT_LOCALVERSION} > ${B}/.scmversion
56 echo ${UBOOT_LOCALVERSION} > ${S}/.scmversion
57 fi
58
59 if [ "x${UBOOT_MACHINES}" = "x" ]; then
60 UBOOT_MACHINES=${UBOOT_MACHINE}
61 fi
62
63 for board in ${UBOOT_MACHINES}; do
64 oe_runmake O=${board} distclean
65 oe_runmake O=${board} ${board}
66 oe_runmake O=${board} all
67
68 case "${board}" in
69 *SDCARD*) UBOOT_TARGET="u-boot-sd";;
70 *SPIFLASH*) UBOOT_TARGET="u-boot-spi";;
71 *NAND*) UBOOT_TARGET="u-boot-nand";;
72 *) UBOOT_TARGET="";;
73 esac
74
75 if [ "x${UBOOT_TARGET}" != "x" ]; then
76 if [ "${UBOOT_TARGET}" = "u-boot-sd" ]; then
77 cp ${S}/${board}/u-boot.bin ${S}/${board}/${UBOOT_TARGET}.bin
78 elif [ "${UBOOT_TARGET}" = "u-boot-nand" ];then
79 if [ "${DEFAULTTUNE}" = "ppce500v2" ];then
80 if echo $board |egrep "(P1010RDB|P1020RDB|P1021RDB|P1024RDB|P2020RDB|P1022DS|P1025RDB|BSC9131RDB|BSC9132QDS)" 2>&1 >/dev/null;then
81 cp ${S}/${board}/u-boot-with-spl.bin ${S}/${board}/${UBOOT_TARGET}.bin
82 fi
83 else
84 cp ${S}/${board}/u-boot.bin ${S}/${board}/${UBOOT_TARGET}.bin
85 fi
86 else
87 if [ -n "${BOOTFORMAT_CONFIG}" ];then
88 ${STAGING_BINDIR_NATIVE}/boot_format \
89 ${STAGING_DATADIR_NATIVE}/boot_format/${BOOTFORMAT_CONFIG} \
90 ${S}/${board}/u-boot.bin -spi ${S}/${board}/${UBOOT_TARGET}.bin
91 else
92 cp ${S}/${board}/u-boot.bin ${S}/${board}/${UBOOT_TARGET}.bin
93 fi
94 fi
95 fi
96 done
97}
98
99do_install(){
100 if [ "x${UBOOT_MACHINES}" = "x" ]; then
101 UBOOT_MACHINES=${UBOOT_MACHINE}
102 fi
103
104 for board in ${UBOOT_MACHINES}; do
105 case "${board}" in
106 *SDCARD*) UBOOT_TARGET="u-boot-sd";;
107 *SPIFLASH*) UBOOT_TARGET="u-boot-spi";;
108 *NAND*) UBOOT_TARGET="u-boot-nand";;
109 *) UBOOT_TARGET="u-boot";;
110 esac
111
112 if [ -f ${S}/${board}/${UBOOT_TARGET}.bin ]; then
113 mkdir -p ${D}/boot/
114 install ${S}/${board}/${UBOOT_TARGET}.bin ${D}/boot/${UBOOT_TARGET}-${board}-${PV}-${PR}.bin
115 ln -sf ${UBOOT_TARGET}-${board}-${PV}-${PR}.bin ${D}/boot/${UBOOT_TARGET}.bin
116 fi
117 done
118}
119
120do_deploy(){
121 if [ "x${UBOOT_MACHINES}" = "x" ]; then
122 UBOOT_MACHINES=${UBOOT_MACHINE}
123 fi
124
125 for board in ${UBOOT_MACHINES}; do
126 case "${board}" in
127 *SDCARD*) UBOOT_TARGET="u-boot-sd";;
128 *SPIFLASH*) UBOOT_TARGET="u-boot-spi";;
129 *NAND*) UBOOT_TARGET="u-boot-nand";;
130 *) UBOOT_TARGET="u-boot";;
131 esac
132
133 if [ -f ${S}/${board}/${UBOOT_TARGET}.bin ]; then
134 mkdir -p ${DEPLOYDIR}
135 install ${S}/${board}/${UBOOT_TARGET}.bin ${DEPLOYDIR}/${UBOOT_TARGET}-${board}-${PV}-${PR}.bin
136
137 cd ${DEPLOYDIR}
138 rm -f ${UBOOT_TARGET}-${board}.bin
139 ln -sf ${UBOOT_TARGET}-${board}-${PV}-${PR}.bin ${UBOOT_TARGET}-${board}.bin
140 fi
141 done
142}
143addtask deploy after do_install
144
145PACKAGES += "${PN}-images"
146FILES_${PN}-images += "/boot"
147
148ALLOW_EMPTY_${PN} = "1"