mirror of
https://git.yoctoproject.org/git/poky
synced 2026-01-01 13:58:04 +00:00
u-boot: Make sure the build dir is unique for each UBOOT_CONFIG
Each UBOOT_CONFIG entry is run in a different directory under ${B} so
that the files can be generated, compiled, and installed differently
from each other. Currently that unique directory name was just the
defconfig used for each UBOOT_CONFIG.
One potential conflict arises when you want build the same defconfig
twice, but pass in different make options. Then we get directory
collision. Simple fix is to include both the defconfig name and the
UBOOT_CONFIG type in the directory name.
This change has the potential to be backwards breaking if a layer is
using the UBOOT_CONFIG flow and overriding/appending any of the do_*
shell functions. Each of those will either need to change to using:
${B}/${config} -> ${B}/${config}-${type}
or for append functions they can use the new variable in the parent
function:
${B}/${config} -> ${B}/${builddir}
(From OE-Core rev: 22e96b32b0be02ec0971c9334d4b1df7c9ef8d84)
Signed-off-by: Ryan Eatmon <reatmon@ti.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
4794125221
commit
91f50b7c55
|
|
@ -528,6 +528,8 @@ do_uboot_assemble_fitimage() {
|
|||
fi
|
||||
done
|
||||
|
||||
builddir="${config}-${type}"
|
||||
|
||||
for binary in ${UBOOT_BINARIES}; do
|
||||
k=$(expr $k + 1);
|
||||
if [ $k -eq $i ]; then
|
||||
|
|
@ -535,7 +537,7 @@ do_uboot_assemble_fitimage() {
|
|||
fi
|
||||
done
|
||||
|
||||
cd ${B}/${config}
|
||||
cd ${B}/${builddir}
|
||||
uboot_assemble_fitimage_helper ${type} ${binary}
|
||||
done
|
||||
else
|
||||
|
|
@ -584,7 +586,8 @@ do_deploy:prepend() {
|
|||
for type in ${UBOOT_CONFIG}; do
|
||||
j=$(expr $j + 1);
|
||||
if [ $j -eq $i ]; then
|
||||
cd ${B}/${config}
|
||||
builddir="${config}-${type}"
|
||||
cd ${B}/${builddir}
|
||||
deploy_helper ${type}
|
||||
fi
|
||||
done
|
||||
|
|
|
|||
|
|
@ -33,6 +33,8 @@ uboot_configure_config () {
|
|||
config=$1
|
||||
type=$2
|
||||
|
||||
builddir="${config}-${type}"
|
||||
|
||||
unset k
|
||||
IFS="?"
|
||||
uboot_config_make_opts="${UBOOT_CONFIG_MAKE_OPTS}"
|
||||
|
|
@ -45,10 +47,10 @@ uboot_configure_config () {
|
|||
unset IFS
|
||||
unset k
|
||||
|
||||
oe_runmake -C ${S} O=${B}/${config} ${config_make_opts} ${UBOOT_MAKE_OPTS} ${config}
|
||||
oe_runmake -C ${S} O=${B}/${builddir} ${config_make_opts} ${UBOOT_MAKE_OPTS} ${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
|
||||
merge_config.sh -m -O ${B}/${builddir} ${B}/${builddir}/.config ${@" ".join(find_cfgs(d))}
|
||||
oe_runmake -C ${S} O=${B}/${builddir} oldconfig
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -75,6 +75,8 @@ uboot_compile_config () {
|
|||
config=$2
|
||||
type=$3
|
||||
|
||||
builddir="${config}-${type}"
|
||||
|
||||
unset k
|
||||
IFS="?"
|
||||
uboot_config_make_opts="${UBOOT_CONFIG_MAKE_OPTS}"
|
||||
|
|
@ -87,7 +89,7 @@ uboot_compile_config () {
|
|||
unset IFS
|
||||
unset k
|
||||
|
||||
oe_runmake -C ${S} O=${B}/${config} ${config_make_opts} ${UBOOT_MAKE_OPTS} ${UBOOT_MAKE_TARGET}
|
||||
oe_runmake -C ${S} O=${B}/${builddir} ${config_make_opts} ${UBOOT_MAKE_OPTS} ${UBOOT_MAKE_TARGET}
|
||||
|
||||
unset k
|
||||
for binary in ${UBOOT_BINARIES}; do
|
||||
|
|
@ -100,8 +102,8 @@ uboot_compile_config () {
|
|||
|
||||
# Generate the uboot-initial-env
|
||||
if [ -n "${UBOOT_INITIAL_ENV}" ]; then
|
||||
oe_runmake -C ${S} O=${B}/${config} u-boot-initial-env
|
||||
cp ${B}/${config}/u-boot-initial-env ${B}/${config}/u-boot-initial-env-${type}
|
||||
oe_runmake -C ${S} O=${B}/${builddir} u-boot-initial-env
|
||||
cp ${B}/${builddir}/u-boot-initial-env ${B}/${builddir}/u-boot-initial-env-${type}
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
@ -110,7 +112,9 @@ uboot_compile_config_copy_binary () {
|
|||
type=$2
|
||||
binary=$3
|
||||
|
||||
cp ${B}/${config}/${binary} ${B}/${config}/${UBOOT_BINARYNAME}-${type}.${UBOOT_SUFFIX}
|
||||
builddir="${config}-${type}"
|
||||
|
||||
cp ${B}/${builddir}/${binary} ${B}/${builddir}/${UBOOT_BINARYNAME}-${type}.${UBOOT_SUFFIX}
|
||||
}
|
||||
|
||||
uboot_compile () {
|
||||
|
|
@ -204,13 +208,15 @@ uboot_install_config () {
|
|||
config=$1
|
||||
type=$2
|
||||
|
||||
install -D -m 644 ${B}/${config}/${UBOOT_BINARYNAME}-${type}.${UBOOT_SUFFIX} ${D}/boot/${UBOOT_BINARYNAME}-${type}-${UBOOT_VERSION}.${UBOOT_SUFFIX}
|
||||
builddir="${config}-${type}"
|
||||
|
||||
install -D -m 644 ${B}/${builddir}/${UBOOT_BINARYNAME}-${type}.${UBOOT_SUFFIX} ${D}/boot/${UBOOT_BINARYNAME}-${type}-${UBOOT_VERSION}.${UBOOT_SUFFIX}
|
||||
ln -sf ${UBOOT_BINARYNAME}-${type}-${UBOOT_VERSION}.${UBOOT_SUFFIX} ${D}/boot/${UBOOT_BINARY}-${type}
|
||||
ln -sf ${UBOOT_BINARYNAME}-${type}-${UBOOT_VERSION}.${UBOOT_SUFFIX} ${D}/boot/${UBOOT_BINARY}
|
||||
|
||||
# Install the uboot-initial-env
|
||||
if [ -n "${UBOOT_INITIAL_ENV}" ]; then
|
||||
install -D -m 644 ${B}/${config}/u-boot-initial-env-${type} ${D}/${sysconfdir}/${UBOOT_INITIAL_ENV}-${MACHINE}-${type}-${UBOOT_VERSION}
|
||||
install -D -m 644 ${B}/${builddir}/u-boot-initial-env-${type} ${D}/${sysconfdir}/${UBOOT_INITIAL_ENV}-${MACHINE}-${type}-${UBOOT_VERSION}
|
||||
ln -sf ${UBOOT_INITIAL_ENV}-${MACHINE}-${type}-${UBOOT_VERSION} ${D}/${sysconfdir}/${UBOOT_INITIAL_ENV}-${MACHINE}-${type}
|
||||
ln -sf ${UBOOT_INITIAL_ENV}-${MACHINE}-${type}-${UBOOT_VERSION} ${D}/${sysconfdir}/${UBOOT_INITIAL_ENV}-${type}
|
||||
ln -sf ${UBOOT_INITIAL_ENV}-${MACHINE}-${type}-${UBOOT_VERSION} ${D}/${sysconfdir}/${UBOOT_INITIAL_ENV}
|
||||
|
|
@ -233,7 +239,9 @@ uboot_install_elf_config () {
|
|||
config=$1
|
||||
type=$2
|
||||
|
||||
install -m 644 ${B}/${config}/${UBOOT_ELF} ${D}/boot/u-boot-${type}-${UBOOT_VERSION}.${UBOOT_ELF_SUFFIX}
|
||||
builddir="${config}-${type}"
|
||||
|
||||
install -m 644 ${B}/${builddir}/${UBOOT_ELF} ${D}/boot/u-boot-${type}-${UBOOT_VERSION}.${UBOOT_ELF_SUFFIX}
|
||||
ln -sf u-boot-${type}-${UBOOT_VERSION}.${UBOOT_ELF_SUFFIX} ${D}/boot/${UBOOT_BINARY}-${type}
|
||||
ln -sf u-boot-${type}-${UBOOT_VERSION}.${UBOOT_ELF_SUFFIX} ${D}/boot/${UBOOT_BINARY}
|
||||
}
|
||||
|
|
@ -247,7 +255,9 @@ uboot_install_spl_config () {
|
|||
config=$1
|
||||
type=$2
|
||||
|
||||
install -m 644 ${B}/${config}/${SPL_BINARY} ${D}/boot/${SPL_BINARYNAME}-${type}-${UBOOT_VERSION}${SPL_DELIMITER}${SPL_SUFFIX}
|
||||
builddir="${config}-${type}"
|
||||
|
||||
install -m 644 ${B}/${builddir}/${SPL_BINARY} ${D}/boot/${SPL_BINARYNAME}-${type}-${UBOOT_VERSION}${SPL_DELIMITER}${SPL_SUFFIX}
|
||||
ln -sf ${SPL_BINARYNAME}-${type}-${UBOOT_VERSION}${SPL_DELIMITER}${SPL_SUFFIX} ${D}/boot/${SPL_BINARYFILE}-${type}
|
||||
ln -sf ${SPL_BINARYNAME}-${type}-${UBOOT_VERSION}${SPL_DELIMITER}${SPL_SUFFIX} ${D}/boot/${SPL_BINARYFILE}
|
||||
}
|
||||
|
|
@ -366,7 +376,9 @@ uboot_deploy_config () {
|
|||
config=$1
|
||||
type=$2
|
||||
|
||||
install -D -m 644 ${B}/${config}/${UBOOT_BINARYNAME}-${type}.${UBOOT_SUFFIX} ${DEPLOYDIR}/${UBOOT_BINARYNAME}-${type}-${UBOOT_VERSION}.${UBOOT_SUFFIX}
|
||||
builddir="${config}-${type}"
|
||||
|
||||
install -D -m 644 ${B}/${builddir}/${UBOOT_BINARYNAME}-${type}.${UBOOT_SUFFIX} ${DEPLOYDIR}/${UBOOT_BINARYNAME}-${type}-${UBOOT_VERSION}.${UBOOT_SUFFIX}
|
||||
cd ${DEPLOYDIR}
|
||||
ln -sf ${UBOOT_BINARYNAME}-${type}-${UBOOT_VERSION}.${UBOOT_SUFFIX} ${UBOOT_SYMLINK}-${type}
|
||||
ln -sf ${UBOOT_BINARYNAME}-${type}-${UBOOT_VERSION}.${UBOOT_SUFFIX} ${UBOOT_SYMLINK}
|
||||
|
|
@ -375,7 +387,7 @@ uboot_deploy_config () {
|
|||
|
||||
# Deploy the uboot-initial-env
|
||||
if [ -n "${UBOOT_INITIAL_ENV}" ]; then
|
||||
install -D -m 644 ${B}/${config}/u-boot-initial-env-${type} ${DEPLOYDIR}/${UBOOT_INITIAL_ENV}-${MACHINE}-${type}-${UBOOT_VERSION}
|
||||
install -D -m 644 ${B}/${builddir}/u-boot-initial-env-${type} ${DEPLOYDIR}/${UBOOT_INITIAL_ENV}-${MACHINE}-${type}-${UBOOT_VERSION}
|
||||
cd ${DEPLOYDIR}
|
||||
ln -sf ${UBOOT_INITIAL_ENV}-${MACHINE}-${type}-${UBOOT_VERSION} ${UBOOT_INITIAL_ENV}-${MACHINE}-${type}
|
||||
ln -sf ${UBOOT_INITIAL_ENV}-${MACHINE}-${type}-${UBOOT_VERSION} ${UBOOT_INITIAL_ENV}-${type}
|
||||
|
|
@ -403,7 +415,9 @@ uboot_deploy_elf_config () {
|
|||
config=$1
|
||||
type=$2
|
||||
|
||||
install -m 644 ${B}/${config}/${UBOOT_ELF} ${DEPLOYDIR}/u-boot-${type}-${UBOOT_VERSION}.${UBOOT_ELF_SUFFIX}
|
||||
builddir="${config}-${type}"
|
||||
|
||||
install -m 644 ${B}/${builddir}/${UBOOT_ELF} ${DEPLOYDIR}/u-boot-${type}-${UBOOT_VERSION}.${UBOOT_ELF_SUFFIX}
|
||||
ln -sf u-boot-${type}-${UBOOT_VERSION}.${UBOOT_ELF_SUFFIX} ${DEPLOYDIR}/${UBOOT_ELF_BINARY}-${type}
|
||||
ln -sf u-boot-${type}-${UBOOT_VERSION}.${UBOOT_ELF_SUFFIX} ${DEPLOYDIR}/${UBOOT_ELF_BINARY}
|
||||
ln -sf u-boot-${type}-${UBOOT_VERSION}.${UBOOT_ELF_SUFFIX} ${DEPLOYDIR}/${UBOOT_ELF_SYMLINK}-${type}
|
||||
|
|
@ -420,7 +434,9 @@ uboot_deploy_spl_config () {
|
|||
config=$1
|
||||
type=$2
|
||||
|
||||
install -m 644 ${B}/${config}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_BINARYNAME}-${type}-${UBOOT_VERSION}${SPL_DELIMITER}${SPL_SUFFIX}
|
||||
builddir="${config}-${type}"
|
||||
|
||||
install -m 644 ${B}/${builddir}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_BINARYNAME}-${type}-${UBOOT_VERSION}${SPL_DELIMITER}${SPL_SUFFIX}
|
||||
rm -f ${DEPLOYDIR}/${SPL_BINARYFILE} ${DEPLOYDIR}/${SPL_SYMLINK}
|
||||
ln -sf ${SPL_BINARYNAME}-${type}-${UBOOT_VERSION}${SPL_DELIMITER}${SPL_SUFFIX} ${DEPLOYDIR}/${SPL_BINARYFILE}-${type}
|
||||
ln -sf ${SPL_BINARYNAME}-${type}-${UBOOT_VERSION}${SPL_DELIMITER}${SPL_SUFFIX} ${DEPLOYDIR}/${SPL_BINARYFILE}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user