Makefile 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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:= 3
  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. 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_BCM2708_DT),y)
  47. printf "device_tree=bcm2708-rpi-b.dtb\n" >> \
  48. $(IDIR_BCM2835_BOOTLOADER)/boot/config.txt
  49. printf "device_tree_address=0x100\n" >> \
  50. $(IDIR_BCM2835_BOOTLOADER)/boot/config.txt
  51. printf "kernel_address=0x8000\n" >> \
  52. $(IDIR_BCM2835_BOOTLOADER)/boot/config.txt
  53. printf "disable_commandline_tags=2\n" >> \
  54. $(IDIR_BCM2835_BOOTLOADER)/boot/config.txt
  55. ifneq ($(ADK_KERNEL_SND_BCM2708_SOC_RPI_PROTO),)
  56. printf "dtoverlay=rpi-proto\n" >> \
  57. $(IDIR_BCM2835_BOOTLOADER)/boot/config.txt
  58. endif
  59. else
  60. printf "device_tree=\n" >> \
  61. $(IDIR_BCM2835_BOOTLOADER)/boot/config.txt
  62. endif
  63. ifeq ($(ADK_PACKAGE_BCM2835_DEBUGTOOL),y)
  64. $(INSTALL_DIR) $(IDIR_BCM2835_DEBUGTOOL)/opt/vc/bin
  65. $(INSTALL_BIN) $(WRKBUILD)/hardfp/opt/vc/bin/vcdbg \
  66. $(IDIR_BCM2835_DEBUGTOOL)/opt/vc/bin
  67. endif
  68. include $(ADK_TOPDIR)/mk/pkg-bottom.mk