Skip to content

Commit 3b252ba

Browse files
bia1708nunojsa
authored andcommitted
ci: run-build.sh: Add Microblaze builds
Add Microblaze build method: - Download and setup standalone compiler - Check for HDL project tags in DTBs (but do not fail the job if they don't exist, just print a red warning) - Build Microblaze simpleImages using the ADI defconfig Signed-off-by: bia1708 <bianca-maria.popu@analog.com>
1 parent bb14ea9 commit 3b252ba

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

ci/travis/run-build.sh

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,61 @@ build_dt_binding_check() {
388388
return $err
389389
}
390390

391+
build_microblaze() {
392+
local exceptions_file="ci/travis/dtb_build_test_exceptions"
393+
local err=0
394+
395+
# Setup standalone compiler
396+
wget -q --show-progress "${DOWNLOAD_URL}/microblaze_compiler/microblazeel-xilinx-elf.tar.gz"
397+
mkdir -p /opt/microblazeel-xilinx-elf
398+
tar -xvzf microblazeel-xilinx-elf.tar.gz -C /opt/microblazeel-xilinx-elf
399+
export PATH=$PATH:/opt/microblazeel-xilinx-elf/bin
400+
sudo apt install u-boot-tools
401+
microblazeel-xilinx-elf-gcc --version
402+
403+
for file in $DTS_FILES; do
404+
if __exceptions_file "$exceptions_file" "$file"; then
405+
continue
406+
fi
407+
408+
if ! grep -q "hdl_project:" $file ; then
409+
__echo_red "'$file' doesn't contain an 'hdl_project:' tag"
410+
hdl_project_tag_err=1
411+
fi
412+
done
413+
414+
if [ "$hdl_project_tag_err" = "1" ] ; then
415+
echo
416+
echo
417+
__echo_green "Some DTs have been found that do not contain an 'hdl_project:' tag"
418+
__echo_green " Either:"
419+
__echo_green " 1. Create a 'hdl_project' tag for it"
420+
__echo_green " OR"
421+
__echo_green " 1. add it in file '$exceptions_file'"
422+
fi
423+
424+
export CROSS_COMPILE=/opt/microblazeel-xilinx-elf/bin/microblazeel-xilinx-elf-
425+
ARCH=microblaze make adi_mb_defconfig
426+
for file in $DTS_FILES; do
427+
if __exceptions_file "$exceptions_file" "$file"; then
428+
continue
429+
fi
430+
431+
dtb_file="simpleImage."
432+
dtb_file+=$(echo $file | sed 's/dts\//=/g' | cut -d'=' -f2 | sed 's\.dts\\g')
433+
434+
echo "######### Building: $dtb_file"
435+
ARCH=microblaze make ${dtb_file} -j$NUM_JOBS || err=1
436+
done
437+
438+
if [ "$err" = "0" ] ; then
439+
__echo_green "Microblaze build tests passed"
440+
return 0
441+
fi
442+
443+
return $err
444+
}
445+
391446
build_dtb_build_test() {
392447
local exceptions_file="ci/travis/dtb_build_test_exceptions"
393448
local err=0

0 commit comments

Comments
 (0)