Skip to contentSkip to conversation

Add package raspberrypi-firmware.

PATCH New Marek Belisko 5 participants 7 messages Sep 20, 2012 – Oct 20, 2012 Broadcom BCM2711/BCM2835 Arm architecture

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 Add package raspberrypi-firmware.

Add support for raspberrypi bootloader and VideoCore.

Changes from V1:
- fix names in Config.in (BR2_PACKAGE_BOOTLOADER_ARM192 to BR2_PACKAGE_RASPBERRYPI_BOOTLOADER_ARM192)
- remove unnecessary SOURCE in mk file
- fix installing VideoCore libraries and include
- copy bootloader files directly to images directory
- rework handling selection of GPU & ARM memory split (inspired by Yann patch)
- bump to latest "turbo mode" firmware version
(http://www.raspberrypi.org/archives/2008)

---
 package/Config.in                                  |    1 +
 package/raspberrypi-firmware/Config.in             |   60 ++++++++++++++++++++
 .../raspberrypi-firmware/raspberrypi-firmware.mk   |   37 ++++++++++++
 3 files changed, 98 insertions(+)
 create mode 100644 package/raspberrypi-firmware/Config.in
 create mode 100644 package/raspberrypi-firmware/raspberrypi-firmware.mk
package/Config.in +1 -0
index 58dd5e8..36635cd 100644
@@ -232,6 +232,7 @@ source "package/owl-linux/Config.in"
 source "package/parted/Config.in"
 source "package/pciutils/Config.in"
 source "package/picocom/Config.in"
+source "package/raspberrypi-firmware/Config.in"
 source "package/read-edid/Config.in"
 source "package/rng-tools/Config.in"
 source "package/sane-backends/Config.in"
package/raspberrypi-firmware/Config.in new file +60 -0

60 lines not on this page · raw message

package/raspberrypi-firmware/raspberrypi-firmware.mk new file +37 -0
new file mode 100644
index 0000000..c788497
@@ -0,0 +1,37 @@
+RASPBERRYPI_FIRMWARE_VERSION = 9f7cff0
+RASPBERRYPI_FIRMWARE_SITE = http://github.com/raspberrypi/firmware/tarball/master
+
+ifeq ($(BR2_PACKAGE_RASPBERRYPI_VIDEOCORE),y)
+RASPBERRYPI_FIRMWARE_INSTALL_STAGING = YES
+
+define RASPBERRYPI_FIRMWARE_INSTALL_STAGING_CMDS
+	cp -r -T $(@D)/hardfp/opt/vc/include $(STAGING_DIR)/usr/include
+	cp -r -T $(@D)/hardfp/opt/vc/lib $(STAGING_DIR)/usr/lib
+endef
+
+define RASPBERRYPI_FIRMWARE_INSTALL_TARGET_VIDEOCORE
+	cp -r -T $(@D)/hardfp/opt/vc/bin $(TARGET_DIR)/usr/bin
+	cp -r -T $(@D)/hardfp/opt/vc/lib $(TARGET_DIR)/usr/lib
+	cp -r -T $(@D)/hardfp/opt/vc/sbin $(TARGET_DIR)/usr/sbin
+endef
+endif
+
+ifeq ($(BR2_PACKAGE_RASPBERRYPI_BOOTLOADER),y)
+
+BOOT_FILE = $(call qstrip,$(BR2_PACKAGE_RASPBERRYPI_BOOTLOADER_FILE))
+
+define RASPBERRYPI_FIRMWARE_INSTALL_TARGET_BOOTLOADER
+	install -D -m 0644 $(@D)/boot/$(BOOT_FILE)_start.elf \
+		$(BINARIES_DIR)/start.elf
+	install -D -m 0644 $(@D)/boot/bootcode.bin $(BINARIES_DIR)/bootcode.bin
+	install -D -m 0644 $(@D)/boot/loader.bin $(BINARIES_DIR)/loader.bin
+endef
+endif
+
+define RASPBERRYPI_FIRMWARE_INSTALL_TARGET_CMDS
+	$(RASPBERRYPI_FIRMWARE_INSTALL_TARGET_BOOTLOADER)
+	$(RASPBERRYPI_FIRMWARE_INSTALL_TARGET_VIDEOCORE)
+endef
+
+$(eval $(generic-package))
+
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH v2 1/1 Add package raspberrypi-firmware.

Quoted 4 lines · Marek Belisko

Add support for raspberrypi bootloader and VideoCore.

Still some comments, but these can be fixed while committing, so:

(untested).

There should be a
---
(three dashes on a line by itself) between the SOB and the changelog, otherwise the changelog becomes part of the commit message, which is not what we want.

Quoted 11 lines

Changes from V1:
- fix names in Config.in (BR2_PACKAGE_BOOTLOADER_ARM192 to BR2_PACKAGE_RASPBERRYPI_BOOTLOADER_ARM192)
- remove unnecessary SOURCE in mk file
- fix installing VideoCore libraries and include
- copy bootloader files directly to images directory
- rework handling selection of GPU& ARM memory split (inspired by Yann patch)
- bump to latest "turbo mode" firmware version
(http://www.raspberrypi.org/archives/2008)

[snip]

package/raspberrypi-firmware/Config.in

Quoted 4 lines
package/raspberrypi-firmware/Config.in new file +4 -0
+if BR2_PACKAGE_RASPBERRYPI_BOOTLOADER
+choice
+
+prompt "Memory&  GPU split"

prompt should come immediately below choice (no empty line) and should be
indented with 1 tab.

Quoted 4 lines
package/raspberrypi-firmware/Config.in new file +4 -0
+	default BR2_PACKAGE_RASPBERRYPI_BOOTLOADER_ARM192
+	help
+	  Select how much memory use for system and
+	  how much for GPU.

[snip]

package/raspberrypi-firmware/raspberrypi-firmware.mk line 9

Quoted 6 lines
package/raspberrypi-firmware/raspberrypi-firmware.mk new file +6 -0
+ifeq ($(BR2_PACKAGE_RASPBERRYPI_VIDEOCORE),y)
+RASPBERRYPI_FIRMWARE_INSTALL_STAGING = YES
+
+define RASPBERRYPI_FIRMWARE_INSTALL_STAGING_CMDS
+	cp -r -T $(@D)/hardfp/opt/vc/include $(STAGING_DIR)/usr/include
+	cp -r -T $(@D)/hardfp/opt/vc/lib $(STAGING_DIR)/usr/lib

I would prefer to use

	rsync -a $(@D)/hardfp/opt/vc/include/ $(STAGING_DIR)/usr/include

but that's probably just personal preference.

[snip]

Signature · 6 lines
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
Essensium/Mind                                     http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
#2 lore raw

PATCH v2 1/1 Add package raspberrypi-firmware.

Hi,

just want to ask it this patch is in queue. It's month it was submitted.

---------- Forwarded message ----------
From: Arnout Vandecappelle <[email protected]>
Date: Tue, Oct 2, 2012 at 6:41 PM
Subject: Re: [Buildroot] [PATCH v2] Add package raspberrypi-firmware.
To: Marek Belisko <[email protected]>
Cc: buildroot at busybox.net

Quoted 5 lines · Marek Belisko

Add support for raspberrypi bootloader and VideoCore.

Still some comments, but these can be fixed while committing, so:

(untested).

There should be a
---
(three dashes on a line by itself) between the SOB and the changelog, otherwise the changelog becomes part of the commit message, which is not what we want.

Quoted 12 lines

Changes from V1:
- fix names in Config.in (BR2_PACKAGE_BOOTLOADER_ARM192 to BR2_PACKAGE_RASPBERRYPI_BOOTLOADER_ARM192)
- remove unnecessary SOURCE in mk file
- fix installing VideoCore libraries and include
- copy bootloader files directly to images directory
- rework handling selection of GPU& ARM memory split

(inspired by Yann patch)
- bump to latest "turbo mode" firmware version
(http://www.raspberrypi.org/archives/2008)

[snip]

package/raspberrypi-firmware/Config.in

Quoted 4 lines
package/raspberrypi-firmware/Config.in new file +4 -0
+if BR2_PACKAGE_RASPBERRYPI_BOOTLOADER
+choice
+
+prompt "Memory&  GPU split"

prompt should come immediately below choice (no empty line) and should be
indented with 1 tab.

Quoted 4 lines
package/raspberrypi-firmware/Config.in new file +4 -0
+       default BR2_PACKAGE_RASPBERRYPI_BOOTLOADER_ARM192
+       help
+         Select how much memory use for system and
+         how much for GPU.

[snip]

package/raspberrypi-firmware/raspberrypi-firmware.mk line 9

Quoted 6 lines
package/raspberrypi-firmware/raspberrypi-firmware.mk new file +6 -0
+ifeq ($(BR2_PACKAGE_RASPBERRYPI_VIDEOCORE),y)
+RASPBERRYPI_FIRMWARE_INSTALL_STAGING = YES
+
+define RASPBERRYPI_FIRMWARE_INSTALL_STAGING_CMDS
+       cp -r -T $(@D)/hardfp/opt/vc/include $(STAGING_DIR)/usr/include
+       cp -r -T $(@D)/hardfp/opt/vc/lib $(STAGING_DIR)/usr/lib

I would prefer to use

        rsync -a $(@D)/hardfp/opt/vc/include/ $(STAGING_DIR)/usr/include

but that's probably just personal preference.

[snip]

--

Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
Essensium/Mind                                     http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

Thanks.

Marek

Signature · 10 lines
as simple and primitive as possible
-------------------------------------------------
Marek Belisko - OPEN-NANDRA
Freelance Developer

Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
Tel: +421 915 052 184
skype: marekwhite
twitter: #opennandra
web: http://open-nandra.com
#3 lore raw

PATCH v2 1/1 Add package raspberrypi-firmware.

Quoted 3 lines · Belisko Marek

Hi,

just want to ask it this patch is in queue. It's month it was submitted.

I'd suggest it's probably not worth committing as-is, because this weekend we finally got rid of the multiple start_*.elf files.

Alex

#4 lore raw

PATCH v2 1/1 Add package raspberrypi-firmware.

Hi,

Quoted 7 lines · Alex Bradbury
Quoted 3 lines · Belisko Marek

Hi,

just want to ask it this patch is in queue. It's month it was submitted.

I'd suggest it's probably not worth committing as-is, because this weekend we finally got rid of the multiple start_*.elf files.

OK. I'll resend new version of patch. Thanks for info.

Quoted 2 lines

Alex

Cheers,

marek

Signature · 10 lines
as simple and primitive as possible
-------------------------------------------------
Marek Belisko - OPEN-NANDRA
Freelance Developer

Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
Tel: +421 915 052 184
skype: marekwhite
twitter: #opennandra
web: http://open-nandra.com
#5 lore raw

PATCH v2 1/1 Add package raspberrypi-firmware.

In reply to Alex Bradbury
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Alex" == Alex Bradbury <[email protected]> writes:

Quoted 3 lines · Belisko Marek
Quoted 3 lines

Hi,

just want to ask it this patch is in queue. It's month it was submitted.

Yes, sorry about that. I just started looking at the patch now.

Alex> I'd suggest it's probably not worth committing as-is, because this Alex> weekend we finally got rid of the multiple start_*.elf files.

Ahh, interesting - So how is the memory layout then defined?

Signature · 1 line
Bye, Peter Korsgaard
#6 lore raw

PATCH v2 1/1 Add package raspberrypi-firmware.

Quoted 5 lines · Peter Korsgaard
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Alex" == Alex Bradbury <[email protected]> writes:

Quoted 2 lines · Belisko Marek
Quoted 2 lines

Hi,

Quoted 8 lines
Quoted 1 line
Quoted 1 line

just want to ask it this patch is in queue. It's month it was submitted.

Yes, sorry about that. I just started looking at the patch now.

Alex> I'd suggest it's probably not worth committing as-is, because this Alex> weekend we finally got rid of the multiple start_*.elf files.

Ahh, interesting - So how is the memory layout then defined?

Described here:
https://github.com/raspberrypi/firmware/commit/c57ea9dd367f12bf4fb41b7b86806a2dc6281176

Quoted 3 lines

--
Bye, Peter Korsgaard

Marek

Signature · 10 lines
as simple and primitive as possible
-------------------------------------------------
Marek Belisko - OPEN-NANDRA
Freelance Developer

Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
Tel: +421 915 052 184
skype: marekwhite
twitter: #opennandra
web: http://open-nandra.com