1# This provides the logic for creating the desired u-boot config, 2# accounting for any *.cfg files added to SRC_URI. It's separated 3# from u-boot.inc for use by recipes that need u-boot properly 4# configured but aren't doing a full build of u-boot itself (such as 5# its companion tools). 6 7inherit uboot-config cml1 8 9DEPENDS += "kern-tools-native" 10 11CONFIGURE_FILES = "${@d.getVar('UBOOT_MACHINE') or '.config'}" 12 13do_configure () { 14 if [ -n "${UBOOT_CONFIG}" ]; then 15 unset i j 16 for config in ${UBOOT_MACHINE}; do 17 i=$(expr $i + 1); 18 for type in ${UBOOT_CONFIG}; do 19 j=$(expr $j + 1); 20 if [ $j -eq $i ]; then 21 uboot_configure_config $config $type 22 fi 23 done 24 unset j 25 done 26 unset i 27 else 28 uboot_configure 29 fi 30} 31 32uboot_configure_config () { 33 config=$1 34 type=$2 35 36 oe_runmake -C ${S} O=${B}/${config} ${config} 37 if [ -n "${@' '.join(find_cfgs(d))}" ]; then 38 merge_config.sh -m -O ${B}/${config} ${B}/${config}/.config ${@" ".join(find_cfgs(d))} 39 oe_runmake -C ${S} O=${B}/${config} oldconfig 40 fi 41} 42 43uboot_configure () { 44 if [ -n "${UBOOT_MACHINE}" ]; then 45 oe_runmake -C ${S} O=${B} ${UBOOT_MACHINE} 46 else 47 oe_runmake -C ${S} O=${B} oldconfig 48 fi 49 merge_config.sh -m .config ${@" ".join(find_cfgs(d))} 50 cml1_do_configure 51} 52 53