summaryrefslogtreecommitdiff
path: root/libre-testing/barebox/PKGBUILD
blob: 526a778890a763fca3bd725ca298ab8e3492bbc1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Copyright (C) 2018, 2019 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the CC0 1.0 License.
# Maintainers: Parabola hackers <dev@lists.parabola.nu>

_pkgname=barebox
pkgname=barebox-am335x
pkgver=2019.02.0
pkgrel=1
pkgdesc="Barebox for devices with an am335x system on a chip"
arch=('armv7h')
makedepends=('lzop')
url="http://barebox.org/"
license=('GPL2')
install=${_pkgname}.install
source=("http://barebox.org/download/${_pkgname}-${pkgver}.tar.bz2")
sha512sums=('648827efeec7b2591eaf43daf98368be1902e3f8157c8acd88b9f103078e9989bb158d81eda013e360d6dfdfbb3c7aae0e334fce957663b72ca46f419c33e981')

build() {
  cd ${_pkgname}-${pkgver}
  unset CFLAGS CXXFLAGS LDFLAGS

  if [ "$CARCH" = "armv7h" ]; then
    export ARCH=arm
    make am335x_mlo_defconfig
    make

    make omap_defconfig
    make
    # TODO: Add support for more ARM SOCs and
    # CPU architectures (Barebox also supports
    # x86 and PowerPC)
  fi
}

package() {
  cd ${_pkgname}-${pkgver}
  mkdir -p "${pkgdir}/boot/barebox/images/"
  install -t "${pkgdir}/boot/barebox/images/" images/barebox-*.img
}