Fork of the vendor (Boundary Devices) u-boot for Reform 2, with minor tweaks. The goal is to migrate to mainstream u-boot or barebox ASAP. The main impediment so far is the 4GB RAM config.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

384 lines
12KB

  1. # SPDX-License-Identifier: GPL-2.0+
  2. # Copyright Roger Meier <r.meier@siemens.com>
  3. # build U-Boot on Travis CI - https://travis-ci.org/
  4. sudo: required
  5. dist: trusty
  6. language: c
  7. addons:
  8. apt:
  9. packages:
  10. - cppcheck
  11. - sloccount
  12. - sparse
  13. - bc
  14. - build-essential
  15. - libsdl1.2-dev
  16. - python
  17. - python-virtualenv
  18. - swig
  19. - libpython-dev
  20. - iasl
  21. - grub-efi-ia32-bin
  22. - rpm2cpio
  23. - wget
  24. - device-tree-compiler
  25. - lzop
  26. before_install:
  27. - sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
  28. - sudo apt-get update -q
  29. - sudo apt-get install libisl15 -y
  30. install:
  31. # Clone uboot-test-hooks
  32. - git clone --depth=1 git://github.com/swarren/uboot-test-hooks.git /tmp/uboot-test-hooks
  33. - ln -s travis-ci /tmp/uboot-test-hooks/bin/`hostname`
  34. - ln -s travis-ci /tmp/uboot-test-hooks/py/`hostname`
  35. # prepare buildman environment
  36. - echo -e "[toolchain]\nroot = /usr" > ~/.buildman
  37. - echo -e "arc = /tmp/arc_gnu_2017.09_prebuilt_uclibc_le_archs_linux_install" >> ~/.buildman
  38. - echo -e "\n[toolchain-alias]\nsh = sh2\n" >> ~/.buildman
  39. - cat ~/.buildman
  40. - virtualenv /tmp/venv
  41. - . /tmp/venv/bin/activate
  42. - pip install pytest
  43. - grub-mkimage -o ~/grub_x86.efi -O i386-efi normal echo lsefimmap lsefi lsefisystab efinet tftp minicmd
  44. - mkdir ~/grub2-arm
  45. - ( 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 )
  46. - mkdir ~/grub2-arm64
  47. - ( 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 )
  48. env:
  49. global:
  50. - PATH=/tmp/qemu-install/bin:/tmp/uboot-test-hooks/bin:/usr/bin:/bin
  51. - PYTHONPATH=/tmp/uboot-test-hooks/py/travis-ci
  52. - BUILD_DIR=build
  53. - HOSTCC="cc"
  54. - HOSTCXX="c++"
  55. before_script:
  56. # install toolchains based on TOOLCHAIN} variable
  57. - if [[ "${TOOLCHAIN}" == *m68k* ]]; then ./tools/buildman/buildman --fetch-arch m68k ; fi
  58. - if [[ "${TOOLCHAIN}" == *microblaze* ]]; then ./tools/buildman/buildman --fetch-arch microblaze ; fi
  59. - if [[ "${TOOLCHAIN}" == *mips* ]]; then ./tools/buildman/buildman --fetch-arch mips ; fi
  60. - if [[ "${TOOLCHAIN}" == *or32* ]]; then ./tools/buildman/buildman --fetch-arch or32 ; fi
  61. - if [[ "${TOOLCHAIN}" == *sh* ]]; then ./tools/buildman/buildman --fetch-arch sh2 ; fi
  62. - if [[ "${TOOLCHAIN}" == *x86_64* ]]; then
  63. ./tools/buildman/buildman --fetch-arch x86_64;
  64. echo -e "\n[toolchain-prefix]\nx86 = ${HOME}/.buildman-toolchains/gcc-7.3.0-nolibc/x86_64-linux/bin/x86_64-linux-" >> ~/.buildman;
  65. fi
  66. - if [[ "${TOOLCHAIN}" == arc ]]; then
  67. wget https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases/download/arc-2017.09-release/arc_gnu_2017.09_prebuilt_uclibc_le_archs_linux_install.tar.gz &&
  68. tar -C /tmp -xf arc_gnu_2017.09_prebuilt_uclibc_le_archs_linux_install.tar.gz;
  69. fi
  70. - if [[ "${TOOLCHAIN}" == *xtensa* ]]; then
  71. wget https://github.com/foss-xtensa/toolchain/releases/download/2018.02/x86_64-2018.02-${TOOLCHAIN}.tar.gz &&
  72. tar -C /tmp -xf x86_64-2018.02-${TOOLCHAIN}.tar.gz &&
  73. echo -e "\n[toolchain-prefix]\nxtensa = /tmp/2018.02/${TOOLCHAIN}/bin/${TOOLCHAIN}-" >> ~/.buildman;
  74. fi
  75. # If TOOLCHAIN is unset, we're on some flavour of ARM.
  76. - if [[ "${TOOLCHAIN}" == "" ]]; then
  77. ./tools/buildman/buildman --fetch-arch arm &&
  78. ./tools/buildman/buildman --fetch-arch aarch64;
  79. fi
  80. - if [[ "${TOOLCHAIN}" == "powerpc" ]]; then ./tools/buildman/buildman --fetch-arch powerpc; fi
  81. - if [[ "${TOOLCHAIN}" == "riscv" ]]; then
  82. wget https://github.com/andestech/prebuilt/releases/download/20180530/riscv64-unknown-linux-gnu.tar.gz &&
  83. tar -C /tmp -xf riscv64-unknown-linux-gnu.tar.gz &&
  84. echo -e "\n[toolchain-prefix]\nriscv = /tmp/riscv64-unknown-linux-gnu/bin/riscv64-unknown-linux-gnu-" >> ~/.buildman;
  85. fi
  86. - if [[ "${QEMU_TARGET}" != "" ]]; then
  87. git clone git://git.qemu.org/qemu.git /tmp/qemu;
  88. pushd /tmp/qemu;
  89. git submodule update --init dtc &&
  90. git checkout v2.8.0-rc3 &&
  91. ./configure --prefix=/tmp/qemu-install --target-list=${QEMU_TARGET} &&
  92. make -j4 all install;
  93. popd;
  94. fi
  95. script:
  96. # Comments must be outside the command strings below, or the Travis parser
  97. # will get confused.
  98. #
  99. # Exit code 129 means warnings only.
  100. - if [[ "${BUILDMAN}" != "" ]]; then
  101. ret=0;
  102. tools/buildman/buildman -P -E ${BUILDMAN} || ret=$?;
  103. if [[ $ret -ne 0 && $ret -ne 129 ]]; then
  104. tools/buildman/buildman -sdeP ${BUILDMAN};
  105. exit $ret;
  106. fi;
  107. fi
  108. # "not a_test_which_does_not_exist" is a dummy -k parameter which will
  109. # never prevent any test from running. That way, we can always pass
  110. # "-k something" even when $TEST_PY_TEST_SPEC doesnt need a custom
  111. # value.
  112. - export UBOOT_TRAVIS_BUILD_DIR=`cd .. && pwd`/.bm-work/${TEST_PY_BD};
  113. cp ~/grub_x86.efi $UBOOT_TRAVIS_BUILD_DIR/;
  114. cp ~/grub2-arm/usr/lib/grub2/arm-efi/grub.efi $UBOOT_TRAVIS_BUILD_DIR/grub_arm.efi;
  115. cp ~/grub2-arm64/usr/lib/grub2/arm64-efi/grub.efi $UBOOT_TRAVIS_BUILD_DIR/grub_arm64.efi;
  116. if [[ "${TEST_PY_BD}" != "" ]]; then
  117. ./test/py/test.py --bd ${TEST_PY_BD} ${TEST_PY_ID}
  118. -k "${TEST_PY_TEST_SPEC:-not a_test_which_does_not_exist}"
  119. --build-dir "$UBOOT_TRAVIS_BUILD_DIR";
  120. ret=$?;
  121. if [[ $ret -ne 0 ]]; then
  122. exit $ret;
  123. fi;
  124. fi;
  125. if [[ -n "${TEST_PY_TOOLS}" ]]; then
  126. PYTHONPATH="${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc/pylibfdt"
  127. PATH="${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc:${PATH}"
  128. ./tools/binman/binman -t &&
  129. ./tools/patman/patman --test &&
  130. ./tools/buildman/buildman -t &&
  131. PYTHONPATH="${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc/pylibfdt"
  132. PATH="${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc:${PATH}"
  133. ./tools/dtoc/dtoc -t;
  134. fi
  135. matrix:
  136. include:
  137. # we need to build by vendor due to 50min time limit for builds
  138. # each env setting here is a dedicated build
  139. - env:
  140. - BUILDMAN="arc"
  141. TOOLCHAIN="arc"
  142. - env:
  143. - BUILDMAN="arm11 arm7 arm920t arm946es"
  144. - env:
  145. - JOB="arm926ejs"
  146. BUILDMAN="arm926ejs -x mx,siemens,atmel"
  147. - env:
  148. - BUILDMAN="atmel"
  149. - env:
  150. BUILDMAN="boundary engicam toradex"
  151. - env:
  152. - JOB="Freescale ARM32"
  153. BUILDMAN="freescale -x powerpc,m68k,aarch64"
  154. - env:
  155. - JOB="Freescale AArch64"
  156. BUILDMAN="freescale&aarch64"
  157. - env:
  158. - JOB="i.MX6 (non-Freescale)"
  159. BUILDMAN="mx6 -x freescale,toradex,boundary,engicam"
  160. - env:
  161. - JOB="i.MX (non-Freescale, non-i.MX6)"
  162. BUILDMAN="mx -x freescale,mx6,toradex"
  163. - env:
  164. - BUILDMAN="k2"
  165. - env:
  166. - BUILDMAN="samsung socfpga"
  167. - env:
  168. - BUILDMAN="sun4i"
  169. - env:
  170. - BUILDMAN="sun5i"
  171. - env:
  172. - BUILDMAN="sun6i"
  173. - env:
  174. - BUILDMAN="sun7i"
  175. - env:
  176. - BUILDMAN="sun8i"
  177. - env:
  178. - BUILDMAN="sun9i"
  179. - env:
  180. - BUILDMAN="sun50i"
  181. - env:
  182. - JOB="Catch-all ARM"
  183. BUILDMAN="arm -x arm11,arm7,arm9,aarch64,atmel,freescale,kirkwood,mvebu,siemens,tegra,uniphier,mx,samsung,sunxi,am33xx,omap,pxa,rockchip,toradex,socfpga,k2,xilinx"
  184. - env:
  185. - BUILDMAN="sandbox x86"
  186. TOOLCHAIN="x86_64"
  187. - env:
  188. - BUILDMAN="kirkwood"
  189. - env:
  190. - BUILDMAN="mvebu"
  191. - env:
  192. - JOB="PXA"
  193. - BUILDMAN="pxa -x toradex"
  194. - env:
  195. - BUILDMAN="m68k"
  196. TOOLCHAIN="m68k"
  197. - env:
  198. - BUILDMAN="microblaze"
  199. TOOLCHAIN="microblaze"
  200. - env:
  201. - BUILDMAN="mips"
  202. TOOLCHAIN="mips"
  203. - env:
  204. - JOB="Non-Freescale PowerPC"
  205. BUILDMAN="powerpc -x freescale"
  206. TOOLCHAIN="powerpc"
  207. - env:
  208. - BUILDMAN="mpc85xx&freescale -x t208xrdb -x t4qds -x t102* -x p1_p2_rdb_pc -x p1010rdb -x corenet_ds -x b4860qds -x bsc91*"
  209. TOOLCHAIN="powerpc"
  210. - env:
  211. - BUILDMAN="t208xrdb corenet_ds"
  212. TOOLCHAIN="powerpc"
  213. - env:
  214. - BUILDMAN="t4qds b4860qds mpc83xx&freescale mpc86xx&freescale"
  215. TOOLCHAIN="powerpc"
  216. - env:
  217. - BUILDMAN="t102*"
  218. TOOLCHAIN="powerpc"
  219. - env:
  220. - BUILDMAN="p1_p2_rdb_pc"
  221. TOOLCHAIN="powerpc"
  222. - env:
  223. - BUILDMAN="p1010rdb bsc91"
  224. TOOLCHAIN="powerpc"
  225. - env:
  226. - BUILDMAN="siemens"
  227. - env:
  228. - JOB="tegra"
  229. BUILDMAN="tegra -x toradex"
  230. - env:
  231. - JOB="am33xx"
  232. BUILDMAN="am33xx -x siemens"
  233. - env:
  234. - BUILDMAN="omap"
  235. - env:
  236. - BUILDMAN="uniphier"
  237. - env:
  238. - JOB="Catch-all AArch64"
  239. BUILDMAN="aarch64 -x tegra,freescale,mvebu,uniphier,sunxi,samsung,rockchip,xilinx"
  240. - env:
  241. - BUILDMAN="rockchip"
  242. - env:
  243. - JOB="sh"
  244. BUILDMAN="sh -x arm"
  245. TOOLCHAIN="sh"
  246. - env:
  247. - JOB="Xilinx (ARM)"
  248. BUILDMAN="xilinx -x microblaze"
  249. - env:
  250. - BUILDMAN="xtensa"
  251. TOOLCHAIN="xtensa-dc233c-elf"
  252. - env:
  253. - BUILDMAN="riscv"
  254. TOOLCHAIN="riscv"
  255. # QA jobs for code analytics
  256. # static code analysis with cppcheck (we can add --enable=all later)
  257. - env:
  258. - JOB="cppcheck"
  259. script:
  260. - cppcheck --force --quiet --inline-suppr .
  261. # search for TODO within source tree
  262. - env:
  263. - JOB="grep TODO"
  264. script:
  265. - grep -r TODO .
  266. # search for FIXME within source tree
  267. - env:
  268. - JOB="grep FIXME HACK"
  269. script:
  270. - grep -r FIXME .
  271. # search for HACK within source tree and ignore HACKKIT board
  272. script:
  273. - grep -r HACK . | grep -v HACKKIT
  274. # some statistics about the code base
  275. - env:
  276. - JOB="sloccount"
  277. script:
  278. - sloccount .
  279. # test/py
  280. - env:
  281. - TEST_PY_BD="sandbox"
  282. BUILDMAN="^sandbox$"
  283. TOOLCHAIN="x86_64"
  284. - env:
  285. - TEST_PY_BD="sandbox_spl"
  286. TEST_PY_TEST_SPEC="test_ofplatdata"
  287. BUILDMAN="^sandbox$"
  288. TOOLCHAIN="x86_64"
  289. TEST_PY_TOOLS="yes"
  290. - env:
  291. - TEST_PY_BD="sandbox_flattree"
  292. BUILDMAN="^sandbox_flattree$"
  293. TOOLCHAIN="x86_64"
  294. - env:
  295. - TEST_PY_BD="vexpress_ca15_tc2"
  296. TEST_PY_ID="--id qemu"
  297. QEMU_TARGET="arm-softmmu"
  298. BUILDMAN="^vexpress_ca15_tc2$"
  299. - env:
  300. - TEST_PY_BD="vexpress_ca9x4"
  301. TEST_PY_ID="--id qemu"
  302. QEMU_TARGET="arm-softmmu"
  303. BUILDMAN="^vexpress_ca9x4$"
  304. - env:
  305. - TEST_PY_BD="integratorcp_cm926ejs"
  306. TEST_PY_TEST_SPEC="not sleep"
  307. TEST_PY_ID="--id qemu"
  308. QEMU_TARGET="arm-softmmu"
  309. BUILDMAN="^integratorcp_cm926ejs$"
  310. - env:
  311. - TEST_PY_BD="qemu_arm"
  312. TEST_PY_TEST_SPEC="not sleep"
  313. QEMU_TARGET="arm-softmmu"
  314. BUILDMAN="^qemu_arm$"
  315. - env:
  316. - TEST_PY_BD="qemu_arm64"
  317. TEST_PY_TEST_SPEC="not sleep"
  318. QEMU_TARGET="aarch64-softmmu"
  319. BUILDMAN="^qemu_arm64$"
  320. - env:
  321. - TEST_PY_BD="qemu_mips"
  322. TEST_PY_TEST_SPEC="not sleep"
  323. QEMU_TARGET="mips-softmmu"
  324. BUILDMAN="^qemu_mips$"
  325. TOOLCHAIN="mips"
  326. - env:
  327. - TEST_PY_BD="qemu_mipsel"
  328. TEST_PY_TEST_SPEC="not sleep"
  329. QEMU_TARGET="mipsel-softmmu"
  330. BUILDMAN="^qemu_mipsel$"
  331. TOOLCHAIN="mips"
  332. - env:
  333. - TEST_PY_BD="qemu_mips64"
  334. TEST_PY_TEST_SPEC="not sleep"
  335. QEMU_TARGET="mips64-softmmu"
  336. BUILDMAN="^qemu_mips64$"
  337. TOOLCHAIN="mips"
  338. - env:
  339. - TEST_PY_BD="qemu_mips64el"
  340. TEST_PY_TEST_SPEC="not sleep"
  341. QEMU_TARGET="mips64el-softmmu"
  342. BUILDMAN="^qemu_mips64el$"
  343. TOOLCHAIN="mips"
  344. - env:
  345. - TEST_PY_BD="qemu-ppce500"
  346. TEST_PY_TEST_SPEC="not sleep"
  347. QEMU_TARGET="ppc-softmmu"
  348. BUILDMAN="^qemu-ppce500$"
  349. TOOLCHAIN="powerpc"
  350. - env:
  351. - TEST_PY_BD="qemu-x86"
  352. TEST_PY_TEST_SPEC="not sleep"
  353. QEMU_TARGET="i386-softmmu"
  354. BUILDMAN="^qemu-x86$"
  355. TOOLCHAIN="x86_64"
  356. BUILD_ROM="yes"
  357. - env:
  358. - TEST_PY_BD="zynq_zc702"
  359. TEST_PY_TEST_SPEC="not sleep"
  360. QEMU_TARGET="arm-softmmu"
  361. TEST_PY_ID="--id qemu"
  362. BUILDMAN="^zynq_zc702$"
  363. - env:
  364. - TEST_PY_BD="xtfpga"
  365. TEST_PY_TEST_SPEC="not sleep"
  366. QEMU_TARGET="xtensa-softmmu"
  367. TEST_PY_ID="--id qemu"
  368. BUILDMAN="^xtfpga$"
  369. TOOLCHAIN="xtensa-dc233c-elf"
  370. # TODO make it perfect ;-r