summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2024-11-03 02:41:41 +0000
committerLeah Rowe <leah@libreboot.org>2024-11-03 09:22:52 +0000
commitc0017c73578a91c4a40bf033f641ce293cd3df2e (patch)
tree3164beae133e7ad3375c614107d60b642258f272 /script
parent14b4838d49556eb544c0f6a96d72128c3480ec2c (diff)
Experimental U-Boot payload (32-bit dtb, U-Boot)
NOTE: Support added for xarch target x86_64-elf, but U-Boot failed to build with this error: OBJCOPY lib/efi_loader/helloworld.efi x86_64-elf-objcopy: lib/efi_loader/helloworld_efi.so: invalid bfd target make[2]: *** [scripts/Makefile.lib:476: lib/efi_loader/helloworld.efi] Error 1 Since I'm building U-Boot for x86_64 *on* an x86-64 host, and since that is currently the recommended type of machine to use for lbmk development, and since the other x86 payloads currently don't cross compile anyway, this is an acceptable compromise for now. This is because at present, I'm not making U-Boot the primary payload on x86, instead preferring to chain it from GRUB and SeaBIOS. The target.cfg file for x86 u-boot shows xarch/xtree commented. Uncomment these to compile on crossgcc instead of hostcc. I mention 64-bit because I initially did this first, but decided to do 32-bit first. I'll work on the 64-bit one next (SPL). It's only enabled in QEMU for now. Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'script')
-rwxr-xr-xscript/trees8
1 files changed, 5 insertions, 3 deletions
diff --git a/script/trees b/script/trees
index 5be43dcc..726f7332 100755
--- a/script/trees
+++ b/script/trees
@@ -199,10 +199,12 @@ check_cross_compiler()
export CROSS_COMPILE="${xarch% *}-"
[ -n "$xlang" ] && export BUILD_LANGUAGES="$xlang"
+ xfix="${_xarch%-*}" && [ "$xfix" = "x86_64" ] && xfix="x64"
+
# sometimes buildgcc fails for like no reason. try twice.
- make -C "$cbdir" crossgcc-${_xarch%-*} $xgccargs || \
- make -C "$cbdir" crossgcc-${_xarch%-*} $xgccargs || \
- $err "!mkxgcc $project/$xtree '${_xarch%-*}' '$xgccargs'"
+ make -C "$cbdir" crossgcc-$xfix $xgccargs || \
+ make -C "$cbdir" crossgcc-$xfix $xgccargs || \
+ $err "!mkxgcc $project/$xtree '$xfix' '$xgccargs'"
done; return 0
}