diff options
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-bsp/u-boot/u-boot.inc | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/meta/recipes-bsp/u-boot/u-boot.inc b/meta/recipes-bsp/u-boot/u-boot.inc index bbdbc25cfe..96c1f94011 100644 --- a/meta/recipes-bsp/u-boot/u-boot.inc +++ b/meta/recipes-bsp/u-boot/u-boot.inc | |||
@@ -5,7 +5,9 @@ B = "${WORKDIR}/build" | |||
5 | 5 | ||
6 | PACKAGE_ARCH = "${MACHINE_ARCH}" | 6 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
7 | 7 | ||
8 | inherit uboot-config uboot-extlinux-config uboot-sign deploy | 8 | DEPENDS += "kern-tools-native" |
9 | |||
10 | inherit uboot-config uboot-extlinux-config uboot-sign deploy cml1 | ||
9 | 11 | ||
10 | DEPENDS += "swig-native python-native" | 12 | DEPENDS += "swig-native python-native" |
11 | 13 | ||
@@ -66,6 +68,28 @@ UBOOT_EXTLINUX_INSTALL_DIR ?= "/boot/extlinux" | |||
66 | UBOOT_EXTLINUX_CONF_NAME ?= "extlinux.conf" | 68 | UBOOT_EXTLINUX_CONF_NAME ?= "extlinux.conf" |
67 | UBOOT_EXTLINUX_SYMLINK ?= "${UBOOT_EXTLINUX_CONF_NAME}-${MACHINE}-${PR}" | 69 | UBOOT_EXTLINUX_SYMLINK ?= "${UBOOT_EXTLINUX_CONF_NAME}-${MACHINE}-${PR}" |
68 | 70 | ||
71 | # returns all the elements from the src uri that are .cfg files | ||
72 | def find_cfgs(d): | ||
73 | sources=src_patches(d, True) | ||
74 | sources_list=[] | ||
75 | for s in sources: | ||
76 | if s.endswith('.cfg'): | ||
77 | sources_list.append(s) | ||
78 | |||
79 | return sources_list | ||
80 | |||
81 | do_configure () { | ||
82 | if [ -z "${UBOOT_CONFIG}" ]; then | ||
83 | if [ -n "${UBOOT_MACHINE}" ]; then | ||
84 | oe_runmake -C ${S} O=${B} ${UBOOT_MACHINE} | ||
85 | else | ||
86 | oe_runmake -C ${S} O=${B} oldconfig | ||
87 | fi | ||
88 | merge_config.sh -m .config ${@" ".join(find_cfgs(d))} | ||
89 | cml1_do_configure | ||
90 | fi | ||
91 | } | ||
92 | |||
69 | do_compile () { | 93 | do_compile () { |
70 | if [ "${@bb.utils.filter('DISTRO_FEATURES', 'ld-is-gold', d)}" ]; then | 94 | if [ "${@bb.utils.filter('DISTRO_FEATURES', 'ld-is-gold', d)}" ]; then |
71 | sed -i 's/$(CROSS_COMPILE)ld$/$(CROSS_COMPILE)ld.bfd/g' ${S}/config.mk | 95 | sed -i 's/$(CROSS_COMPILE)ld$/$(CROSS_COMPILE)ld.bfd/g' ${S}/config.mk |
@@ -105,7 +129,6 @@ do_compile () { | |||
105 | done | 129 | done |
106 | unset i | 130 | unset i |
107 | else | 131 | else |
108 | oe_runmake -C ${S} O=${B} ${UBOOT_MACHINE} | ||
109 | oe_runmake -C ${S} O=${B} ${UBOOT_MAKE_TARGET} | 132 | oe_runmake -C ${S} O=${B} ${UBOOT_MAKE_TARGET} |
110 | fi | 133 | fi |
111 | 134 | ||