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.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
 
 
 
 
 
 

401 lines
13 KiB

  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. - gcc-powerpc-linux-gnu
  21. - iasl
  22. - grub-efi-ia32-bin
  23. - rpm2cpio
  24. - wget
  25. - device-tree-compiler
  26. - lzop
  27. install:
  28. # Clone uboot-test-hooks
  29. - git clone --depth=1 git://github.com/swarren/uboot-test-hooks.git /tmp/uboot-test-hooks
  30. - ln -s travis-ci /tmp/uboot-test-hooks/bin/`hostname`
  31. - ln -s travis-ci /tmp/uboot-test-hooks/py/`hostname`
  32. # prepare buildman environment
  33. - echo -e "[toolchain]\nroot = /usr" > ~/.buildman
  34. - echo -e "aarch64 = /tmp/gcc-linaro-6.3.1-2017.02-x86_64_aarch64-linux-gnu" >> ~/.buildman
  35. - echo -e "arm = /tmp/gcc-linaro-6.3.1-2017.02-x86_64_arm-linux-gnueabihf" >> ~/.buildman
  36. - echo -e "arc = /tmp/arc_gnu_2017.09_prebuilt_uclibc_le_archs_linux_install" >> ~/.buildman
  37. - echo -e "\n[toolchain-alias]\nsh = sh4\nopenrisc = or32" >> ~/.buildman
  38. - cat ~/.buildman
  39. - virtualenv /tmp/venv
  40. - . /tmp/venv/bin/activate
  41. - pip install pytest
  42. - grub-mkimage -o ~/grub_x86.efi -O i386-efi normal echo lsefimmap lsefi lsefisystab efinet tftp minicmd
  43. - mkdir ~/grub2-arm
  44. - ( 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 )
  45. - mkdir ~/grub2-arm64
  46. - ( 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 )
  47. env:
  48. global:
  49. - PATH=/tmp/qemu-install/bin:/tmp/uboot-test-hooks/bin:/usr/bin:/bin
  50. - PYTHONPATH=/tmp/uboot-test-hooks/py/travis-ci
  51. - BUILD_DIR=build
  52. - HOSTCC="cc"
  53. - HOSTCXX="c++"
  54. before_script:
  55. # install toolchains based on TOOLCHAIN} variable
  56. - if [[ "${TOOLCHAIN}" == *m68k* ]]; then ./tools/buildman/buildman --fetch-arch m68k ; fi
  57. - if [[ "${TOOLCHAIN}" == *microblaze* ]]; then ./tools/buildman/buildman --fetch-arch microblaze ; fi
  58. - if [[ "${TOOLCHAIN}" == *mips* ]]; then ./tools/buildman/buildman --fetch-arch mips ; fi
  59. - if [[ "${TOOLCHAIN}" == *or32* ]]; then ./tools/buildman/buildman --fetch-arch or32 ; fi
  60. - if [[ "${TOOLCHAIN}" == *sh4* ]]; then ./tools/buildman/buildman --fetch-arch sh4 ; fi
  61. - if [[ "${TOOLCHAIN}" == *x86_64* ]]; then
  62. ./tools/buildman/buildman --fetch-arch x86_64;
  63. echo -e "\n[toolchain-prefix]\nx86 = ${HOME}/.buildman-toolchains/gcc-4.9.0-nolibc/x86_64-linux/bin/x86_64-linux-" >> ~/.buildman;
  64. fi
  65. - if [[ "${TOOLCHAIN}" == arc ]]; then
  66. 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 &&
  67. tar -C /tmp -xf arc_gnu_2017.09_prebuilt_uclibc_le_archs_linux_install.tar.gz;
  68. fi
  69. - if [[ "${TOOLCHAIN}" == *xtensa* ]]; then
  70. wget https://github.com/foss-xtensa/toolchain/releases/download/2018.02/x86_64-2018.02-${TOOLCHAIN}.tar.gz &&
  71. tar -C /tmp -xf x86_64-2018.02-${TOOLCHAIN}.tar.gz &&
  72. echo -e "\n[toolchain-prefix]\nxtensa = /tmp/2018.02/${TOOLCHAIN}/bin/${TOOLCHAIN}-" >> ~/.buildman;
  73. fi
  74. # If TOOLCHAIN is unset, we're on some flavour of ARM.
  75. - if [[ "${TOOLCHAIN}" == "" ]]; then
  76. wget http://releases.linaro.org/components/toolchain/binaries/6.3-2017.02/aarch64-linux-gnu/gcc-linaro-6.3.1-2017.02-x86_64_aarch64-linux-gnu.tar.xz &&
  77. wget http://releases.linaro.org/components/toolchain/binaries/6.3-2017.02/arm-linux-gnueabihf/gcc-linaro-6.3.1-2017.02-x86_64_arm-linux-gnueabihf.tar.xz &&
  78. tar -C /tmp -xf gcc-linaro-6.3.1-2017.02-x86_64_aarch64-linux-gnu.tar.xz &&
  79. tar -C /tmp -xf gcc-linaro-6.3.1-2017.02-x86_64_arm-linux-gnueabihf.tar.xz;
  80. fi
  81. - if [[ "${TOOLCHAIN}" == "riscv" ]]; then
  82. wget https://github.com/PkmX/riscv-prebuilt-toolchains/releases/download/20180111/riscv32-unknown-elf-toolchain.tar.gz &&
  83. tar -C /tmp -xf riscv32-unknown-elf-toolchain.tar.gz &&
  84. echo -e "\n[toolchain-prefix]\nriscv = /tmp/riscv32-unknown-elf/bin/riscv32-unknown-elf-" >> ~/.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"
  144. - env:
  145. - BUILDMAN="arm7"
  146. - env:
  147. - BUILDMAN="arm920t"
  148. - env:
  149. - JOB="arm926ejs"
  150. BUILDMAN="arm926ejs -x mx,siemens,atmel"
  151. - env:
  152. - BUILDMAN="arm946es"
  153. - env:
  154. - BUILDMAN="atmel"
  155. - env:
  156. - BUILDMAN="aries"
  157. - env:
  158. - JOB="Boundary Devices"
  159. BUILDMAN="boundary"
  160. - env:
  161. - JOB="engicam"
  162. BUILDMAN="engicam"
  163. - env:
  164. - JOB="Freescale ARM32"
  165. BUILDMAN="freescale -x powerpc,m68k,aarch64"
  166. - env:
  167. - JOB="Freescale AArch64"
  168. BUILDMAN="freescale&aarch64"
  169. - env:
  170. - JOB="i.MX6 (non-Freescale)"
  171. BUILDMAN="mx6 -x freescale,toradex,boundary,engicam"
  172. - env:
  173. - JOB="i.MX (non-Freescale, non-i.MX6)"
  174. BUILDMAN="mx -x freescale,mx6,toradex"
  175. - env:
  176. - BUILDMAN="k2"
  177. - env:
  178. - BUILDMAN="samsung"
  179. - env:
  180. - BUILDMAN="socfpga"
  181. - env:
  182. - BUILDMAN="sun4i"
  183. - env:
  184. - BUILDMAN="sun5i"
  185. - env:
  186. - BUILDMAN="sun6i"
  187. - env:
  188. - BUILDMAN="sun7i"
  189. - env:
  190. - BUILDMAN="sun8i"
  191. - env:
  192. - BUILDMAN="sun9i"
  193. - env:
  194. - BUILDMAN="sun50i"
  195. - env:
  196. - JOB="Catch-all ARM"
  197. BUILDMAN="arm -x arm11,arm7,arm9,aarch64,atmel,aries,freescale,kirkwood,mvebu,siemens,tegra,uniphier,mx,samsung,sunxi,am33xx,omap3,omap4,omap5,pxa,rockchip,toradex,socfpga,k2,xilinx"
  198. - env:
  199. - BUILDMAN="sandbox x86"
  200. TOOLCHAIN="x86_64"
  201. - env:
  202. - BUILDMAN="toradex"
  203. - env:
  204. - BUILDMAN="kirkwood"
  205. - env:
  206. - BUILDMAN="mvebu"
  207. - env:
  208. - JOB="PXA"
  209. - BUILDMAN="pxa -x toradex"
  210. - env:
  211. - BUILDMAN="m68k"
  212. TOOLCHAIN="m68k"
  213. - env:
  214. - BUILDMAN="microblaze"
  215. TOOLCHAIN="microblaze"
  216. - env:
  217. - BUILDMAN="mips"
  218. TOOLCHAIN="mips"
  219. - env:
  220. - BUILDMAN="mpc83xx"
  221. - env:
  222. - BUILDMAN="mpc85xx -x freescale"
  223. - env:
  224. - BUILDMAN="mpc85xx -x t208xrdb -x t4qds -x t102* -x p1_p2_rdb_pc -x p1010rdb -x corenet_ds -x b4860qds -x sbc8548 -x bsc91*"
  225. - env:
  226. - BUILDMAN="t208xrdb"
  227. - env:
  228. - BUILDMAN="t4qds"
  229. - env:
  230. - BUILDMAN="t102*"
  231. - env:
  232. - BUILDMAN="p1_p2_rdb_pc"
  233. - env:
  234. - BUILDMAN="p1010rdb"
  235. - env:
  236. - BUILDMAN="corenet_ds b4860qds sbc8548 bsc91*"
  237. - env:
  238. - BUILDMAN="mpc86xx"
  239. - env:
  240. - BUILDMAN="mpc8xx"
  241. - env:
  242. - BUILDMAN="siemens"
  243. - env:
  244. - JOB="tegra"
  245. BUILDMAN="tegra -x toradex"
  246. - env:
  247. - JOB="am33xx"
  248. BUILDMAN="am33xx -x siemens"
  249. - env:
  250. - BUILDMAN="omap3"
  251. - env:
  252. - BUILDMAN="omap4"
  253. - env:
  254. - BUILDMAN="omap5"
  255. - env:
  256. - BUILDMAN="uniphier"
  257. - env:
  258. - JOB="aarch64"
  259. BUILDMAN="aarch64 -x tegra,freescale,mvebu,uniphier,sunxi,samsung,rockchip"
  260. - env:
  261. - BUILDMAN="rockchip"
  262. - env:
  263. - BUILDMAN="sh4"
  264. TOOLCHAIN="sh4"
  265. - env:
  266. - JOB="Xilinx (ARM)"
  267. BUILDMAN="xilinx -x microblaze"
  268. - env:
  269. - BUILDMAN="xtensa"
  270. TOOLCHAIN="xtensa-dc233c-elf"
  271. - env:
  272. - BUILDMAN="riscv"
  273. TOOLCHAIN="riscv"
  274. # QA jobs for code analytics
  275. # static code analysis with cppcheck (we can add --enable=all later)
  276. - env:
  277. - JOB="cppcheck"
  278. script:
  279. - cppcheck --force --quiet --inline-suppr .
  280. # search for TODO within source tree
  281. - env:
  282. - JOB="grep TODO"
  283. script:
  284. - grep -r TODO .
  285. # search for FIXME within source tree
  286. - env:
  287. - JOB="grep FIXME HACK"
  288. script:
  289. - grep -r FIXME .
  290. # search for HACK within source tree and ignore HACKKIT board
  291. script:
  292. - grep -r HACK . | grep -v HACKKIT
  293. # some statistics about the code base
  294. - env:
  295. - JOB="sloccount"
  296. script:
  297. - sloccount .
  298. # test/py
  299. - env:
  300. - TEST_PY_BD="sandbox"
  301. BUILDMAN="^sandbox$"
  302. TOOLCHAIN="x86_64"
  303. - env:
  304. - TEST_PY_BD="sandbox_spl"
  305. TEST_PY_TEST_SPEC="test_ofplatdata"
  306. BUILDMAN="^sandbox$"
  307. TOOLCHAIN="x86_64"
  308. TEST_PY_TOOLS="yes"
  309. - env:
  310. - TEST_PY_BD="sandbox_flattree"
  311. BUILDMAN="^sandbox_flattree$"
  312. TOOLCHAIN="x86_64"
  313. - env:
  314. - TEST_PY_BD="vexpress_ca15_tc2"
  315. TEST_PY_ID="--id qemu"
  316. QEMU_TARGET="arm-softmmu"
  317. BUILDMAN="^vexpress_ca15_tc2$"
  318. - env:
  319. - TEST_PY_BD="vexpress_ca9x4"
  320. TEST_PY_ID="--id qemu"
  321. QEMU_TARGET="arm-softmmu"
  322. BUILDMAN="^vexpress_ca9x4$"
  323. - env:
  324. - TEST_PY_BD="integratorcp_cm926ejs"
  325. TEST_PY_TEST_SPEC="not sleep"
  326. TEST_PY_ID="--id qemu"
  327. QEMU_TARGET="arm-softmmu"
  328. BUILDMAN="^integratorcp_cm926ejs$"
  329. - env:
  330. - TEST_PY_BD="qemu_arm"
  331. TEST_PY_TEST_SPEC="not sleep"
  332. QEMU_TARGET="arm-softmmu"
  333. BUILDMAN="^qemu_arm$"
  334. - env:
  335. - TEST_PY_BD="qemu_arm64"
  336. TEST_PY_TEST_SPEC="not sleep"
  337. QEMU_TARGET="aarch64-softmmu"
  338. BUILDMAN="^qemu_arm64$"
  339. - env:
  340. - TEST_PY_BD="qemu_mips"
  341. TEST_PY_TEST_SPEC="not sleep"
  342. QEMU_TARGET="mips-softmmu"
  343. BUILDMAN="^qemu_mips$"
  344. TOOLCHAIN="mips"
  345. - env:
  346. - TEST_PY_BD="qemu_mipsel"
  347. TEST_PY_TEST_SPEC="not sleep"
  348. QEMU_TARGET="mipsel-softmmu"
  349. BUILDMAN="^qemu_mipsel$"
  350. TOOLCHAIN="mips"
  351. - env:
  352. - TEST_PY_BD="qemu_mips64"
  353. TEST_PY_TEST_SPEC="not sleep"
  354. QEMU_TARGET="mips64-softmmu"
  355. BUILDMAN="^qemu_mips64$"
  356. TOOLCHAIN="mips"
  357. - env:
  358. - TEST_PY_BD="qemu_mips64el"
  359. TEST_PY_TEST_SPEC="not sleep"
  360. QEMU_TARGET="mips64el-softmmu"
  361. BUILDMAN="^qemu_mips64el$"
  362. TOOLCHAIN="mips"
  363. - env:
  364. - TEST_PY_BD="qemu-ppce500"
  365. TEST_PY_TEST_SPEC="not sleep"
  366. QEMU_TARGET="ppc-softmmu"
  367. BUILDMAN="^qemu-ppce500$"
  368. - env:
  369. - TEST_PY_BD="qemu-x86"
  370. TEST_PY_TEST_SPEC="not sleep"
  371. QEMU_TARGET="i386-softmmu"
  372. BUILDMAN="^qemu-x86$"
  373. TOOLCHAIN="x86_64"
  374. BUILD_ROM="yes"
  375. - env:
  376. - TEST_PY_BD="zynq_zc702"
  377. TEST_PY_TEST_SPEC="not sleep"
  378. QEMU_TARGET="arm-softmmu"
  379. TEST_PY_ID="--id qemu"
  380. BUILDMAN="^zynq_zc702$"
  381. - env:
  382. - TEST_PY_BD="xtfpga"
  383. TEST_PY_TEST_SPEC="not sleep"
  384. QEMU_TARGET="xtensa-softmmu"
  385. TEST_PY_ID="--id qemu"
  386. BUILDMAN="^xtfpga$"
  387. TOOLCHAIN="xtensa-dc233c-elf"
  388. # TODO make it perfect ;-r