1 # This file is part of the OpenADK project. OpenADK is copyrighted
2 # material, please see the LICENCE file in the top-level directory.
4 include $(ADK_TOPDIR
)/rules.mk
6 PKG_NAME
:= bcm28xx-bootloader
7 # not cloned, local src directory used
8 PKG_VERSION
:= ae9a493932e47e08cabb25a2728037298075fd00
10 PKG_DESCR
:= bootloader for bcm28xx
11 PKG_SECTION
:= base
/boot
12 PKG_URL
:= https
://github.com
/raspberrypi
/firmware
13 PKG_SITES
:= https
://github.com
/raspberrypi
/firmware.git
15 PKG_SYSTEM_DEPENDS
:= raspberry-pi raspberry-pi0 raspberry-pi2 raspberry-pi3 raspberry-pi3-64 raspberry-pi3p raspberry-pi3p-64
17 PKG_CHOICES_BCM28XX_BOOTLOADER
:= DEFAULT EXTRA CUTDOWN
18 PKGCD_DEFAULT
:= default bootloader
19 PKGCD_EXTRA
:= bootloader with extra features and codecs
20 PKGCD_CUTDOWN
:= cut down bootloader
22 PKG_SUBPKGS
:= BCM28XX_BOOTLOADER BCM28XX_DEBUGTOOL
23 PKGSD_BCM28XX_DEBUGTOOL
:= bcm28xx debugtool
(vcdbg
)
24 PKGSC_BCM28XX_DEBUGTOOL
:= sys
/hw
25 PKGSS_BCM28XX_DEBUGTOOL
:= bcm28xx-vc-debug bcm28xx-vc-libs
29 include $(ADK_TOPDIR
)/mk
/package.mk
31 $(eval
$(call PKG_template
,BCM28XX_BOOTLOADER
,bcm28xx-bootloader
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(PKG_DEPENDS
),$(PKG_DESCR
),$(PKG_SECTION
)))
32 $(eval
$(call PKG_template
,BCM28XX_DEBUGTOOL
,bcm28xx-debugtool
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(PKG_DEPENDS
),$(PKG_DESCR
),$(PKGSC_BCM28XX_DEBUGTOOL
)))
36 INSTALL_STYLE
:= manual
39 $(INSTALL_DIR
) $(IDIR_BCM28XX_BOOTLOADER
)/boot
40 $(CP
) $(WRKBUILD
)/boot
/bootcode.bin
$(IDIR_BCM28XX_BOOTLOADER
)/boot
/
41 printf
"kernel=kernel\n" > $(IDIR_BCM28XX_BOOTLOADER
)/boot
/config.txt
42 printf
"dtparam=audio,i2s,spi,i2c\n" >> \
43 $(IDIR_BCM28XX_BOOTLOADER
)/boot
/config.txt
44 ifeq ($(ADK_PACKAGE_BCM28XX_BOOTLOADER_DEFAULT
),y
)
45 $(CP
) $(WRKBUILD
)/boot
/{start.elf
,fixup.dat
} $(IDIR_BCM28XX_BOOTLOADER
)/boot
/
46 printf
"start_file=start.elf\n" >> $(IDIR_BCM28XX_BOOTLOADER
)/boot
/config.txt
47 printf
"fixup_file=fixup.dat\n" >> $(IDIR_BCM28XX_BOOTLOADER
)/boot
/config.txt
49 ifeq ($(ADK_PACKAGE_BCM28XX_BOOTLOADER_EXTRA
),y
)
50 $(CP
) $(WRKBUILD
)/boot
/{start_x.elf
,fixup_x.dat
} $(IDIR_BCM28XX_BOOTLOADER
)/boot
/
51 printf
"start_file=start_x.elf\n" >> $(IDIR_BCM28XX_BOOTLOADER
)/boot
/config.txt
52 printf
"fixup_file=fixup_x.dat\n" >> $(IDIR_BCM28XX_BOOTLOADER
)/boot
/config.txt
54 ifeq ($(ADK_PACKAGE_BCM28XX_BOOTLOADER_CUTDOWN
),y
)
55 $(CP
) $(WRKBUILD
)/boot
/{start_cd.elf
,fixup_cd.dat
} $(IDIR_BCM28XX_BOOTLOADER
)/boot
/
56 printf
"start_file=start_cd.elf\n" >> $(IDIR_BCM28XX_BOOTLOADER
)/boot
/config.txt
57 printf
"fixup_file=fixup_cd.dat\n" >> $(IDIR_BCM28XX_BOOTLOADER
)/boot
/config.txt
59 printf
"gpu_mem=$(ADK_TARGET_GPU_MEM)\n" >> \
60 $(IDIR_BCM28XX_BOOTLOADER
)/boot
/config.txt
61 ifneq ($(ADK_TARGET_HARDWARE_HIFIBERRY_AMP
),)
62 printf
"dtoverlay=hifiberry-amp.dtb\n" >> \
63 $(IDIR_BCM28XX_BOOTLOADER
)/boot
/config.txt
65 ifneq ($(ADK_TARGET_HARDWARE_HIFIBERRY_DAC
),)
66 printf
"dtoverlay=hifiberry-dac.dtb\n" >> \
67 $(IDIR_BCM28XX_BOOTLOADER
)/boot
/config.txt
69 ifneq ($(ADK_TARGET_HARDWARE_HIFIBERRY_DACPLUS
),)
70 printf
"dtoverlay=hifiberry-dacplus.dtb\n" >> \
71 $(IDIR_BCM28XX_BOOTLOADER
)/boot
/config.txt
73 ifneq ($(ADK_TARGET_HARDWARE_HIFIBERRY_DIGI
),)
74 printf
"dtoverlay=hifiberry-digi.dtb\n" >> \
75 $(IDIR_BCM28XX_BOOTLOADER
)/boot
/config.txt
77 ifneq ($(ADK_TARGET_HARDWARE_RPI_DAC
),)
78 printf
"dtoverlay=rpi-dac.dtb\n" >> \
79 $(IDIR_BCM28XX_BOOTLOADER
)/boot
/config.txt
81 ifneq ($(ADK_TARGET_HARDWARE_IQAUDIO_DAC
),)
82 printf
"dtoverlay=iqaudio-dac.dtb\n" >> \
83 $(IDIR_BCM28XX_BOOTLOADER
)/boot
/config.txt
85 ifneq ($(ADK_TARGET_HARDWARE_RPI_PROTO
),)
86 printf
"dtoverlay=rpi-proto.dtb\n" >> \
87 $(IDIR_BCM28XX_BOOTLOADER
)/boot
/config.txt
89 ifeq ($(ADK_TARGET_HARDWARE_RPI3_SERIAL
),y
)
90 printf
"dtoverlay=pi3-disable-bt.dtb\n" >> \
91 $(IDIR_BCM28XX_BOOTLOADER
)/boot
/config.txt
93 ifeq ($(ADK_TARGET_SYSTEM_RASPBERRY_PI3_64
),y
)
94 printf
"arm_control=0x200\n" >> \
95 $(IDIR_BCM28XX_BOOTLOADER
)/boot
/config.txt
96 printf
"enable_uart=1\n" >> \
97 $(IDIR_BCM28XX_BOOTLOADER
)/boot
/config.txt
99 ifeq ($(ADK_TARGET_SYSTEM_RASPBERRY_PI3P_64
),y
)
100 printf
"arm_control=0x200\n" >> \
101 $(IDIR_BCM28XX_BOOTLOADER
)/boot
/config.txt
102 printf
"enable_uart=1\n" >> \
103 $(IDIR_BCM28XX_BOOTLOADER
)/boot
/config.txt
105 ifeq ($(ADK_PACKAGE_BCM28XX_DEBUGTOOL
),y
)
106 $(INSTALL_DIR
) $(IDIR_BCM28XX_DEBUGTOOL
)/usr
/bin
107 $(INSTALL_BIN
) .
/files
/vcdbg \
108 $(IDIR_BCM28XX_DEBUGTOOL
)/usr
/bin
111 include $(ADK_TOPDIR
)/mk
/pkg-bottom.mk