PKGBUILD 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. # U-Boot: BeagleBoard, BeagleBone, BeagleBone Black
  2. # Maintainer: André Silva <emulatorman@hyperbola.info>
  3. # Contributor: Jookia <166291@gmail.com>
  4. # Contributor: Márcio Silva <coadde@hyperbola.info>
  5. pkgbase=uboot4extlinux-ti-soc
  6. pkgname=('uboot4extlinux-am335x_bone'
  7. 'uboot4extlinux-chiliboard'
  8. 'uboot4extlinux-omap3_beagle'
  9. 'uboot4extlinux-omap4_panda')
  10. pkgver=2020.07
  11. pkgrel=1
  12. arch=('armv7h')
  13. url="http://git.denx.de/u-boot.git/"
  14. license=('GPL')
  15. makedepends=('bc' 'bison' 'dtc' 'flex' 'python' 'python2' 'swig')
  16. backup=(boot/extlinux/extlinux.conf)
  17. source=("ftp://ftp.denx.de/pub/u-boot/u-boot-${pkgver}.tar.bz2"
  18. '0001-omap34xx-SPL-enable-MMC-raw-boot-with-u-boot.img.patch'
  19. 'extlinux-am335x.conf'
  20. 'extlinux-omap.conf')
  21. sha256sums=('c1f5bf9ee6bb6e648edbf19ce2ca9452f614b08a9f886f1a566aa42e8cf05f6a'
  22. 'SKIP'
  23. 'SKIP'
  24. 'SKIP')
  25. boards=('am335x_evm'
  26. 'chiliboard'
  27. 'omap3_beagle'
  28. 'omap4_panda')
  29. prepare() {
  30. cd u-boot-${pkgver}
  31. # The default is 0x300 512b blocks which forces u-boot.img to be locarted at
  32. # 384k on the microSD. As u-boot.img is big, it often goes over the 1MB empty
  33. # space that is created by default when partitioning block devices. That
  34. # corrupts the first partition. Using 0x200 leaves more space to u-boot.img
  35. # and is well aligned to 128k.
  36. for i in ${boards[@]}; do
  37. echo 'CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x200' >> \
  38. configs/${i}_defconfig
  39. done
  40. # See the 0001-omap34xx-SPL-enable-MMC-raw-boot-with-u-boot.img.patch for
  41. # rationale for this configuration
  42. echo '# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set' >> \
  43. configs/omap3_beagle_defconfig
  44. # We want to enable users to use both RAW mode and filesystems to install
  45. # u-boot, but as filesystems are more complicated due to constraints that
  46. # need to be respected for it to work we default to raw block. This patch
  47. # restores the ability of using RAW block mode on OMAP >= 2. RAW partitions
  48. # have not been tested yet and may or may not work but they have constraints
  49. # as well.
  50. patch -Np1 -i ../0001-omap34xx-SPL-enable-MMC-raw-boot-with-u-boot.img.patch
  51. }
  52. build() {
  53. cd u-boot-${pkgver}
  54. unset CFLAGS CXXFLAGS LDFLAGS
  55. for i in ${boards[@]}; do
  56. mkdir -p ../bin_${i}
  57. make distclean
  58. make ${i}_defconfig
  59. echo 'CONFIG_IDENT_STRING=" Parabola GNU/Linux-libre"' >> .config
  60. make EXTRAVERSION=-${pkgrel}
  61. mv -f MLO u-boot.img ../bin_${i}
  62. done
  63. }
  64. package_uboot4extlinux-am335x_bone() {
  65. pkgdesc="U-Boot with Extlinux support for various BeagleBones, the AM335x GP EVM and the EVM SK"
  66. install=${pkgbase}.install
  67. provides=('uboot4extlinux-am335x')
  68. conflicts=('uboot-am335x_bone' 'uboot4grub-am335x_bone')
  69. install -d "${pkgdir}"/boot/extlinux
  70. install -d "${pkgdir}"/boot/u-boot/images/
  71. install -Dm644 \
  72. bin_am335x_evm/MLO \
  73. bin_am335x_evm/u-boot.img \
  74. "${pkgdir}"/boot/u-boot/images/
  75. install -Dm644 extlinux-am335x.conf "${pkgdir}"/boot/extlinux/extlinux.conf
  76. # Package documentation as well
  77. install -d "${pkgdir}"/usr/share/doc/u-boot
  78. # The README might move in doc/board/ at some point
  79. install -Dm644 u-boot-${pkgver}/board/ti/am335x/README \
  80. "${pkgdir}"/usr/share/doc/u-boot/am335x_bone.txt
  81. }
  82. package_uboot4extlinux-chiliboard() {
  83. pkgdesc="U-Boot with Extlinux support for the ChiliBoard"
  84. install=${pkgbase}.install
  85. provides=('uboot4extlinux-am335x')
  86. conflicts=('uboot-chiliboard')
  87. install -d "${pkgdir}"/boot/extlinux
  88. install -d "${pkgdir}"/boot/u-boot/images/
  89. install -Dm644 \
  90. bin_chiliboard/MLO \
  91. bin_chiliboard/u-boot.img \
  92. "${pkgdir}"/boot/u-boot/images/
  93. install -Dm644 extlinux-am335x.conf "${pkgdir}"/boot/extlinux/extlinux.conf
  94. # Package documentation as well
  95. install -d "${pkgdir}"/usr/share/doc/u-boot
  96. # The README might move in doc/board/ at some point
  97. install -Dm644 u-boot-${pkgver}/board/grinn/chiliboard/README \
  98. "${pkgdir}"/usr/share/doc/u-boot/chiliboard.txt
  99. }
  100. package_uboot4extlinux-omap3_beagle() {
  101. pkgdesc="U-Boot with Extlinux support for various BeagleBoards"
  102. install=${pkgbase}.install
  103. provides=('uboot4extlinux-omap3')
  104. conflicts=('grub-omap3_beagle'
  105. 'grub-omap3_beagle_xm'
  106. 'grub-omap3_beagle_xm_ab'
  107. 'uboot-omap3_beagle')
  108. install -d "${pkgdir}"/boot/extlinux
  109. install -d "${pkgdir}"/boot/u-boot/images/
  110. install -Dm644 \
  111. bin_omap3_beagle/MLO \
  112. bin_omap3_beagle/u-boot.img \
  113. "${pkgdir}"/boot/u-boot/images/
  114. install -Dm644 extlinux-omap.conf "${pkgdir}"/boot/extlinux/extlinux.conf
  115. # Package documentation as well
  116. install -d "${pkgdir}"/usr/share/doc/u-boot
  117. # The README might be converted to ReStructuredText at some point and be moved because of that
  118. install -Dm644 u-boot-${pkgver}/doc/README.omap3 "${pkgdir}"/usr/share/doc/u-boot/
  119. }
  120. package_uboot4extlinux-omap4_panda() {
  121. pkgdesc="U-Boot with Extlinux support for the PandaBoard and PandaBoard ES"
  122. install=${pkgbase}.install
  123. provides=('uboot4extlinux-omap4_panda')
  124. conflicts=('uboot4grub-omap4_panda'
  125. 'uboot-omap4_panda'
  126. 'uboot-pandaboard-linux-libre'
  127. 'uboot-pandaboard')
  128. install -d "${pkgdir}"/boot/extlinux
  129. install -d "${pkgdir}"/boot/u-boot/images/
  130. install -Dm644 \
  131. bin_omap4_panda/MLO \
  132. bin_omap4_panda/u-boot.img \
  133. "${pkgdir}"/boot/u-boot/images/
  134. install -Dm644 extlinux-omap.conf "${pkgdir}"/boot/extlinux/extlinux.conf
  135. }