Zev Weiss | 897b744 | 2022-01-18 22:48:12 -0800 | [diff] [blame] | 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 | |
| 7 | inherit uboot-config cml1 |
| 8 | |
| 9 | DEPENDS += "kern-tools-native" |
| 10 | |
| 11 | do_configure () { |
| 12 | if [ -n "${UBOOT_CONFIG}" ]; then |
| 13 | unset i j |
| 14 | for config in ${UBOOT_MACHINE}; do |
| 15 | i=$(expr $i + 1); |
| 16 | for type in ${UBOOT_CONFIG}; do |
| 17 | j=$(expr $j + 1); |
| 18 | if [ $j -eq $i ]; then |
| 19 | oe_runmake -C ${S} O=${B}/${config} ${config} |
| 20 | if [ -n "${@' '.join(find_cfgs(d))}" ]; then |
| 21 | merge_config.sh -m -O ${B}/${config} ${B}/${config}/.config ${@" ".join(find_cfgs(d))} |
| 22 | oe_runmake -C ${S} O=${B}/${config} oldconfig |
| 23 | fi |
| 24 | fi |
| 25 | done |
| 26 | unset j |
| 27 | done |
| 28 | unset i |
| 29 | DEVTOOL_DISABLE_MENUCONFIG=true |
| 30 | else |
| 31 | if [ -n "${UBOOT_MACHINE}" ]; then |
| 32 | oe_runmake -C ${S} O=${B} ${UBOOT_MACHINE} |
| 33 | else |
| 34 | oe_runmake -C ${S} O=${B} oldconfig |
| 35 | fi |
| 36 | merge_config.sh -m .config ${@" ".join(find_cfgs(d))} |
| 37 | cml1_do_configure |
| 38 | fi |
| 39 | } |