Makefile 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. # This file is part of the OpenADK project. OpenADK is copyrighted
  2. # material, please see the LICENCE file in the top-level directory.
  3. include $(ADK_TOPDIR)/rules.mk
  4. PKG_NAME:= bcm2835-bootloader
  5. PKG_VERSION:= 9b068fe44503f564579a25fd849df4ec784f9d4d
  6. PKG_RELEASE:= 2
  7. PKG_DESCR:= bootloader for raspberry pi
  8. PKG_SECTION:= base/boot
  9. PKG_URL:= https://github.com/raspberrypi/firmware
  10. PKG_SITES:= https://github.com/raspberrypi/firmware.git
  11. PKG_SYSTEM_DEPENDS:= raspberry-pi
  12. PKG_CHOICES_BCM2835_BOOTLOADER:= DEFAULT EXTRA CUTDOWN
  13. PKGCD_DEFAULT:= default bootloader
  14. PKGCD_EXTRA:= bootloader with extra features and codecs
  15. PKGCD_CUTDOWN:= cut down bootloader
  16. include $(ADK_TOPDIR)/mk/package.mk
  17. $(eval $(call PKG_template,BCM2835_BOOTLOADER,bcm2835-bootloader,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKG_DESCR),$(PKG_SECTION)))
  18. CONFIG_STYLE:= manual
  19. BUILD_STYLE:= manual
  20. INSTALL_STYLE:= manual
  21. do-install:
  22. $(INSTALL_DIR) $(IDIR_BCM2835_BOOTLOADER)/boot
  23. $(CP) $(WRKBUILD)/boot/bootcode.bin $(IDIR_BCM2835_BOOTLOADER)/boot/
  24. printf "kernel=kernel\n" > $(IDIR_BCM2835_BOOTLOADER)/boot/config.txt
  25. ifeq ($(ADK_PACKAGE_BCM2835_BOOTLOADER_DEFAULT),y)
  26. $(CP) $(WRKBUILD)/boot/{start.elf,fixup.dat} $(IDIR_BCM2835_BOOTLOADER)/boot/
  27. printf "start_file=start.elf\n" >> $(IDIR_BCM2835_BOOTLOADER)/boot/config.txt
  28. printf "fixup_file=fixup.dat\n" >> $(IDIR_BCM2835_BOOTLOADER)/boot/config.txt
  29. endif
  30. ifeq ($(ADK_PACKAGE_BCM2835_BOOTLOADER_EXTRA),y)
  31. $(CP) $(WRKBUILD)/boot/{start_x.elf,fixup_x.dat} $(IDIR_BCM2835_BOOTLOADER)/boot/
  32. printf "start_file=start_x.elf\n" >> $(IDIR_BCM2835_BOOTLOADER)/boot/config.txt
  33. printf "fixup_file=fixup_x.dat\n" >> $(IDIR_BCM2835_BOOTLOADER)/boot/config.txt
  34. endif
  35. ifeq ($(ADK_PACKAGE_BCM2835_BOOTLOADER_CUTDOWN),y)
  36. $(CP) $(WRKBUILD)/boot/{start_cd.elf,fixup_cd.dat} $(IDIR_BCM2835_BOOTLOADER)/boot/
  37. printf "start_file=start_cd.elf\n" >> $(IDIR_BCM2835_BOOTLOADER)/boot/config.txt
  38. printf "fixup_file=fixup_cd.dat\n" >> $(IDIR_BCM2835_BOOTLOADER)/boot/config.txt
  39. endif
  40. printf "gpu_mem=$(ADK_TARGET_GPU_MEM)\n" >> \
  41. $(IDIR_BCM2835_BOOTLOADER)/boot/config.txt
  42. ifeq ($(ADK_KERNEL_BCM2708_DT),y)
  43. printf "device_tree=bcm2708-rpi-b.dtb\n" >> \
  44. $(IDIR_BCM2835_BOOTLOADER)/boot/config.txt
  45. printf "device_tree_address=0x100\n" >> \
  46. $(IDIR_BCM2835_BOOTLOADER)/boot/config.txt
  47. printf "kernel_address=0x8000\n" >> \
  48. $(IDIR_BCM2835_BOOTLOADER)/boot/config.txt
  49. printf "disable_commandline_tags=2\n" >> \
  50. $(IDIR_BCM2835_BOOTLOADER)/boot/config.txt
  51. ifneq ($(ADK_KERNEL_SND_BCM2708_SOC_RPI_PROTO),)
  52. printf "device_tree_overlay=rpi-proto\n" >> \
  53. $(IDIR_BCM2835_BOOTLOADER)/boot/config.txt
  54. endif
  55. endif
  56. include $(ADK_TOPDIR)/mk/pkg-bottom.mk