summaryrefslogtreecommitdiffstats
path: root/meta/recipes-bsp
diff options
context:
space:
mode:
authorManjukumar Matha <manjukumar.harthikote-matha@xilinx.com>2019-01-01 21:48:17 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-01-07 10:54:01 +0000
commit11278e3b2c75be80645b9841763a97dbb35daadc (patch)
treed3a02c3dc8ccdb79d0cc90ddb78387959c1f85db /meta/recipes-bsp
parent031d708aedda11d65ba9746af4f01b91264a1f86 (diff)
downloadopenembedded-core-11278e3b2c75be80645b9841763a97dbb35daadc.tar.gz
openembedded-core-11278e3b2c75be80645b9841763a97dbb35daadc.tar.bz2
openembedded-core-11278e3b2c75be80645b9841763a97dbb35daadc.zip
u-boot.inc: Support menuconfig for u-boot
u-boot mainline supports menuconfig, this patch enables menuconfig for u-boot using cml1. u-boot recipe in OE-core handles multi configuration of u-boot using UBOOT_CONFIG. Since we cannot determine on which u-boot config the menuconfig should run, the patch limits when UBOOT_CONFIG is not defined. Signed-off-by: Manjukumar Matha <manjukumar.harthikote-matha@xilinx.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-bsp')
-rw-r--r--meta/recipes-bsp/u-boot/u-boot.inc27
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"
PACKAGE_ARCH = "${MACHINE_ARCH}"
-inherit uboot-config uboot-extlinux-config uboot-sign deploy
+DEPENDS += "kern-tools-native"
+
+inherit uboot-config uboot-extlinux-config uboot-sign deploy cml1
DEPENDS += "swig-native python-native"
@@ -66,6 +68,28 @@ UBOOT_EXTLINUX_INSTALL_DIR ?= "/boot/extlinux"
UBOOT_EXTLINUX_CONF_NAME ?= "extlinux.conf"
UBOOT_EXTLINUX_SYMLINK ?= "${UBOOT_EXTLINUX_CONF_NAME}-${MACHINE}-${PR}"
+# returns all the elements from the src uri that are .cfg files
+def find_cfgs(d):
+ sources=src_patches(d, True)
+ sources_list=[]
+ for s in sources:
+ if s.endswith('.cfg'):
+ sources_list.append(s)
+
+ return sources_list
+
+do_configure () {
+ if [ -z "${UBOOT_CONFIG}" ]; then
+ if [ -n "${UBOOT_MACHINE}" ]; then
+ oe_runmake -C ${S} O=${B} ${UBOOT_MACHINE}
+ else
+ oe_runmake -C ${S} O=${B} oldconfig
+ fi
+ merge_config.sh -m .config ${@" ".join(find_cfgs(d))}
+ cml1_do_configure
+ fi
+}
+
do_compile () {
if [ "${@bb.utils.filter('DISTRO_FEATURES', 'ld-is-gold', d)}" ]; then
sed -i 's/$(CROSS_COMPILE)ld$/$(CROSS_COMPILE)ld.bfd/g' ${S}/config.mk
@@ -105,7 +129,6 @@ do_compile () {
done
unset i
else
- oe_runmake -C ${S} O=${B} ${UBOOT_MACHINE}
oe_runmake -C ${S} O=${B} ${UBOOT_MAKE_TARGET}
fi