diff options
author | Adrian Dudau <adrian.dudau@enea.com> | 2014-06-26 13:59:10 +0200 |
---|---|---|
committer | Adrian Dudau <adrian.dudau@enea.com> | 2014-06-26 14:13:09 +0200 |
commit | e064c208e2c78663b0be1316117d963798839d6e (patch) | |
tree | d5d7bb0e950e5d6960d464f96f82f8132b8225c8 /recipes-bsp | |
download | meta-fsl-ppc-daisy-enea.tar.gz |
initial commit for Enea Linux 4.0daisy-enea
Migrated from the internal git server on the daisy-enea branch
Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
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 | 43 | ||||
-rw-r--r-- | recipes-bsp/u-boot/files/Fix-the-depend-race-issue.patch | 38 | ||||
-rw-r--r-- | recipes-bsp/u-boot/u-boot_git.bb | 179 |
4 files changed, 279 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..5e1719b --- /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;nobranch=1" | ||
7 | SRCREV = "3d5f5ae1461eb14927a89eea12a841983e151ec7" | ||
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..ad961ed --- /dev/null +++ b/recipes-bsp/rcw/rcw_git.bb | |||
@@ -0,0 +1,43 @@ | |||
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 | |||
12 | inherit deploy | ||
13 | |||
14 | SRC_URI = "git://git.freescale.com/ppc/sdk/rcw.git;nobranch=1" | ||
15 | SRCREV = "bc38737b5cb08336a075cb38481881f87b33b7a1" | ||
16 | SRCREV_t2080qds = "a694a89f4b57ce700b5b2ea84302c8618ece2f0f" | ||
17 | SRCREV_t2080qds-64b = "a694a89f4b57ce700b5b2ea84302c8618ece2f0f" | ||
18 | |||
19 | S = "${WORKDIR}/git" | ||
20 | |||
21 | export PYTHON | ||
22 | |||
23 | do_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 | |||
31 | do_deploy () { | ||
32 | M=`echo ${MACHINE} | sed s/-64b//g` | ||
33 | install -d ${DEPLOYDIR}/rcw | ||
34 | cp -r ${S}/${M}/${M}/* ${DEPLOYDIR}/rcw | ||
35 | } | ||
36 | addtask deploy after do_install | ||
37 | |||
38 | PACKAGES += "${PN}-image" | ||
39 | FILES_${PN}-image += "/boot" | ||
40 | |||
41 | COMPATIBLE_HOST_fslmachine = ".*" | ||
42 | COMPATIBLE_HOST ?= "(none)" | ||
43 | ALLOW_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 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | From 301832414369b749918e0d5db850eed19b81c0fc Mon Sep 17 00:00:00 2001 | ||
4 | From: Zhenhua Luo <zhenhua.luo@freescale.com> | ||
5 | Date: Tue, 24 Sep 2013 00:54:40 -0500 | ||
6 | Subject: [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 | |||
14 | Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com> | ||
15 | --- | ||
16 | spl/Makefile | 6 +++++- | ||
17 | 1 file changed, 5 insertions(+), 1 deletion(-) | ||
18 | |||
19 | diff --git a/spl/Makefile b/spl/Makefile | ||
20 | index 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 | -- | ||
37 | 1.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..406914c --- /dev/null +++ b/recipes-bsp/u-boot/u-boot_git.bb | |||
@@ -0,0 +1,179 @@ | |||
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 | LICENSE_t2080qds = "GPLv2 & BSD-3-Clause & BSD-2-Clause & LGPL-2.0 & LGPL-2.1" | ||
8 | LIC_FILES_CHKSUM_t2080qds = " \ | ||
9 | file://Licenses/gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | ||
10 | file://Licenses/bsd-2-clause.txt;md5=6a31f076f5773aabd8ff86191ad6fdd5 \ | ||
11 | file://Licenses/bsd-3-clause.txt;md5=4a1190eac56a9db675d58ebe86eaf50c \ | ||
12 | file://Licenses/lgpl-2.0.txt;md5=5f30f0716dfdd0d91eb439ebec522ec2 \ | ||
13 | file://Licenses/lgpl-2.1.txt;md5=4fbd65380cdd255951079008b364516c \ | ||
14 | " | ||
15 | LICENSE_t2080qds-64b = "GPLv2 & BSD-3-Clause & BSD-2-Clause & LGPL-2.0 & LGPL-2.1" | ||
16 | LIC_FILES_CHKSUM_t2080qds-64b = " \ | ||
17 | file://Licenses/gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | ||
18 | file://Licenses/bsd-2-clause.txt;md5=6a31f076f5773aabd8ff86191ad6fdd5 \ | ||
19 | file://Licenses/bsd-3-clause.txt;md5=4a1190eac56a9db675d58ebe86eaf50c \ | ||
20 | file://Licenses/lgpl-2.0.txt;md5=5f30f0716dfdd0d91eb439ebec522ec2 \ | ||
21 | file://Licenses/lgpl-2.1.txt;md5=4fbd65380cdd255951079008b364516c \ | ||
22 | " | ||
23 | |||
24 | PR = "r30" | ||
25 | INHIBIT_DEFAULT_DEPS = "1" | ||
26 | DEPENDS = "boot-format-native libgcc ${@base_contains('TCMODE', 'external-fsl', '', 'virtual/${TARGET_PREFIX}gcc', d)}" | ||
27 | |||
28 | inherit deploy | ||
29 | |||
30 | SRC_URI = "git://git.freescale.com/ppc/sdk/u-boot.git;nobranch=1 \ | ||
31 | file://Fix-the-depend-race-issue.patch" | ||
32 | SRCREV = "5438fc1ca159c8f5724272efd1289e6d49771e69" | ||
33 | SRCREV_t2080qds = "fc03874549668c1a10f97c10b3a77cb0f236df19" | ||
34 | SRCREV_t2080qds-64b = "fc03874549668c1a10f97c10b3a77cb0f236df19" | ||
35 | |||
36 | python () { | ||
37 | if d.getVar("TCMODE", True) == "external-fsl": | ||
38 | return | ||
39 | |||
40 | ml = d.getVar("MULTILIB_VARIANTS", True) | ||
41 | arch = d.getVar("OVERRIDES", True) | ||
42 | |||
43 | if ("e5500-64b:" in arch or "e6500-64b:" in arch) and not "lib32" in ml: | ||
44 | raise bb.parse.SkipPackage("Building the u-boot for this arch requires multilib to be enabled") | ||
45 | } | ||
46 | |||
47 | DEPENDS_append_e5500-64b = "${@base_contains('TCMODE', 'external-fsl', '', ' lib32-gcc-cross lib32-libgcc', d)}" | ||
48 | PATH_append_e5500-64b = ":${STAGING_BINDIR_NATIVE}/${DEFAULTTUNE_virtclass-multilib-lib32}${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}/" | ||
49 | TOOLCHAIN_OPTIONS_append_e5500-64b = "${@base_contains('TCMODE', 'external-fsl', '', '/../lib32-${MACHINE}', d)}" | ||
50 | TARGET_VENDOR_virtclass-multilib-lib32 ?= "${@base_contains('TCMODE', 'external-fsl', '', '-${DISTRO}mllib32', d)}" | ||
51 | WRAP_TARGET_PREFIX_e5500-64b := "powerpc${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}-" | ||
52 | |||
53 | DEPENDS_append_e6500-64b = "${@base_contains('TCMODE', 'external-fsl', '', ' lib32-gcc-cross lib32-libgcc', d)}" | ||
54 | PATH_append_e6500-64b = ":${STAGING_BINDIR_NATIVE}/${DEFAULTTUNE_virtclass-multilib-lib32}${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}/" | ||
55 | TOOLCHAIN_OPTIONS_append_e6500-64b = "${@base_contains('TCMODE', 'external-fsl', '', '/../lib32-${MACHINE}', d)}" | ||
56 | TARGET_VENDOR_virtclass-multilib-lib32 ?= "${@base_contains('TCMODE', 'external-fsl', '', '-${DISTRO}mllib32', d)}" | ||
57 | WRAP_TARGET_PREFIX_e6500-64b := "powerpc${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}-" | ||
58 | WRAP_TARGET_PREFIX = "${TARGET_PREFIX}" | ||
59 | |||
60 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
61 | |||
62 | UBOOT_LOCALVERSION = "${@d.getVar('SDK_VERSION', True).partition(' ')[0]}" | ||
63 | |||
64 | USRC ?= "" | ||
65 | S = '${@base_conditional("USRC", "", "${WORKDIR}/git", "${USRC}", d)}' | ||
66 | |||
67 | CROSS_COMPILE = '${@base_conditional("TCMODE", "external-fsl", "${TARGET_PREFIX}", "${WRAP_TARGET_PREFIX}", d)}' | ||
68 | EXTRA_OEMAKE = 'CROSS_COMPILE=${CROSS_COMPILE} CC="${CROSS_COMPILE}gcc ${TOOLCHAIN_OPTIONS}"' | ||
69 | |||
70 | do_compile () { | ||
71 | unset LDFLAGS | ||
72 | unset CFLAGS | ||
73 | unset CPPFLAGS | ||
74 | |||
75 | if [ ! -e ${B}/.scmversion -a ! -e ${S}/.scmversion ] | ||
76 | then | ||
77 | head=`git rev-parse --verify --short HEAD 2> /dev/null` | ||
78 | printf "%s%s%s" ${UBOOT_LOCALVERSION} +g $head > ${B}/.scmversion | ||
79 | printf "%s%s%s" ${UBOOT_LOCALVERSION} +g $head > ${S}/.scmversion | ||
80 | fi | ||
81 | |||
82 | if [ "x${UBOOT_MACHINES}" = "x" ]; then | ||
83 | UBOOT_MACHINES=${UBOOT_MACHINE} | ||
84 | fi | ||
85 | |||
86 | for board in ${UBOOT_MACHINES}; do | ||
87 | oe_runmake O=${board} distclean | ||
88 | oe_runmake O=${board} ${board} | ||
89 | oe_runmake O=${board} all | ||
90 | |||
91 | case "${board}" in | ||
92 | *SDCARD*) UBOOT_TARGET="u-boot-sd";; | ||
93 | *SPIFLASH*) UBOOT_TARGET="u-boot-spi";; | ||
94 | *NAND*) UBOOT_TARGET="u-boot-nand";; | ||
95 | *SRIO*) UBOOT_TARGET="u-boot-srio";; | ||
96 | *) UBOOT_TARGET="";; | ||
97 | esac | ||
98 | |||
99 | # deal with sd/spi/nand/srio image | ||
100 | UBOOT_SOURCE=u-boot | ||
101 | if [ "x${UBOOT_TARGET}" != "x" ]; then | ||
102 | # some boards' nand image was named as u-boot-with-spl | ||
103 | if [ "${UBOOT_TARGET}" = "u-boot-nand" ];then | ||
104 | if echo $board |egrep -q "(P1010RDB|P1020RDB|P1021RDB|P2020RDB|P1022DS|BSC913)";then | ||
105 | UBOOT_SOURCE=u-boot-with-spl | ||
106 | fi | ||
107 | elif [ "${UBOOT_TARGET}" = "u-boot-spi" ];then | ||
108 | if echo $board |egrep -q "(P1010RDB|P1020RDB|P1021RDB|P2020RDB|P1022DS)";then | ||
109 | UBOOT_SOURCE=u-boot-with-spl | ||
110 | fi | ||
111 | elif [ "${UBOOT_TARGET}" = "u-boot-sd" ];then | ||
112 | if echo $board |egrep -q "(P1010RDB|P1020RDB|P1021RDB|P2020RDB|P1022DS)";then | ||
113 | UBOOT_SOURCE=u-boot-with-spl | ||
114 | fi | ||
115 | fi | ||
116 | cp ${S}/${board}/${UBOOT_SOURCE}.bin ${S}/${board}/${UBOOT_TARGET}.bin | ||
117 | |||
118 | # use boot-format to regenerate spi image if BOOTFORMAT_CONFIG is not empty | ||
119 | if [ "${UBOOT_TARGET}" = "u-boot-spi" ] && [ -n "${BOOTFORMAT_CONFIG}" ];then | ||
120 | ${STAGING_BINDIR_NATIVE}/boot_format \ | ||
121 | ${STAGING_DATADIR_NATIVE}/boot_format/${BOOTFORMAT_CONFIG} \ | ||
122 | ${S}/${board}/${UBOOT_SOURCE}.bin -spi ${S}/${board}/${UBOOT_TARGET}.bin | ||
123 | fi | ||
124 | fi | ||
125 | done | ||
126 | } | ||
127 | |||
128 | do_install(){ | ||
129 | if [ "x${UBOOT_MACHINES}" = "x" ]; then | ||
130 | UBOOT_MACHINES=${UBOOT_MACHINE} | ||
131 | fi | ||
132 | |||
133 | for board in ${UBOOT_MACHINES}; do | ||
134 | case "${board}" in | ||
135 | *SDCARD*) UBOOT_TARGET="u-boot-sd";; | ||
136 | *SPIFLASH*) UBOOT_TARGET="u-boot-spi";; | ||
137 | *NAND*) UBOOT_TARGET="u-boot-nand";; | ||
138 | *SRIO*) UBOOT_TARGET="u-boot-srio";; | ||
139 | *) UBOOT_TARGET="u-boot";; | ||
140 | esac | ||
141 | |||
142 | if [ -f ${S}/${board}/${UBOOT_TARGET}.bin ]; then | ||
143 | mkdir -p ${D}/boot/ | ||
144 | install ${S}/${board}/${UBOOT_TARGET}.bin ${D}/boot/${UBOOT_TARGET}-${board}-${PV}-${PR}.bin | ||
145 | ln -sf ${UBOOT_TARGET}-${board}-${PV}-${PR}.bin ${D}/boot/${UBOOT_TARGET}.bin | ||
146 | fi | ||
147 | done | ||
148 | } | ||
149 | |||
150 | do_deploy(){ | ||
151 | if [ "x${UBOOT_MACHINES}" = "x" ]; then | ||
152 | UBOOT_MACHINES=${UBOOT_MACHINE} | ||
153 | fi | ||
154 | |||
155 | for board in ${UBOOT_MACHINES}; do | ||
156 | case "${board}" in | ||
157 | *SDCARD*) UBOOT_TARGET="u-boot-sd";; | ||
158 | *SPIFLASH*) UBOOT_TARGET="u-boot-spi";; | ||
159 | *NAND*) UBOOT_TARGET="u-boot-nand";; | ||
160 | *SRIO*) UBOOT_TARGET="u-boot-srio";; | ||
161 | *) UBOOT_TARGET="u-boot";; | ||
162 | esac | ||
163 | |||
164 | if [ -f ${S}/${board}/${UBOOT_TARGET}.bin ]; then | ||
165 | mkdir -p ${DEPLOYDIR} | ||
166 | install ${S}/${board}/${UBOOT_TARGET}.bin ${DEPLOYDIR}/${UBOOT_TARGET}-${board}-${PV}-${PR}.bin | ||
167 | |||
168 | cd ${DEPLOYDIR} | ||
169 | rm -f ${UBOOT_TARGET}-${board}.bin | ||
170 | ln -sf ${UBOOT_TARGET}-${board}-${PV}-${PR}.bin ${UBOOT_TARGET}-${board}.bin | ||
171 | fi | ||
172 | done | ||
173 | } | ||
174 | addtask deploy after do_install | ||
175 | |||
176 | PACKAGES += "${PN}-images" | ||
177 | FILES_${PN}-images += "/boot" | ||
178 | |||
179 | ALLOW_EMPTY_${PN} = "1" | ||