recipe 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. # Build recipe for u-boot-tools.
  2. #
  3. # Copyright (C) 2019 Kevin "The Nuclear" Bloom, <nuclearkev@dragora.org>
  4. #
  5. # Licensed under the Apache License, Version 2.0 (the "License");
  6. # you may not use this file except in compliance with the License.
  7. # You may obtain a copy of the License at
  8. #
  9. # http://www.apache.org/licenses/LICENSE-2.0
  10. #
  11. # Unless required by applicable law or agreed to in writing, software
  12. # distributed under the License is distributed on an "AS IS" BASIS,
  13. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. # See the License for the specific language governing permissions and
  15. # limitations under the License.
  16. #
  17. # Based on recipes written by Mateus P. Rodrigues, <mprodrigues@dragora.org>
  18. # and Matias Fonzo, <selk@dragora.org>.
  19. program=u-boot
  20. version=2019.07
  21. release=1
  22. tarname=${program}-${version}.tar.bz2
  23. # Remote source(s)
  24. fetch=ftp://ftp.denx.de/pub/${program}/$tarname
  25. description="
  26. u-boot-tools - tools to build kernel images
  27. u-boot is for booting devices. The tools are useful for building images for C201.
  28. "
  29. homepage=http://www.denx.de/wiki/U-Boot/WebHome
  30. license="Custom"
  31. # Source documentation
  32. docs="README"
  33. docsdir="${docdir}/${program}-${version}"
  34. build()
  35. {
  36. set -e
  37. unpack "${tardir}/$tarname"
  38. cd "$srcdir"
  39. make defconfig
  40. make -j${jobs} V=1 tools-all
  41. install -m 755 -d ${destdir}/usr/bin
  42. install -m 755 -t ${destdir}/usr/bin/ ./tools/mkimage
  43. install -m 755 -t ${destdir}/usr/bin/ ./tools/mkenvimage
  44. install -m 755 -t ${destdir}/usr/bin/ ./tools/env/fw_printenv
  45. install -m 755 -t ${destdir}/usr/bin/ ./tools/img2srec
  46. install -m 755 -t ${destdir}/usr/bin/ ./tools/dumpimage
  47. install -m 755 -t ${destdir}/usr/bin/ ./tools/netconsole
  48. install -m 755 -t ${destdir}/usr/bin/ ./tools/jtagconsole
  49. install -m 755 -t ${destdir}/usr/bin/ ./tools/ncb
  50. ln -s fw_printenv ${destdir}/usr/bin/fw_setenv
  51. install -m 644 -D ./doc/mkimage.1 $srcdir/usr/share/man/man1/mkimage.1
  52. # Delete index file for the package
  53. if test -d "${destdir}/$infodir"
  54. then
  55. rm -f "${destdir}/${infodir}/dir"
  56. fi
  57. # Copy documentation
  58. mkdir -p "${destdir}${docsdir}"
  59. for file in $docs
  60. do
  61. if test -e $file
  62. then
  63. cp -p $file "${destdir}${docsdir}"
  64. fi
  65. done
  66. }