Makefile 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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 "dtparam=i2c=on,i2s=on,spi=on\n" >> \
  57. $(IDIR_BCM2835_BOOTLOADER)/boot/config.txt
  58. printf "dtoverlay=rpi-proto\n" >> \
  59. $(IDIR_BCM2835_BOOTLOADER)/boot/config.txt
  60. endif
  61. else
  62. printf "device_tree=\n" >> \
  63. $(IDIR_BCM2835_BOOTLOADER)/boot/config.txt
  64. endif
  65. ifeq ($(ADK_PACKAGE_BCM2835_DEBUGTOOL),y)
  66. $(INSTALL_DIR) $(IDIR_BCM2835_DEBUGTOOL)/opt/vc/bin
  67. $(INSTALL_BIN) $(WRKBUILD)/hardfp/opt/vc/bin/vcdbg \
  68. $(IDIR_BCM2835_DEBUGTOOL)/opt/vc/bin
  69. endif
  70. include $(ADK_TOPDIR)/mk/pkg-bottom.mk