# build U-Boot on Travis CI - https://travis-ci.org/
sudo: required
-dist: trusty
+dist: bionic
language: c
apt:
sources:
- ubuntu-toolchain-r-test
- - llvm-toolchain-trusty-7
+ - llvm-toolchain-bionic-7
packages:
- cppcheck
- sloccount
- sparse
- bc
- build-essential
- - libsdl1.2-dev
+ - libsdl2-dev
- python
- - python-virtualenv
+ - python-pyelftools
+ - python3-sphinx
+ - python3-virtualenv
+ - python3-pip
- swig
- libpython-dev
- iasl
- device-tree-compiler
- lzop
- liblz4-tool
+ - lzma-alone
- libisl15
- clang-7
- srecord
+ - graphviz
install:
# Clone uboot-test-hooks
# prepare buildman environment
- echo -e "[toolchain]\nroot = /usr" > ~/.buildman
- echo -e "arc = /tmp/arc_gnu_2018.09_prebuilt_uclibc_le_archs_linux_install" >> ~/.buildman
- - echo -e "\n[toolchain-alias]\nsh = sh2\n" >> ~/.buildman
+ - echo -e "\n[toolchain-alias]\nsh = sh2" >> ~/.buildman
+ - echo -e "x86 = i386" >> ~/.buildman;
+ - echo -e "riscv = riscv64" >> ~/.buildman;
- cat ~/.buildman
- - virtualenv /tmp/venv
- - . /tmp/venv/bin/activate
- - pip install pytest==2.8.7
- - pip install python-subunit
- - grub-mkimage -o ~/grub_x86.efi -O i386-efi normal echo lsefimmap lsefi lsefisystab efinet tftp minicmd
- - grub-mkimage -o ~/grub_x64.efi -O x86_64-efi normal echo lsefimmap lsefi lsefisystab efinet tftp minicmd
+ - grub-mkimage --prefix="" -o ~/grub_x86.efi -O i386-efi normal echo lsefimmap lsefi lsefisystab efinet tftp minicmd
+ - grub-mkimage --prefix="" -o ~/grub_x64.efi -O x86_64-efi normal echo lsefimmap lsefi lsefisystab efinet tftp minicmd
- mkdir ~/grub2-arm
- ( cd ~/grub2-arm; wget -O - http://download.opensuse.org/ports/armv7hl/distribution/leap/42.2/repo/oss/suse/armv7hl/grub2-arm-efi-2.02~beta2-87.1.armv7hl.rpm | rpm2cpio | cpio -di )
- mkdir ~/grub2-arm64
- ( cd ~/grub2-arm64; wget -O - http://download.opensuse.org/ports/aarch64/distribution/leap/42.2/repo/oss/suse/aarch64/grub2-arm64-efi-2.02~beta2-87.1.aarch64.rpm | rpm2cpio | cpio -di )
+ - wget http://mirrors.kernel.org/ubuntu/pool/main/m/mpfr4/libmpfr4_3.1.4-1_amd64.deb && sudo dpkg -i libmpfr4_3.1.4-1_amd64.deb && rm libmpfr4_3.1.4-1_amd64.deb
env:
global:
- - PATH=/tmp/qemu-install/bin:/tmp/uboot-test-hooks/bin:/usr/bin:/bin
+ - PATH=/tmp/qemu-install/bin:/tmp/uboot-test-hooks/bin:/usr/bin:/bin:/usr/local/bin
- PYTHONPATH=/tmp/uboot-test-hooks/py/travis-ci
- BUILD_DIR=build
- HOSTCC="cc"
- HOSTCXX="c++"
- - QEMU_VERSION="v3.1.0"
+ - QEMU_VERSION="v4.2.0"
before_script:
# install toolchains based on TOOLCHAIN} variable
- if [[ "${TOOLCHAIN}" == *sh* ]]; then ./tools/buildman/buildman --fetch-arch sh2 ; fi
- if [[ "${TOOLCHAIN}" == *i386* ]]; then
./tools/buildman/buildman --fetch-arch i386;
- echo -e "\n[toolchain-alias]\nx86 = i386" >> ~/.buildman;
fi
- if [[ "${TOOLCHAIN}" == arc ]]; then
wget https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases/download/arc-2018.09-release/arc_gnu_2018.09_prebuilt_uclibc_le_archs_linux_install.tar.gz &&
- if [[ "${TOOLCHAIN}" == "powerpc" ]]; then ./tools/buildman/buildman --fetch-arch powerpc; fi
- if [[ "${TOOLCHAIN}" == "riscv" ]]; then
./tools/buildman/buildman --fetch-arch riscv64;
- echo -e "\n[toolchain-alias]\nriscv = riscv64" >> ~/.buildman;
fi
- if [[ "${QEMU_TARGET}" != "" ]]; then
git clone git://git.qemu.org/qemu.git /tmp/qemu;
cp ~/grub2-arm/usr/lib/grub2/arm-efi/grub.efi $UBOOT_TRAVIS_BUILD_DIR/grub_arm.efi;
cp ~/grub2-arm64/usr/lib/grub2/arm64-efi/grub.efi $UBOOT_TRAVIS_BUILD_DIR/grub_arm64.efi;
if [[ "${TEST_PY_BD}" != "" ]]; then
+ virtualenv -p /usr/bin/python3 /tmp/venv;
+ . /tmp/venv/bin/activate;
+ pip install -r test/py/requirements.txt;
./test/py/test.py --bd ${TEST_PY_BD} ${TEST_PY_ID}
-k "${TEST_PY_TEST_SPEC:-not a_test_which_does_not_exist}"
--build-dir "$UBOOT_TRAVIS_BUILD_DIR";
if [[ $ret -ne 0 ]]; then
exit $ret;
fi;
- fi;
- if [[ -n "${TEST_PY_TOOLS}" ]]; then
- PYTHONPATH="${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc/pylibfdt"
- PATH="${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc:${PATH}"
- ./tools/binman/binman -t &&
- ./tools/patman/patman --test &&
- ./tools/buildman/buildman -t &&
- PYTHONPATH="${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc/pylibfdt"
- PATH="${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc:${PATH}"
- ./tools/dtoc/dtoc -t;
+ if [[ -n "${TEST_PY_TOOLS}" ]]; then
+ export PYTHONPATH="${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc/pylibfdt";
+ export PATH="${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc:${PATH}";
+ ./tools/binman/binman --toolpath ${UBOOT_TRAVIS_BUILD_DIR}/tools test &&
+ ./tools/patman/patman --test &&
+ ./tools/buildman/buildman -t &&
+ ./tools/dtoc/dtoc -t;
+ fi;
fi
matrix:
- name: "buildman boundary engicam toradex"
env:
- BUILDMAN="boundary engicam toradex"
- - name: "buildman NXP ARM32"
+ - name: "buildman ARM bcm"
+ env:
+ - BUILDMAN="bcm -x mips"
+ - name: "buildman NXP ARM32 (catch-all)"
+ env:
+ - BUILDMAN="freescale -x powerpc,m68k,aarch64,ls101,ls102,ls104,ls108,ls20,lx216"
+ - name: "buildman NXP LS101x"
+ env:
+ - BUILDMAN="freescale&ls101"
+ - name: "buildman NXP LS102x"
+ env:
+ - BUILDMAN="freescale&ls102"
+ - name: "buildman NXP LS104x"
env:
- - BUILDMAN="freescale -x powerpc,m68k,aarch64"
- - name: "buildman NXP AArch64 LS101x"
+ - BUILDMAN="freescale&ls104"
+ - name: "buildman NXP LS108x"
env:
- - BUILDMAN="freescale&aarch64&ls101"
- - name: "buildman NXP AArch64 LS104x"
+ - BUILDMAN="freescale&ls108"
+ - name: "buildman NXP LS20xx"
env:
- - BUILDMAN="freescale&aarch64&ls104"
- - name: "buildman NXP AArch64 LS108x"
+ - BUILDMAN="freescale&ls20"
+ - name: "buildman NXP LX216x"
env:
- - BUILDMAN="freescale&aarch64&ls108"
- - name: "buildman NXP AArch64 LS20xx"
+ - BUILDMAN="freescale&lx216"
+ - name: "buildman i.MX6 tqc"
env:
- - BUILDMAN="freescale&aarch64&&ls20"
- - name: "buildman i.MX6 (non-NXP)"
+ - BUILDMAN="mx6&tqc"
+ - name: "buildman i.MX6 (catch-all)"
env:
- - BUILDMAN="mx6 -x freescale,toradex,boundary,engicam"
- - name: "buildman i.MX (non-NXP,i.MX6,toradex)"
+ - BUILDMAN="mx6 -x boundary,engicam,freescale,technexion,toradex,tqc"
+ - name: "buildman i.MX (non-i.MX6 catch-all)"
env:
- - BUILDMAN="mx -x freescale,mx6,toradex"
- - name: "buildman k2"
+ - BUILDMAN="mx -x freescale,mx6,toradex,technexion"
+ - name: "buildman keystone 2/3"
env:
- - BUILDMAN="k2"
+ - BUILDMAN="k2 k3"
- name: "buildman samsung socfpga"
env:
- BUILDMAN="samsung socfpga"
- name: "buildman sun7i"
env:
- BUILDMAN="sun7i"
- - name: "buildman sun8i"
+ - name: "buildman 64bit sun8i"
env:
- - BUILDMAN="sun8i"
+ - BUILDMAN="sun8i&aarch64 -x orangepi"
+ - name: "buildman 32bit sun8i"
+ env:
+ - BUILDMAN="sun8i&armv7 -x orangepi"
- name: "buildman sun9i"
env:
- BUILDMAN="sun9i"
- name: "buildman sun50i"
env:
- - BUILDMAN="sun50i"
+ - BUILDMAN="sun50i -x orangepi"
- name: "buildman catch-all ARM"
env:
- - BUILDMAN="arm -x arm11,arm7,arm9,aarch64,at91,freescale,kirkwood,mvebu,siemens,tegra,uniphier,mx,samsung,sunxi,am33xx,omap,pxa,rockchip,toradex,socfpga,k2,xilinx"
+ - BUILDMAN="arm -x arm11,arm7,arm9,aarch64,at91,bcm,freescale,kirkwood,mvebu,siemens,tegra,uniphier,mx,samsung,sunxi,am33xx,omap,rk,toradex,socfpga,k2,k3,zynq"
- name: "buildman sandbox x86"
env:
- BUILDMAN="sandbox x86"
TOOLCHAIN="i386"
+ - name: "buildman technexion"
+ env:
+ - BUILDMAN="technexion"
- name: "buildman kirkwood"
env:
- BUILDMAN="kirkwood"
- name: "buildman mvebu"
env:
- BUILDMAN="mvebu"
- - name: "buildman PXA (non-toradex)"
- env:
- - BUILDMAN="pxa -x toradex"
- name: "buildman m68k"
env:
- BUILDMAN="m68k"
- name: "buildman omap"
env:
- BUILDMAN="omap"
+ - name: "buildman orangepi"
+ env:
+ - BUILDMAN="orangepi"
- name: "buildman uniphier"
env:
- BUILDMAN="uniphier"
- name: "buildman catch-all AArch64"
env:
- - BUILDMAN="aarch64 -x tegra,ls1,ls2,mvebu,uniphier,sunxi,samsung,rockchip,xilinx"
+ - BUILDMAN="aarch64 -x bcm,k3,tegra,ls1,ls2,lx216,mvebu,uniphier,sunxi,samsung,socfpga,rk,versal,zynq"
- name: "buildman rockchip"
env:
- - BUILDMAN="rockchip"
+ - BUILDMAN="rk -x orangepi"
- name: "buildman sh"
env:
- BUILDMAN="sh -x arm"
TOOLCHAIN="sh"
- - name: "buildman Xilinx (ARM)"
+ - name: "buildman Zynq* (ARMv7)"
env:
- - BUILDMAN="xilinx -x microblaze"
+ - BUILDMAN="zynq&armv7"
+ - name: "buildman ZynqMP and Versal"
+ env:
+ - BUILDMAN="versal|zynqmp&aarch64"
- name: "buildman xtensa"
env:
- BUILDMAN="xtensa"
- name: "cppcheck"
script:
- cppcheck --force --quiet --inline-suppr .
+ # build HTML documentation
+ - name: "htmldocs"
+ script:
+ - make htmldocs
# search for TODO within source tree
- name: "grep TODO"
script:
- name: "Build tools-only"
script:
- make tools-only_config tools-only -j$(nproc)
+ # Ensure env tools build
+ - name: "Build envtools"
+ script:
+ - make tools-only_config envtools -j$(nproc)
# test/py
- name: "test/py sandbox"
env:
- TEST_PY_BD="sandbox"
BUILDMAN="^sandbox$"
- OVERRIDE="clang-7"
+ OVERRIDE="-O clang-7"
- name: "test/py sandbox_spl"
env:
- TEST_PY_BD="sandbox_spl"
- TEST_PY_BD="sandbox_flattree"
BUILDMAN="^sandbox_flattree$"
TOOLCHAIN="i386"
+ - name: "test/py evb-ast2500"
+ env:
+ - TEST_PY_BD="evb-ast2500"
+ TEST_PY_ID="--id qemu"
+ QEMU_TARGET="arm-softmmu"
+ BUILDMAN="^evb-ast2500$"
- name: "test/py vexpress_ca15_tc2"
env:
- TEST_PY_BD="vexpress_ca15_tc2"
TEST_PY_ID="--id qemu"
QEMU_TARGET="arm-softmmu"
- QEMU_VERSION="v3.0.0"
BUILDMAN="^vexpress_ca15_tc2$"
- name: "test/py vexpress_ca9x4"
env:
QEMU_TARGET="ppc-softmmu"
BUILDMAN="^qemu-ppce500$"
TOOLCHAIN="powerpc"
+ - name: "test/py qemu-riscv64"
+ env:
+ - TEST_PY_BD="qemu-riscv64"
+ TEST_PY_TEST_SPEC="not sleep"
+ QEMU_TARGET="riscv64-softmmu"
+ BUILDMAN="^qemu-riscv64$"
+ TOOLCHAIN="riscv"
- name: "test/py qemu-x86"
env:
- TEST_PY_BD="qemu-x86"