Makefile 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  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:= a43480416153e88e8499ae85e4a760dcaa4a5810
  6. PKG_RELEASE:= 1
  7. PKG_DESCR:= bootloader for bcm28xx
  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 raspberry-pi2
  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. PKG_SUBPKGS:= BCM2835_BOOTLOADER BCM2835_DEBUGTOOL
  17. PKGSD_BCM2835_DEBUGTOOL:= debugtool
  18. PKGSC_BCM2835_DEBUGTOOL:= sys/hw
  19. include $(ADK_TOPDIR)/mk/package.mk
  20. $(eval $(call PKG_template,BCM2835_BOOTLOADER,bcm2835-bootloader,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKG_DESCR),$(PKG_SECTION)))
  21. $(eval $(call PKG_template,BCM2835_DEBUGTOOL,bcm2835-debugtool,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKG_DESCR),$(PKGSC_BCM2835_DEBUGTOOL)))
  22. CONFIG_STYLE:= manual
  23. BUILD_STYLE:= manual
  24. INSTALL_STYLE:= manual
  25. do-install:
  26. $(INSTALL_DIR) $(IDIR_BCM2835_BOOTLOADER)/boot
  27. $(CP) $(WRKBUILD)/boot/bootcode.bin $(IDIR_BCM2835_BOOTLOADER)/boot/
  28. printf "kernel=kernel\n" > $(IDIR_BCM2835_BOOTLOADER)/boot/config.txt
  29. ifeq ($(ADK_PACKAGE_BCM2835_BOOTLOADER_DEFAULT),y)
  30. $(CP) $(WRKBUILD)/boot/{start.elf,fixup.dat} $(IDIR_BCM2835_BOOTLOADER)/boot/
  31. printf "start_file=start.elf\n" >> $(IDIR_BCM2835_BOOTLOADER)/boot/config.txt
  32. printf "fixup_file=fixup.dat\n" >> $(IDIR_BCM2835_BOOTLOADER)/boot/config.txt
  33. endif
  34. ifeq ($(ADK_PACKAGE_BCM2835_BOOTLOADER_EXTRA),y)
  35. $(CP) $(WRKBUILD)/boot/{start_x.elf,fixup_x.dat} $(IDIR_BCM2835_BOOTLOADER)/boot/
  36. printf "start_file=start_x.elf\n" >> $(IDIR_BCM2835_BOOTLOADER)/boot/config.txt
  37. printf "fixup_file=fixup_x.dat\n" >> $(IDIR_BCM2835_BOOTLOADER)/boot/config.txt
  38. endif
  39. ifeq ($(ADK_PACKAGE_BCM2835_BOOTLOADER_CUTDOWN),y)
  40. $(CP) $(WRKBUILD)/boot/{start_cd.elf,fixup_cd.dat} $(IDIR_BCM2835_BOOTLOADER)/boot/
  41. printf "start_file=start_cd.elf\n" >> $(IDIR_BCM2835_BOOTLOADER)/boot/config.txt
  42. printf "fixup_file=fixup_cd.dat\n" >> $(IDIR_BCM2835_BOOTLOADER)/boot/config.txt
  43. endif
  44. printf "gpu_mem=$(ADK_TARGET_GPU_MEM)\n" >> \
  45. $(IDIR_BCM2835_BOOTLOADER)/boot/config.txt
  46. ifeq ($(ADK_KERNEL_BCM2709_DT),y)
  47. printf "device_tree=bcm2709-rpi-2-b.dtb\n" >> \
  48. $(IDIR_BCM2835_BOOTLOADER)/boot/config.txt
  49. endif
  50. ifeq ($(ADK_KERNEL_BCM2708_DT),y)
  51. printf "device_tree=bcm2708-rpi-b.dtb\n" >> \
  52. $(IDIR_BCM2835_BOOTLOADER)/boot/config.txt
  53. endif
  54. ifneq ($(ADK_KERNEL_BCM2708_DT)$(ADK_KERNEL_BCM2709_DT),)
  55. printf "device_tree_address=0x100\n" >> \
  56. $(IDIR_BCM2835_BOOTLOADER)/boot/config.txt
  57. printf "kernel_address=0x8000\n" >> \
  58. $(IDIR_BCM2835_BOOTLOADER)/boot/config.txt
  59. printf "disable_commandline_tags=2\n" >> \
  60. $(IDIR_BCM2835_BOOTLOADER)/boot/config.txt
  61. printf "dtparam=i2s=on,spi=on,i2c_arm=on,i2c_vc=on\n" >> \
  62. $(IDIR_BCM2835_BOOTLOADER)/boot/config.txt
  63. ifneq ($(ADK_KERNEL_SND_BCM2708_SOC_HIFIBERRY_AMP),)
  64. printf "dtoverlay=hifiberry-amp\n" >> \
  65. $(IDIR_BCM2835_BOOTLOADER)/boot/config.txt
  66. endif
  67. ifneq ($(ADK_KERNEL_SND_BCM2708_SOC_HIFIBERRY_DAC),)
  68. printf "dtoverlay=hifiberry-dac\n" >> \
  69. $(IDIR_BCM2835_BOOTLOADER)/boot/config.txt
  70. endif
  71. ifneq ($(ADK_KERNEL_SND_BCM2708_SOC_HIFIBERRY_DIGI),)
  72. printf "dtoverlay=hifiberry-digi\n" >> \
  73. $(IDIR_BCM2835_BOOTLOADER)/boot/config.txt
  74. endif
  75. ifneq ($(ADK_KERNEL_SND_BCM2708_SOC_RPI_DAC),)
  76. printf "dtoverlay=rpi-dac\n" >> \
  77. $(IDIR_BCM2835_BOOTLOADER)/boot/config.txt
  78. endif
  79. ifneq ($(ADK_KERNEL_SND_BCM2708_SOC_IQAUDIO_DAC),)
  80. printf "dtoverlay=iqaudio-dac\n" >> \
  81. $(IDIR_BCM2835_BOOTLOADER)/boot/config.txt
  82. endif
  83. ifneq ($(ADK_KERNEL_SND_BCM2708_SOC_RPI_PROTO),)
  84. printf "dtoverlay=rpi-proto\n" >> \
  85. $(IDIR_BCM2835_BOOTLOADER)/boot/config.txt
  86. endif
  87. else
  88. printf "device_tree=\n" >> \
  89. $(IDIR_BCM2835_BOOTLOADER)/boot/config.txt
  90. endif
  91. ifeq ($(ADK_PACKAGE_BCM2835_DEBUGTOOL),y)
  92. $(INSTALL_DIR) $(IDIR_BCM2835_DEBUGTOOL)/opt/vc/bin
  93. $(INSTALL_BIN) $(WRKBUILD)/hardfp/opt/vc/bin/vcdbg \
  94. $(IDIR_BCM2835_DEBUGTOOL)/opt/vc/bin
  95. endif
  96. include $(ADK_TOPDIR)/mk/pkg-bottom.mk