mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-19 21:09:03 +02:00
u-boot: Split do_configure logic into separate file
Some auxiliary u-boot recipes may need u-boot properly configured (including *.cfg additions via bbappends) but aren't necessarily building u-boot itself; to support such situations, here we split the u-boot do_configure() out of u-boot.inc and into its own u-boot-configure.inc. (From OE-Core rev: e55e6fb4983a41f74c0e457bf54bd8dfa5608daa) Signed-off-by: Zev Weiss <zev@bewilderbeest.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
18e3554301
commit
fc9a17ad38
39
meta/recipes-bsp/u-boot/u-boot-configure.inc
Normal file
39
meta/recipes-bsp/u-boot/u-boot-configure.inc
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
# This provides the logic for creating the desired u-boot config,
|
||||||
|
# accounting for any *.cfg files added to SRC_URI. It's separated
|
||||||
|
# from u-boot.inc for use by recipes that need u-boot properly
|
||||||
|
# configured but aren't doing a full build of u-boot itself (such as
|
||||||
|
# its companion tools).
|
||||||
|
|
||||||
|
inherit uboot-config cml1
|
||||||
|
|
||||||
|
DEPENDS += "kern-tools-native"
|
||||||
|
|
||||||
|
do_configure () {
|
||||||
|
if [ -n "${UBOOT_CONFIG}" ]; then
|
||||||
|
unset i j
|
||||||
|
for config in ${UBOOT_MACHINE}; do
|
||||||
|
i=$(expr $i + 1);
|
||||||
|
for type in ${UBOOT_CONFIG}; do
|
||||||
|
j=$(expr $j + 1);
|
||||||
|
if [ $j -eq $i ]; then
|
||||||
|
oe_runmake -C ${S} O=${B}/${config} ${config}
|
||||||
|
if [ -n "${@' '.join(find_cfgs(d))}" ]; then
|
||||||
|
merge_config.sh -m -O ${B}/${config} ${B}/${config}/.config ${@" ".join(find_cfgs(d))}
|
||||||
|
oe_runmake -C ${S} O=${B}/${config} oldconfig
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
unset j
|
||||||
|
done
|
||||||
|
unset i
|
||||||
|
DEVTOOL_DISABLE_MENUCONFIG=true
|
||||||
|
else
|
||||||
|
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
|
||||||
|
}
|
|
@ -3,7 +3,6 @@ PROVIDES = "virtual/bootloader"
|
||||||
|
|
||||||
PACKAGE_ARCH = "${MACHINE_ARCH}"
|
PACKAGE_ARCH = "${MACHINE_ARCH}"
|
||||||
|
|
||||||
DEPENDS += "kern-tools-native"
|
|
||||||
DEPENDS += "${@bb.utils.contains('UBOOT_ENV_SUFFIX', 'scr', 'u-boot-mkimage-native', '', d)}"
|
DEPENDS += "${@bb.utils.contains('UBOOT_ENV_SUFFIX', 'scr', 'u-boot-mkimage-native', '', d)}"
|
||||||
|
|
||||||
inherit uboot-config uboot-extlinux-config uboot-sign deploy cml1 python3native kernel-arch
|
inherit uboot-config uboot-extlinux-config uboot-sign deploy cml1 python3native kernel-arch
|
||||||
|
@ -25,35 +24,7 @@ PACKAGECONFIG[openssl] = ",,openssl-native"
|
||||||
# file already exists it will not be overwritten.
|
# file already exists it will not be overwritten.
|
||||||
UBOOT_LOCALVERSION ?= ""
|
UBOOT_LOCALVERSION ?= ""
|
||||||
|
|
||||||
do_configure () {
|
require u-boot-configure.inc
|
||||||
if [ -n "${UBOOT_CONFIG}" ]; then
|
|
||||||
unset i j
|
|
||||||
for config in ${UBOOT_MACHINE}; do
|
|
||||||
i=$(expr $i + 1);
|
|
||||||
for type in ${UBOOT_CONFIG}; do
|
|
||||||
j=$(expr $j + 1);
|
|
||||||
if [ $j -eq $i ]; then
|
|
||||||
oe_runmake -C ${S} O=${B}/${config} ${config}
|
|
||||||
if [ -n "${@' '.join(find_cfgs(d))}" ]; then
|
|
||||||
merge_config.sh -m -O ${B}/${config} ${B}/${config}/.config ${@" ".join(find_cfgs(d))}
|
|
||||||
oe_runmake -C ${S} O=${B}/${config} oldconfig
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
unset j
|
|
||||||
done
|
|
||||||
unset i
|
|
||||||
DEVTOOL_DISABLE_MENUCONFIG=true
|
|
||||||
else
|
|
||||||
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 () {
|
do_compile () {
|
||||||
if [ "${@bb.utils.filter('DISTRO_FEATURES', 'ld-is-gold', d)}" ]; then
|
if [ "${@bb.utils.filter('DISTRO_FEATURES', 'ld-is-gold', d)}" ]; then
|
||||||
|
|
Loading…
Reference in New Issue
Block a user