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 PKG_VERSION
:= ffda51ebff205858df0f992ab2223a1c0c8c9525
9 PKG_DESCR
:= bootloader for bcm28xx
10 PKG_SECTION
:= base
/boot
11 PKG_URL
:= https
://github.com
/raspberrypi
/firmware
12 PKG_SITES
:= https
://github.com
/raspberrypi
/firmware.git
14 PKG_SYSTEM_DEPENDS
:= raspberry-pi raspberry-pi2
16 PKG_CHOICES_BCM28XX_BOOTLOADER
:= DEFAULT EXTRA CUTDOWN
17 PKGCD_DEFAULT
:= default bootloader
18 PKGCD_EXTRA
:= bootloader with extra features and codecs
19 PKGCD_CUTDOWN
:= cut down bootloader
21 PKG_SUBPKGS
:= BCM28XX_BOOTLOADER BCM28XX_DEBUGTOOL
22 PKGSD_BCM28XX_DEBUGTOOL
:= debugtool
23 PKGSC_BCM28XX_DEBUGTOOL
:= sys
/hw
24 PKGSS_BCM28XX_DEBUGTOOL
:= bcm28xx-vc-debug
26 include $(ADK_TOPDIR
)/mk
/package.mk
28 $(eval
$(call PKG_template
,BCM28XX_BOOTLOADER
,bcm28xx-bootloader
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(PKG_DEPENDS
),$(PKG_DESCR
),$(PKG_SECTION
)))
29 $(eval
$(call PKG_template
,BCM28XX_DEBUGTOOL
,bcm28xx-debugtool
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(PKG_DEPENDS
),$(PKG_DESCR
),$(PKGSC_BCM28XX_DEBUGTOOL
)))
33 INSTALL_STYLE
:= manual
35 CMDLINE
:=root
=/dev
/mmcblk0p2 rootfstype
=ext4 rootwait
36 ifeq ($(ADK_APPLIANCE_KODI
),y
)
37 CMDLINE
+=consoleblank
=0 vt.global_cursor_default
=0
39 ifeq ($(ADK_RUNTIME_VERBOSE_KERNEL_SERIAL_ONLY
),y
)
40 CMDLINE
+=console
=ttyAMA0
,$(ADK_RUNTIME_CONSOLE_SERIAL_SPEED
)
42 ifeq ($(ADK_RUNTIME_VERBOSE_KERNEL_VGA_ONLY
),y
)
43 CMDLINE
+=console
=$(ADK_RUNTIME_CONSOLE_VGA_DEVICE
)
45 ifeq ($(ADK_RUNTIME_VERBOSE_KERNEL_SERIAL_VGA
),y
)
46 CMDLINE
+=console
=ttyAMA0
,$(ADK_RUNTIME_CONSOLE_SERIAL_SPEED
) console
=$(ADK_RUNTIME_CONSOLE_VGA_DEVICE
)
48 ifeq ($(ADK_RUNTIME_VERBOSE_KERNEL_VGA_SERIAL
),y
)
49 CMDLINE
+=console
=$(ADK_RUNTIME_CONSOLE_VGA_DEVICE
) console
=ttyAMA0
,$(ADK_RUNTIME_CONSOLE_SERIAL_SPEED
)
53 $(INSTALL_DIR
) $(IDIR_BCM28XX_BOOTLOADER
)/boot
54 $(CP
) $(WRKBUILD
)/boot
/bootcode.bin
$(IDIR_BCM28XX_BOOTLOADER
)/boot
/
55 printf
"$(CMDLINE)\n" > $(IDIR_BCM28XX_BOOTLOADER
)/boot
/cmdline.txt
56 printf
"kernel=kernel\n" > $(IDIR_BCM28XX_BOOTLOADER
)/boot
/config.txt
57 ifeq ($(ADK_PACKAGE_BCM28XX_BOOTLOADER_DEFAULT
),y
)
58 $(CP
) $(WRKBUILD
)/boot
/{start.elf
,fixup.dat
} $(IDIR_BCM28XX_BOOTLOADER
)/boot
/
59 printf
"start_file=start.elf\n" >> $(IDIR_BCM28XX_BOOTLOADER
)/boot
/config.txt
60 printf
"fixup_file=fixup.dat\n" >> $(IDIR_BCM28XX_BOOTLOADER
)/boot
/config.txt
62 ifeq ($(ADK_PACKAGE_BCM28XX_BOOTLOADER_EXTRA
),y
)
63 $(CP
) $(WRKBUILD
)/boot
/{start_x.elf
,fixup_x.dat
} $(IDIR_BCM28XX_BOOTLOADER
)/boot
/
64 printf
"start_file=start_x.elf\n" >> $(IDIR_BCM28XX_BOOTLOADER
)/boot
/config.txt
65 printf
"fixup_file=fixup_x.dat\n" >> $(IDIR_BCM28XX_BOOTLOADER
)/boot
/config.txt
67 ifeq ($(ADK_PACKAGE_BCM28XX_BOOTLOADER_CUTDOWN
),y
)
68 $(CP
) $(WRKBUILD
)/boot
/{start_cd.elf
,fixup_cd.dat
} $(IDIR_BCM28XX_BOOTLOADER
)/boot
/
69 printf
"start_file=start_cd.elf\n" >> $(IDIR_BCM28XX_BOOTLOADER
)/boot
/config.txt
70 printf
"fixup_file=fixup_cd.dat\n" >> $(IDIR_BCM28XX_BOOTLOADER
)/boot
/config.txt
72 printf
"dtparam=i2s=on,spi=on,i2c_arm=on\n" >> \
73 $(IDIR_BCM28XX_BOOTLOADER
)/boot
/config.txt
74 printf
"gpu_mem=$(ADK_TARGET_GPU_MEM)\n" >> \
75 $(IDIR_BCM28XX_BOOTLOADER
)/boot
/config.txt
76 ifneq ($(ADK_KERNEL_SND_BCM2708_SOC_HIFIBERRY_AMP
),)
77 printf
"dtoverlay=hifiberry-amp\n" >> \
78 $(IDIR_BCM28XX_BOOTLOADER
)/boot
/config.txt
80 ifneq ($(ADK_KERNEL_SND_BCM2708_SOC_HIFIBERRY_DAC
),)
81 printf
"dtoverlay=hifiberry-dac\n" >> \
82 $(IDIR_BCM28XX_BOOTLOADER
)/boot
/config.txt
84 ifneq ($(ADK_KERNEL_SND_BCM2708_SOC_HIFIBERRY_DIGI
),)
85 printf
"dtoverlay=hifiberry-digi\n" >> \
86 $(IDIR_BCM28XX_BOOTLOADER
)/boot
/config.txt
88 ifneq ($(ADK_KERNEL_SND_BCM2708_SOC_RPI_DAC
),)
89 printf
"dtoverlay=rpi-dac\n" >> \
90 $(IDIR_BCM28XX_BOOTLOADER
)/boot
/config.txt
92 ifneq ($(ADK_KERNEL_SND_BCM2708_SOC_IQAUDIO_DAC
),)
93 printf
"dtoverlay=iqaudio-dac\n" >> \
94 $(IDIR_BCM28XX_BOOTLOADER
)/boot
/config.txt
96 ifneq ($(ADK_KERNEL_SND_BCM2708_SOC_RPI_PROTO
),)
97 printf
"dtoverlay=rpi-proto\n" >> \
98 $(IDIR_BCM28XX_BOOTLOADER
)/boot
/config.txt
100 ifeq ($(ADK_PACKAGE_BCM28XX_DEBUGTOOL
),y
)
101 $(INSTALL_DIR
) $(IDIR_BCM28XX_DEBUGTOOL
)/opt
/vc
/bin
102 $(INSTALL_BIN
) $(WRKBUILD
)/hardfp
/opt
/vc
/bin
/vcdbg \
103 $(IDIR_BCM28XX_DEBUGTOOL
)/opt
/vc
/bin
106 include $(ADK_TOPDIR
)/mk
/pkg-bottom.mk