# U-Boot: BeagleBone and BeagleBone Black # Maintainer: André Silva # Contributor: Jookia <166291@gmail.com> # Contributor: Márcio Silva pkgbase=uboot4extlinux-am335x pkgname=('uboot4extlinux-am335x_bone' 'uboot4extlinux-chiliboard') pkgver=2020.04 pkgrel=1 arch=('armv7h') url="http://git.denx.de/u-boot.git/" license=('GPL') makedepends=('bc' 'bison' 'dtc' 'flex' 'python' 'python2' 'swig') backup=(boot/extlinux/extlinux.conf) source=("ftp://ftp.denx.de/pub/u-boot/u-boot-${pkgver}.tar.bz2" 'extlinux.conf') sha256sums=('fe732aaf037d9cc3c0909bad8362af366ae964bbdac6913a34081ff4ad565372' 'SKIP') boards=('am335x_evm' 'chiliboard') prepare() { cd u-boot-${pkgver} echo 'CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x200' >> configs/am335x_evm_defconfig } build() { cd u-boot-${pkgver} unset CFLAGS CXXFLAGS LDFLAGS for i in ${boards[@]}; do mkdir -p ../bin_${i} make distclean make ${i}_defconfig echo 'CONFIG_IDENT_STRING=" Parabola GNU/Linux-libre"' >> .config make EXTRAVERSION=-${pkgrel} mv -f MLO u-boot.img ../bin_${i} done } package_uboot4extlinux-am335x_bone() { pkgdesc="U-Boot with Extlinux support for various BeagleBones, the AM335x GP EVM and EVM SK EVM SK" install=${pkgbase}.install provides=('uboot4extlinux-am335x') conflicts=('uboot-am335x_bone' 'uboot4grub-am335x_bone') install -d "${pkgdir}"/boot/extlinux install -d "${pkgdir}"/boot/u-boot/images/ install -Dm644 \ bin_am335x_evm/MLO \ bin_am335x_evm/u-boot.img \ "${pkgdir}"/boot/u-boot/images/ install -Dm644 extlinux.conf "${pkgdir}"/boot/extlinux # Package documentation as well install -d "${pkgdir}"/usr/share/doc/u-boot # The README might move in doc/board/ at some point install -Dm644 u-boot-${pkgver}/board/ti/am335x/README "${pkgdir}"/usr/share/doc/u-boot/am335x_bone.txt } package_uboot4extlinux-chiliboard() { pkgdesc="U-Boot with Extlinux support for the ChiliBoard" install=${pkgbase}.install provides=('uboot4extlinux-am335x') conflicts=('uboot-chiliboard') install -d "${pkgdir}"/boot/extlinux install -d "${pkgdir}"/boot/u-boot/images/ install -Dm644 \ bin_chiliboard/MLO \ bin_chiliboard/u-boot.img \ "${pkgdir}"/boot/u-boot/images/ install -Dm644 extlinux.conf "${pkgdir}"/boot/extlinux # Package documentation as well install -d "${pkgdir}"/usr/share/doc/u-boot # The README might move in doc/board/ at some point install -Dm644 u-boot-${pkgver}/board/grinn/chiliboard/README "${pkgdir}"/usr/share/doc/u-boot/chiliboard.txt }