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.
 
 
 
 
 
 

334 lines
11 KiB

  1. # Copyright Roger Meier <r.meier@siemens.com>
  2. # SPDX-License-Identifier: GPL-2.0+
  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. install:
  27. # install latest device tree compiler
  28. #- git clone --depth=1 git://git.kernel.org/pub/scm/utils/dtc/dtc.git /tmp/dtc
  29. #- make -j4 -C /tmp/dtc
  30. # Clone uboot-test-hooks
  31. - git clone --depth=1 git://github.com/swarren/uboot-test-hooks.git /tmp/uboot-test-hooks
  32. - ln -s travis-ci /tmp/uboot-test-hooks/bin/`hostname`
  33. - ln -s travis-ci /tmp/uboot-test-hooks/py/`hostname`
  34. # prepare buildman environment
  35. - echo -e "[toolchain]\nroot = /usr" > ~/.buildman
  36. - echo -e "aarch64 = /tmp/gcc-linaro-6.3.1-2017.02-x86_64_aarch64-linux-gnu" >> ~/.buildman
  37. - echo -e "arm = /tmp/gcc-linaro-6.3.1-2017.02-x86_64_arm-linux-gnueabihf" >> ~/.buildman
  38. - echo -e "arc = /tmp/arc_gnu_2016.09_prebuilt_uclibc_le_archs_linux_install" >> ~/.buildman
  39. - echo -e "\n[toolchain-alias]\nsh = sh4\nopenrisc = or32" >> ~/.buildman
  40. - cat ~/.buildman
  41. - virtualenv /tmp/venv
  42. - . /tmp/venv/bin/activate
  43. - pip install pytest
  44. - grub-mkimage -o ~/grub_x86.efi -O i386-efi normal echo lsefimmap lsefi lsefisystab efinet tftp minicmd
  45. - mkdir ~/grub2-arm
  46. - ( 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 )
  47. env:
  48. global:
  49. - PATH=/tmp/dtc:/tmp/qemu-install/bin:/tmp/uboot-test-hooks/bin:$PATH
  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}" == *avr32* ]]; then ./tools/buildman/buildman --fetch-arch avr32 ; fi
  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}" == *sh4* ]]; then ./tools/buildman/buildman --fetch-arch sh4 ; 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-4.9.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-2016.09-release/arc_gnu_2016.09_prebuilt_uclibc_le_archs_linux_install.tar.gz &&
  68. tar -C /tmp -xf arc_gnu_2016.09_prebuilt_uclibc_le_archs_linux_install.tar.gz;
  69. fi
  70. - if [[ "${TOOLCHAIN}" == *xtensa* ]]; then ./tools/buildman/buildman --fetch-arch xtensa ; fi
  71. # If TOOLCHAIN is unset, we're on some flavour of ARM.
  72. - if [[ "${TOOLCHAIN}" == "" ]]; then
  73. 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 &&
  74. 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 &&
  75. tar -C /tmp -xf gcc-linaro-6.3.1-2017.02-x86_64_aarch64-linux-gnu.tar.xz &&
  76. tar -C /tmp -xf gcc-linaro-6.3.1-2017.02-x86_64_arm-linux-gnueabihf.tar.xz;
  77. fi
  78. - if [[ "${QEMU_TARGET}" != "" ]]; then
  79. git clone git://git.qemu.org/qemu.git /tmp/qemu;
  80. pushd /tmp/qemu;
  81. git submodule update --init dtc &&
  82. git checkout v2.8.0-rc3 &&
  83. ./configure --prefix=/tmp/qemu-install --target-list=${QEMU_TARGET} &&
  84. make -j4 all install;
  85. popd;
  86. fi
  87. script:
  88. # Comments must be outside the command strings below, or the Travis parser
  89. # will get confused.
  90. #
  91. # Exit code 129 means warnings only.
  92. - if [[ "${BUILDMAN}" != "" ]]; then
  93. set +e;
  94. tools/buildman/buildman -P ${BUILDMAN};
  95. ret=$?;
  96. if [[ $ret -ne 0 && $ret -ne 129 ]]; then
  97. tools/buildman/buildman -sdeP ${BUILDMAN};
  98. exit $ret;
  99. fi;
  100. fi
  101. # "not a_test_which_does_not_exist" is a dummy -k parameter which will
  102. # never prevent any test from running. That way, we can always pass
  103. # "-k something" even when $TEST_PY_TEST_SPEC doesnt need a custom
  104. # value.
  105. - export UBOOT_TRAVIS_BUILD_DIR=`cd .. && pwd`/.bm-work/${TEST_PY_BD};
  106. cp ~/grub_x86.efi $UBOOT_TRAVIS_BUILD_DIR/;
  107. cp ~/grub2-arm/usr/lib/grub2/arm-efi/grub.efi $UBOOT_TRAVIS_BUILD_DIR/grub_arm.efi;
  108. if [[ "${TEST_PY_BD}" != "" ]]; then
  109. ./test/py/test.py --bd ${TEST_PY_BD} ${TEST_PY_ID}
  110. -k "${TEST_PY_TEST_SPEC:-not a_test_which_does_not_exist}"
  111. --build-dir "$UBOOT_TRAVIS_BUILD_DIR";
  112. fi
  113. matrix:
  114. include:
  115. # we need to build by vendor due to 50min time limit for builds
  116. # each env setting here is a dedicated build
  117. - env:
  118. - BUILDMAN="arc"
  119. TOOLCHAIN="arc"
  120. - env:
  121. - BUILDMAN="arm11"
  122. - env:
  123. - BUILDMAN="arm7"
  124. - env:
  125. - BUILDMAN="arm920t"
  126. - env:
  127. - JOB="arm926ejs"
  128. BUILDMAN="arm926ejs -x mx,siemens,atmel"
  129. - env:
  130. - BUILDMAN="arm946es"
  131. - env:
  132. - BUILDMAN="atmel -x avr32"
  133. - env:
  134. - BUILDMAN="avr32"
  135. TOOLCHAIN="avr32"
  136. - env:
  137. - BUILDMAN="denx"
  138. - env:
  139. - JOB="Freescale ARM32"
  140. BUILDMAN="freescale -x powerpc,m68k,aarch64"
  141. - env:
  142. - JOB="Freescale AArch64"
  143. BUILDMAN="freescale&aarch64"
  144. - env:
  145. - JOB="i.MX6 (non-Freescale)"
  146. BUILDMAN="mx6 -x freescale"
  147. - env:
  148. - JOB="i.MX (non-Freescale, non-i.MX6)"
  149. BUILDMAN="mx -x freescale,mx6"
  150. - env:
  151. - BUILDMAN="samsung"
  152. - env:
  153. - BUILDMAN="sun4i"
  154. - env:
  155. - BUILDMAN="sun5i"
  156. - env:
  157. - BUILDMAN="sun6i"
  158. - env:
  159. - BUILDMAN="sun7i"
  160. - env:
  161. - BUILDMAN="sun8i"
  162. - env:
  163. - BUILDMAN="sun9i"
  164. - env:
  165. - BUILDMAN="sun50i"
  166. - env:
  167. - JOB="Catch-all ARM"
  168. BUILDMAN="arm -x arm11,arm7,arm9,aarch64,atmel,denx,freescale,kirkwood,mvebu,siemens,tegra,uniphier,mx,samsung,sunxi,am33xx,omap3,omap4,omap5,pxa,rockchip"
  169. - env:
  170. - BUILDMAN="sandbox x86"
  171. TOOLCHAIN="x86_64"
  172. - env:
  173. - BUILDMAN="kirkwood"
  174. - env:
  175. - BUILDMAN="mvebu"
  176. - env:
  177. - BUILDMAN="pxa"
  178. - env:
  179. - BUILDMAN="m68k"
  180. TOOLCHAIN="m68k"
  181. - env:
  182. - BUILDMAN="microblaze"
  183. TOOLCHAIN="microblaze"
  184. - env:
  185. - BUILDMAN="mips"
  186. TOOLCHAIN="mips"
  187. - env:
  188. - BUILDMAN="mpc512x"
  189. - env:
  190. - BUILDMAN="mpc5xx"
  191. - env:
  192. - BUILDMAN="mpc5xxx"
  193. - env:
  194. - BUILDMAN="mpc83xx"
  195. - env:
  196. - BUILDMAN="mpc85xx -x freescale"
  197. - env:
  198. - BUILDMAN="mpc85xx -x t208xrdb -x t4qds -x t102* -x p1_p2_rdb_pc -x p1010rdb -x corenet_ds -x b4860qds -x sbc8548 -x bsc91*"
  199. - env:
  200. - BUILDMAN="t208xrdb t4qds t102*"
  201. - env:
  202. - BUILDMAN="p1_p2_rdb_pc"
  203. - env:
  204. - BUILDMAN="p1010rdb"
  205. - env:
  206. - BUILDMAN="corenet_ds b4860qds sbc8548 bsc91*"
  207. - env:
  208. - BUILDMAN="mpc86xx"
  209. - env:
  210. - BUILDMAN="siemens"
  211. - env:
  212. - BUILDMAN="tegra"
  213. - env:
  214. - JOB="am33xx"
  215. BUILDMAN="am33xx -x siemens"
  216. - env:
  217. - BUILDMAN="omap3"
  218. - env:
  219. - BUILDMAN="omap4"
  220. - env:
  221. - BUILDMAN="omap5"
  222. - env:
  223. - BUILDMAN="uniphier"
  224. - env:
  225. - BUILDMAN="aarch64 -x tegra,freescale,mvebu,uniphier,sunxi,samsung,rockchip"
  226. - env:
  227. - BUILDMAN="rockchip"
  228. - env:
  229. - BUILDMAN="sh4"
  230. TOOLCHAIN="sh4"
  231. - env:
  232. - BUILDMAN="xtensa"
  233. TOOLCHAIN="xtensa"
  234. # QA jobs for code analytics
  235. # static code analysis with cppcheck (we can add --enable=all later)
  236. - env:
  237. - JOB="cppcheck"
  238. script:
  239. - cppcheck --force --quiet --inline-suppr .
  240. # search for TODO within source tree
  241. - env:
  242. - JOB="grep TODO"
  243. script:
  244. - grep -r TODO .
  245. # search for FIXME within source tree
  246. - env:
  247. - JOB="grep FIXME HACK"
  248. script:
  249. - grep -r FIXME .
  250. # search for HACK within source tree and ignore HACKKIT board
  251. script:
  252. - grep -r HACK . | grep -v HACKKIT
  253. # some statistics about the code base
  254. - env:
  255. - JOB="sloccount"
  256. script:
  257. - sloccount .
  258. # test/py
  259. - env:
  260. - TEST_PY_BD="sandbox"
  261. BUILDMAN="^sandbox$"
  262. TOOLCHAIN="x86_64"
  263. - env:
  264. - TEST_PY_BD="vexpress_ca15_tc2"
  265. TEST_PY_ID="--id qemu"
  266. QEMU_TARGET="arm-softmmu"
  267. BUILDMAN="^vexpress_ca15_tc2$"
  268. - env:
  269. - TEST_PY_BD="vexpress_ca9x4"
  270. TEST_PY_ID="--id qemu"
  271. QEMU_TARGET="arm-softmmu"
  272. BUILDMAN="^vexpress_ca9x4$"
  273. - env:
  274. - TEST_PY_BD="integratorcp_cm926ejs"
  275. TEST_PY_TEST_SPEC="not sleep"
  276. TEST_PY_ID="--id qemu"
  277. QEMU_TARGET="arm-softmmu"
  278. BUILDMAN="^integratorcp_cm926ejs$"
  279. - env:
  280. - TEST_PY_BD="qemu_mips"
  281. TEST_PY_TEST_SPEC="not sleep"
  282. QEMU_TARGET="mips-softmmu"
  283. BUILDMAN="^qemu_mips$"
  284. TOOLCHAIN="mips"
  285. - env:
  286. - TEST_PY_BD="qemu_mipsel"
  287. TEST_PY_TEST_SPEC="not sleep"
  288. QEMU_TARGET="mipsel-softmmu"
  289. BUILDMAN="^qemu_mipsel$"
  290. TOOLCHAIN="mips"
  291. - env:
  292. - TEST_PY_BD="qemu_mips64"
  293. TEST_PY_TEST_SPEC="not sleep"
  294. QEMU_TARGET="mips64-softmmu"
  295. BUILDMAN="^qemu_mips64$"
  296. TOOLCHAIN="mips"
  297. - env:
  298. - TEST_PY_BD="qemu_mips64el"
  299. TEST_PY_TEST_SPEC="not sleep"
  300. QEMU_TARGET="mips64el-softmmu"
  301. BUILDMAN="^qemu_mips64el$"
  302. TOOLCHAIN="mips"
  303. - env:
  304. - TEST_PY_BD="qemu-ppce500"
  305. TEST_PY_TEST_SPEC="not sleep"
  306. QEMU_TARGET="ppc-softmmu"
  307. BUILDMAN="^qemu-ppce500$"
  308. - env:
  309. - TEST_PY_BD="qemu-x86"
  310. TEST_PY_TEST_SPEC="not sleep"
  311. QEMU_TARGET="i386-softmmu"
  312. BUILDMAN="^qemu-x86$"
  313. TOOLCHAIN="x86_64"
  314. BUILD_ROM="yes"
  315. - env:
  316. - TEST_PY_BD="zynq_zc702"
  317. TEST_PY_TEST_SPEC="not sleep"
  318. QEMU_TARGET="arm-softmmu"
  319. TEST_PY_ID="--id qemu"
  320. BUILDMAN="^zynq_zc702$"
  321. # TODO make it perfect ;-r