template.py 1.3 KB

1234567891011121314151617181920212223242526272829303132333435
  1. pkgname = "atf-rk3399-bl31"
  2. pkgver = "2.8.1"
  3. pkgrel = 0
  4. archs = ["aarch64"]
  5. build_style = "makefile"
  6. make_cmd = "gmake"
  7. hostmakedepends = ["gmake", "gcc-aarch64-none-elf", "gcc-arm-none-eabi"]
  8. pkgdesc = "ARM Trusted Firmware for Rockchip rk3399 boards (bl31)"
  9. maintainer = "q66 <q66@chimera-linux.org>"
  10. license = "BSD-3-Clause"
  11. url = "https://developer.trustedfirmware.org/dashboard/view/6"
  12. source = f"https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/snapshot/trusted-firmware-a-lts-v{pkgver}.tar.gz"
  13. sha256 = "e7472500a392ccf0ab50b9ba5f47f1fdd62d536c5d53fb4709f617c429490434"
  14. hardening = ["!int"]
  15. # not relevant
  16. options = ["!strip", "!check", "!lto", "!debug", "execstack"]
  17. def do_build(self):
  18. # we undef all the stuff cbuild automatically sets,
  19. # and always "cross compile" with our bare metal toolchain
  20. self.do(
  21. "env", "-u", "CFLAGS", "-u", "LDFLAGS",
  22. "-u", "CPPFLAGS", "-u", "CXXFLAGS", "--",
  23. "gmake", f"-j{self.make_jobs}", "PLAT=rk3399",
  24. "bl31", "CROSS_COMPILE=aarch64-none-elf-",
  25. "CC=aarch64-none-elf-gcc",
  26. )
  27. def do_install(self):
  28. self.install_file(
  29. "build/rk3399/release/bl31/bl31.elf",
  30. "usr/lib/trusted-firmware-a/rk3399", mode = 0o755
  31. )
  32. self.install_license("docs/license.rst")