PKGBUILD 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. # U-Boot: I.MX
  2. # Contributor: Isaac David <isacdaavid@at@isacdaavid@dot@info>
  3. # Contributor: André Silva <emulatorman@hyperbola.info>
  4. # Contributor: Timothy Redaelli <timothy.redaelli@gmail.com>
  5. # Maintainer: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
  6. # TODO:
  7. # - Add the following boards
  8. # - 'mx6cuboxi'
  9. # - 'nitrogen6q'
  10. # - 'udoo'
  11. # - 'usbarmory'
  12. # - 'wandboard'
  13. # - Improve the .install:
  14. # - Make it more generic: share the main part of the code.
  15. # - Check for the machine name with the device tree and ask for confirmation
  16. # if the machine is not the same but don't prevent users from installing
  17. # this bootloader on a totally different machine as the installation could
  18. # be done in a chroot or in other ways that packagers can't predict.
  19. # - Handle more than one boot device (microSD, eMMC, USB, etc)
  20. # - Point to the device documentation if there is some
  21. pkgbase=uboot4extlinux-imx
  22. pkgname=('uboot4extlinux-tbs2910')
  23. pkgver=2020.04
  24. pkgrel=2
  25. arch=('armv7h')
  26. url="http://git.denx.de/u-boot.git/"
  27. license=('GPL')
  28. makedepends=('bc' 'dtc' 'python' 'python2' 'swig')
  29. backup=(boot/extlinux/extlinux.conf)
  30. source=("ftp://ftp.denx.de/pub/u-boot/u-boot-${pkgver}.tar.bz2"
  31. 'extlinux.conf')
  32. sha256sums=('fe732aaf037d9cc3c0909bad8362af366ae964bbdac6913a34081ff4ad565372'
  33. 'SKIP')
  34. # Distro boot config and documentation for the TBS TBS2910
  35. # The patches are from the next branch of u-boot git
  36. # a bit after the v2020.07-rc4 tag. They should make it in 1 or two
  37. # u-boot release.
  38. source+=('0001-board-tbs2910-disable-loadb-and-loads-commands.patch'
  39. '0002-board-tbs2910-disable-CONFIG_GZIP.patch'
  40. '0003-board-tbs2910-move-CONFIG_BOOTCOMMAND-from-header-to.patch'
  41. '0004-board-tbs2910_defconfig-Add-support-for-booting-gene.patch'
  42. '0005-board-tbs2910-Enable-distro_boot-support.patch'
  43. '0006-board-tbs2910-add-documentation.patch')
  44. sha256sums+=('SKIP'
  45. 'SKIP'
  46. 'SKIP'
  47. 'SKIP'
  48. 'SKIP'
  49. 'SKIP')
  50. boards=('tbs2910')
  51. prepare() {
  52. cd u-boot-${pkgver}
  53. # TBS2910 patches
  54. patch -Np1 -i ../0001-board-tbs2910-disable-loadb-and-loads-commands.patch
  55. patch -Np1 -i ../0002-board-tbs2910-disable-CONFIG_GZIP.patch
  56. patch -Np1 -i ../0003-board-tbs2910-move-CONFIG_BOOTCOMMAND-from-header-to.patch
  57. patch -Np1 -i ../0004-board-tbs2910_defconfig-Add-support-for-booting-gene.patch
  58. patch -Np1 -i ../0005-board-tbs2910-Enable-distro_boot-support.patch
  59. patch -Np1 -i ../0006-board-tbs2910-add-documentation.patch
  60. }
  61. build() {
  62. cd u-boot-${pkgver}
  63. unset CFLAGS CXXFLAGS LDFLAGS
  64. for i in ${boards[@]}; do
  65. mkdir -p ../bin_${i}
  66. make distclean
  67. make ${i}_defconfig
  68. echo 'CONFIG_IDENT_STRING=" Parabola GNU/Linux-libre"' >> .config
  69. make EXTRAVERSION=-${pkgrel}
  70. mv -f u-boot.imx ../bin_${i}
  71. done
  72. }
  73. package_uboot4extlinux-tbs2910() {
  74. pkgdesc="U-Boot with Extlinux support for the TBS2910 Matrix ARM mini PC"
  75. install=tbs2910.install
  76. provides=('uboot4extlinux-imx')
  77. install -d "${pkgdir}"/boot/extlinux
  78. install -d "${pkgdir}"/boot/u-boot/images/
  79. install -Dm644 bin_tbs2910/u-boot.imx "${pkgdir}"/boot/u-boot/images/
  80. install -Dm644 extlinux.conf "${pkgdir}"/boot/extlinux
  81. # Package documentation as well
  82. install -d "${pkgdir}"/usr/share/doc/u-boot
  83. install -Dm644 u-boot-${pkgver}/doc/board/tbs/tbs2910.rst "${pkgdir}"/usr/share/doc/u-boot
  84. }