blob: 378d675364616a09ef30cfad83fd32155f2f0f3d [file] [log] [blame]
Zev Weiss897b7442022-01-18 22:48:12 -08001# 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
Patrick Williams03514f12024-04-05 07:04:11 -050011CONFIGURE_FILES = "${@d.getVar('UBOOT_MACHINE') or '.config'}"
12
Zev Weiss897b7442022-01-18 22:48:12 -080013do_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 oe_runmake -C ${S} O=${B}/${config} ${config}
22 if [ -n "${@' '.join(find_cfgs(d))}" ]; then
23 merge_config.sh -m -O ${B}/${config} ${B}/${config}/.config ${@" ".join(find_cfgs(d))}
24 oe_runmake -C ${S} O=${B}/${config} oldconfig
25 fi
26 fi
27 done
28 unset j
29 done
30 unset i
Zev Weiss897b7442022-01-18 22:48:12 -080031 else
32 if [ -n "${UBOOT_MACHINE}" ]; then
33 oe_runmake -C ${S} O=${B} ${UBOOT_MACHINE}
34 else
35 oe_runmake -C ${S} O=${B} oldconfig
36 fi
37 merge_config.sh -m .config ${@" ".join(find_cfgs(d))}
38 cml1_do_configure
39 fi
40}