2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2013-01-06 11:56:22 +01:00
|
|
|
#
|
|
|
|
# rpi-firmware
|
|
|
|
#
|
2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2013-01-06 11:56:22 +01:00
|
|
|
|
2015-01-01 21:23:47 +01:00
|
|
|
RPI_FIRMWARE_VERSION = 393dcc0e76f18f6ac1b67ba45d36058410670034
|
2013-12-05 18:20:46 +01:00
|
|
|
RPI_FIRMWARE_SITE = $(call github,raspberrypi,firmware,$(RPI_FIRMWARE_VERSION))
|
2013-01-06 11:56:22 +01:00
|
|
|
RPI_FIRMWARE_LICENSE = BSD-3c
|
2013-05-08 03:34:21 +02:00
|
|
|
RPI_FIRMWARE_LICENSE_FILES = boot/LICENCE.broadcom
|
2015-01-01 21:23:50 +01:00
|
|
|
RPI_FIRMWARE_INSTALL_TARGET = NO
|
|
|
|
RPI_FIRMWARE_INSTALL_IMAGES = YES
|
2013-01-06 11:56:22 +01:00
|
|
|
|
2015-01-01 21:23:50 +01:00
|
|
|
define RPI_FIRMWARE_INSTALL_IMAGES_CMDS
|
2013-01-06 11:56:22 +01:00
|
|
|
$(INSTALL) -D -m 0644 $(@D)/boot/bootcode.bin $(BINARIES_DIR)/rpi-firmware/bootcode.bin
|
2013-12-02 21:49:28 +01:00
|
|
|
$(INSTALL) -D -m 0644 $(@D)/boot/start$(BR2_PACKAGE_RPI_FIRMWARE_BOOT).elf $(BINARIES_DIR)/rpi-firmware/start.elf
|
|
|
|
$(INSTALL) -D -m 0644 $(@D)/boot/fixup$(BR2_PACKAGE_RPI_FIRMWARE_BOOT).dat $(BINARIES_DIR)/rpi-firmware/fixup.dat
|
2013-01-06 11:56:22 +01:00
|
|
|
$(INSTALL) -D -m 0644 package/rpi-firmware/config.txt $(BINARIES_DIR)/rpi-firmware/config.txt
|
2013-06-06 14:23:05 +02:00
|
|
|
$(INSTALL) -D -m 0644 package/rpi-firmware/cmdline.txt $(BINARIES_DIR)/rpi-firmware/cmdline.txt
|
2013-01-06 11:56:22 +01:00
|
|
|
endef
|
|
|
|
|
package/rpi-firmware: add DT-aware marking script
The Raspberry Pi can boot a kernel with device tree support. But at the
same time, the RPi folks wante to keep the old-fashioned, ATAG-based way
of booting (don't ask...).
So, the bootloader needs to know whether the kernel it is loading has DT
support or not. For that, it looks at the end of the kernel image for a
magic footer. If found, it loads a device tree and sets the registers
appropriately so that the kernel finds the DTB. If not found, it loads
the kernel with the traditional ATAGS.
Where it becomes a bit tricky, is that the DTB is different for models
A/B and A+/B+ (that is A and B use the same DTB, while the A+ and B+ use
a second DTB). The bootloader is capable to load the correct DTB from a
specially named file. That is:
- on A/B, it loads bcm2708-rpi-b.dtb
- on A+/B+, it loads bcm2708-rpi-b-plus.dtb
If the DTB is differently named, the bootloader won't find it, will not
load any DTB at all, and revert to booting with ATAGS.
It is possible to specify what DTB to load, by adding an new config
option 'device_tree=file.dtb' in config.txt, but then the firmware on
the SDcard is no longer bootable on both the original models and the
Plus models.
So, add a script that appends the appropriate footer to the kernel
image. The script is vampirised from the RPi's tools repository, but a
new package is *not* added just for that script: the whole repository is
300+ MiB, and a checkout is 600+ MiB; it is not pertinent to add this as
a new package for a script that weights a few KiB...
Install that script as a host utility, too.
Notes: lots of information is available in this thread on the RPi forums:
http://www.raspberrypi.org/forums/viewtopic.php?f=29&t=93015
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-01-09 23:46:19 +01:00
|
|
|
# We have no host sources to get, since we already
|
|
|
|
# bundle the script we want to install.
|
|
|
|
HOST_RPI_FIRMWARE_SOURCE =
|
|
|
|
HOST_RPI_FIRMWARE_DEPENDENCIES =
|
|
|
|
|
|
|
|
define HOST_RPI_FIRMWARE_INSTALL_CMDS
|
|
|
|
$(INSTALL) -D -m 0755 package/rpi-firmware/mkknlimg $(HOST_DIR)/usr/bin/mkknlimg
|
|
|
|
endef
|
|
|
|
|
2013-01-06 11:56:22 +01:00
|
|
|
$(eval $(generic-package))
|
package/rpi-firmware: add DT-aware marking script
The Raspberry Pi can boot a kernel with device tree support. But at the
same time, the RPi folks wante to keep the old-fashioned, ATAG-based way
of booting (don't ask...).
So, the bootloader needs to know whether the kernel it is loading has DT
support or not. For that, it looks at the end of the kernel image for a
magic footer. If found, it loads a device tree and sets the registers
appropriately so that the kernel finds the DTB. If not found, it loads
the kernel with the traditional ATAGS.
Where it becomes a bit tricky, is that the DTB is different for models
A/B and A+/B+ (that is A and B use the same DTB, while the A+ and B+ use
a second DTB). The bootloader is capable to load the correct DTB from a
specially named file. That is:
- on A/B, it loads bcm2708-rpi-b.dtb
- on A+/B+, it loads bcm2708-rpi-b-plus.dtb
If the DTB is differently named, the bootloader won't find it, will not
load any DTB at all, and revert to booting with ATAGS.
It is possible to specify what DTB to load, by adding an new config
option 'device_tree=file.dtb' in config.txt, but then the firmware on
the SDcard is no longer bootable on both the original models and the
Plus models.
So, add a script that appends the appropriate footer to the kernel
image. The script is vampirised from the RPi's tools repository, but a
new package is *not* added just for that script: the whole repository is
300+ MiB, and a checkout is 600+ MiB; it is not pertinent to add this as
a new package for a script that weights a few KiB...
Install that script as a host utility, too.
Notes: lots of information is available in this thread on the RPi forums:
http://www.raspberrypi.org/forums/viewtopic.php?f=29&t=93015
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-01-09 23:46:19 +01:00
|
|
|
$(eval $(host-generic-package))
|