From b5de81a229759d1022e814e6a26c06ee4f893098 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Mon, 10 Oct 2022 19:25:25 -0700 Subject: [PATCH] u-boot-starfive: Build outside source tree u-boot common files set O=.. option for make which actually sets KBUILD_SRC, which triggers a step in u-boot system called prepare3. This step checks if make has been run inside sourcedir and since we are setting O=${B} and B is set to S, it has run inside S during do_configure, so do_compile fails to build e.g. | /mnt/b/yoe/master/build/tmp/work/visionfive-yoe-linux/u-boot-starfive/v2021.04-r0/git is not clean, please run 'make mrproper' | in the '/mnt/b/yoe/master/build/tmp/work/visionfive-yoe-linux/u-boot-starfive/v2021.04-r0/git' directory. Signed-off-by: Khem Raj --- recipes-bsp/u-boot/u-boot-starfive_v2021.04.bb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/recipes-bsp/u-boot/u-boot-starfive_v2021.04.bb b/recipes-bsp/u-boot/u-boot-starfive_v2021.04.bb index b558c34..289d297 100644 --- a/recipes-bsp/u-boot/u-boot-starfive_v2021.04.bb +++ b/recipes-bsp/u-boot/u-boot-starfive_v2021.04.bb @@ -43,3 +43,7 @@ do_deploy:append:visionfive() { COMPATIBLE_MACHINE = "(beaglev-starlight-jh7100|visionfive)" TOOLCHAIN = "gcc" + +# U-boot sets O=... which needs it to build outside of S +B = "${WORKDIR}/build" +