Skip to contentSkip to conversation

Pull request for branch rpi-support

GIT PULL New Maxime Hadjinlian 3 participants 9 messages Jan 5, 2013 – Jan 6, 2013

lore
Share & tools
lore
#0 lore raw

Hello All!

This is the second version of this series adding some specific RaspberryPi packages.
The following changes were applied :

- rpi-fw -> rpi-firmware
- Now appears in Hardware Handling -> Misc devices fimwares
- License fixed
- cmdline.txt files has been merged with config.txt
- rpi-userland
- License fixed
- Applied Samuel Martin's patch to remove most of the cleanup hooks
- Removed libcofi as a dependency

The following changes since commit 00e1e2aaa881b32f388ddcfcc71224b3c574c0b8:

xorg-release: ignore some X.org packages (2013-01-05 23:46:52 +0100)

are available in the git repository at:

http://github.com/maximeh/buildroot.git rpi-support

for you to fetch changes up to 033a0b8264805de1fb670bf727c756b94d4eb34b:

rpi-firmware: New package (2013-01-05 23:46:52 +0100)

----------------------------------------------------------------
Maxime Hadjinlian (3):
libcofi: new package
rpi-userland: new package
rpi-firmware: New package

 package/Config.in                                  |    3 +++
 package/libcofi/Config.in                          |    8 ++++++
 package/libcofi/libcofi.mk                         |   17 +++++++++++++
 package/rpi-firmware/Config.in                     |    9 +++++++
 package/rpi-firmware/config.txt                    |   13 ++++++++++
 package/rpi-firmware/rpi-firmware.mk               |   21 ++++++++++++++++
 package/rpi-userland/Config.in                     |   11 +++++++++
 ...make-vmcs.cmake-allow-to-override-VMCS_IN.patch |   26 ++++++++++++++++++++
 package/rpi-userland/rpi-userland.mk               |   19 ++++++++++++++
 9 files changed, 127 insertions(+)
 create mode 100644 package/libcofi/Config.in
 create mode 100644 package/libcofi/libcofi.mk
 create mode 100644 package/rpi-firmware/Config.in
 create mode 100644 package/rpi-firmware/config.txt
 create mode 100644 package/rpi-firmware/rpi-firmware.mk
 create mode 100644 package/rpi-userland/Config.in
 create mode 100644 package/rpi-userland/rpi-userland-makefiles-cmake-vmcs.cmake-allow-to-override-VMCS_IN.patch
 create mode 100644 package/rpi-userland/rpi-userland.mk

Regards,
Maxime Hadjinlian

--

#1 lore raw

PATCH 1/3 libcofi: new package

replacement for memcpy and memset functionality
This package was originally found at : https://github.com/huceke/buildroot-rbp
By gimli <[email protected]>

---
 package/Config.in          |    1 +
 package/libcofi/Config.in  |    8 ++++++++
 package/libcofi/libcofi.mk |   17 +++++++++++++++++
 3 files changed, 26 insertions(+)
 create mode 100644 package/libcofi/Config.in
 create mode 100644 package/libcofi/libcofi.mk
package/Config.in +1 -0
index 047af8d..9b50f4b 100644
@@ -511,6 +511,7 @@ endmenu
 menu "Other"
 source "package/apr/Config.in"
 source "package/apr-util/Config.in"
+source "package/libcofi/Config.in"
 source "package/classpath/Config.in"
 source "package/fftw/Config.in"
 source "package/libargtable2/Config.in"
package/libcofi/Config.in new file +8 -0
new file mode 100644
index 0000000..b900b69
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_LIBCOFI
+	bool "libcofi"
+	depends on BR2_arm
+	help
+	  A replacement for memcpy and memset functionality for the Raspberry Pi
+	  with the intention of gaining greater performance.
+
+	  https://github.com/simonjhall/copies-and-fills
package/libcofi/libcofi.mk new file +17 -0
new file mode 100644
index 0000000..4872d1c
@@ -0,0 +1,17 @@
+#############################################################
+#
+# libcofi
+#
+#############################################################
+LIBCOFI_VERSION = 7313fbe12b0593034d0a1b606bf33c7cf4ababce
+LIBCOFI_SITE = http://github.com/simonjhall/copies-and-fills/tarball/master
+
+define LIBCOFI_BUILD_CMDS
+    $(MAKE1) AS="$(TARGET_AS)" CC="$(TARGET_CC)" -C $(@D) libcofi_rpi.so
+endef
+
+define LIBCOFI_INSTALL_TARGET_CMDS
+    $(INSTALL) -D -m 0755 $(@D)/libcofi_rpi.so* $(TARGET_DIR)/usr/lib
+endef
+
+$(eval $(generic-package))
Signature · 1 line
1.7.10.4
#2 lore raw

PATCH 1/3 libcofi: new package

Dear Maxime Hadjinlian,

package/libcofi/libcofi.mk line 6

Quoted 12 lines · Maxime Hadjinlian
package/libcofi/libcofi.mk new file +6 -0
new file mode 100644
index 0000000..4872d1c
@@ -0,0 +1,17 @@
+#############################################################
+#
+# libcofi
+#
+#############################################################
+LIBCOFI_VERSION = 7313fbe12b0593034d0a1b606bf33c7cf4ababce

One new line between the first variable line and the #### line.

package/libcofi/libcofi.mk line 7

Quoted 1 line
package/libcofi/libcofi.mk new file +1 -0
+LIBCOFI_SITE = http://github.com/simonjhall/copies-and-fills/tarball/master

LIBCOFI_LICENSE ?

package/libcofi/libcofi.mk line 11

Quoted 3 lines
package/libcofi/libcofi.mk new file +3 -0
+define LIBCOFI_BUILD_CMDS
+    $(MAKE1) AS="$(TARGET_AS)" CC="$(TARGET_CC)" -C $(@D) libcofi_rpi.so
+endef

Seeing the Makefile, I don't see any obvious dependency problem, so I guess you could use $(MAKE) instead of $(MAKE1).

Also, please use $(TARGET_CONFIGURE_OPTS). And you don't need to specify the libcofi_rpi.so target since this is the first target of the Makefile (and hence the default one). So:

	$(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)

package/libcofi/libcofi.mk line 15

Quoted 3 lines
package/libcofi/libcofi.mk new file +3 -0
+define LIBCOFI_INSTALL_TARGET_CMDS
+    $(INSTALL) -D -m 0755 $(@D)/libcofi_rpi.so* $(TARGET_DIR)/usr/lib
+endef

Only libcofi_rpi.so is built, so:

	$(INSTALL) -D -m 0755 $(@D)/libcofi_rpi.so $(TARGET_DIR)/usr/lib/libcofi_rpi.so

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#3 lore raw

PATCH 1/3 libcofi: new package

Quoted 18 lines · Thomas Petazzoni

Dear Maxime Hadjinlian,

package/libcofi/libcofi.mk line 6

Quoted 12 lines · Maxime Hadjinlian
package/libcofi/libcofi.mk new file +6 -0
new file mode 100644
index 0000000..4872d1c
@@ -0,0 +1,17 @@
+#############################################################
+#
+# libcofi
+#
+#############################################################
+LIBCOFI_VERSION = 7313fbe12b0593034d0a1b606bf33c7cf4ababce

One new line between the first variable line and the #### line.

Quoted 3 lines

package/libcofi/libcofi.mk line 7

Quoted 1 line
package/libcofi/libcofi.mk new file +1 -0
+LIBCOFI_SITE = http://github.com/simonjhall/copies-and-fills/tarball/master

LIBCOFI_LICENSE ?

There is absolutely no information whatsoever about license that I could find, so I really did knew what to put there.

Quoted 14 lines

package/libcofi/libcofi.mk line 11

Quoted 4 lines
package/libcofi/libcofi.mk new file +3 -0
+define LIBCOFI_BUILD_CMDS
+    $(MAKE1) AS="$(TARGET_AS)" CC="$(TARGET_CC)" -C $(@D) libcofi_rpi.so
+endef

Seeing the Makefile, I don't see any obvious dependency problem, so I guess you could use $(MAKE) instead of $(MAKE1).

Also, please use $(TARGET_CONFIGURE_OPTS). And you don't need to specify the libcofi_rpi.so target since this is the first target of the Makefile (and hence the default one). So:

        $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)
Quoted 8 lines

package/libcofi/libcofi.mk line 15

Quoted 3 lines
package/libcofi/libcofi.mk new file +3 -0
+define LIBCOFI_INSTALL_TARGET_CMDS
+    $(INSTALL) -D -m 0755 $(@D)/libcofi_rpi.so* $(TARGET_DIR)/usr/lib
+endef

Only libcofi_rpi.so is built, so:

        $(INSTALL) -D -m 0755 $(@D)/libcofi_rpi.so $(TARGET_DIR)/usr/lib/libcofi_rpi.so

Ok

Quoted 6 lines

Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

#4 lore raw

PATCH 1/3 libcofi: new package

Dear Maxime Hadjinlian,

Quoted 3 lines · Maxime Hadjinlian
Quoted 1 line

LIBCOFI_LICENSE ?

There is absolutely no information whatsoever about license that I could find, so I really did knew what to put there.

There is actually a lot of information about the license in the README.md file:

The inner loop of the misalignment path of memcpy is derived from the GNU libc ARM port. As a result "copies-and-fills" is licensed under the GNU Lesser General Public License version 2.1. See
http://www.gnu.org/licenses/ for details. To see the original memcpy, browse it here:
http://sourceware.org/git/?p=glibc-ports.git;a=blob;f=sysdeps/arm/memcpy.S;hb=HEAD

So:
LIBCOFI_LICENSE = LGPLv2.1
LIBCOFI_LICENSE_FILES = README.md

Thanks!

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#5 lore raw

PATCH 2/3 rpi-userland: new package

In reply to Maxime Hadjinlian

Introducing a package to build the userland part of the Raspberry, needed by anyone who would want to build a rootfs for a RaspberryPi.

---
 package/Config.in                                  |    1 +
 package/rpi-userland/Config.in                     |   11 +++++++++
 ...make-vmcs.cmake-allow-to-override-VMCS_IN.patch |   26 ++++++++++++++++++++
 package/rpi-userland/rpi-userland.mk               |   19 ++++++++++++++
 4 files changed, 57 insertions(+)
 create mode 100644 package/rpi-userland/Config.in
 create mode 100644 package/rpi-userland/rpi-userland-makefiles-cmake-vmcs.cmake-allow-to-override-VMCS_IN.patch
 create mode 100644 package/rpi-userland/rpi-userland.mk
package/Config.in +1 -0
index 9b50f4b..17205fe 100644
@@ -580,6 +580,7 @@ source "package/collectd/Config.in"
 source "package/empty/Config.in"
 source "package/googlefontdirectory/Config.in"
 source "package/mobile-broadband-provider-info/Config.in"
+source "package/rpi-userland/Config.in"
 source "package/shared-mime-info/Config.in"
 source "package/snowball-init/Config.in"
 source "package/sound-theme-borealis/Config.in"
package/rpi-userland/Config.in new file +11 -0
new file mode 100644
index 0000000..b596a36
@@ -0,0 +1,11 @@
+config BR2_PACKAGE_RPI_USERLAND
+	bool "rpi-userland"
+	help
+	  Raspberry Pi Userland contains the necessary library to use the
+	  VideoCore driver.
+
+	  Includes source for the ARM side code to interface to: 
+	  EGL, mmal, GLESv2, vcos, openmaxil, vchiq_arm, bcm_host, WFC, OpenVG.
+
+	  https://github.com/raspberrypi/userland/
+
package/rpi-userland/rpi-userland-makefiles-cmake-vmcs.cmake-allow-to-override-VMCS_IN.patch new file +26 -0
new file mode 100644
index 0000000..e54d29e
@@ -0,0 +1,26 @@
+From fec2560cfcb8d3398e4f1ccc3de7923365873676 Mon Sep 17 00:00:00 2001
+From: Samuel Martin <[email protected]>
+Date: Sat, 5 Jan 2013 16:04:55 +0100
+Subject: [PATCH] makefiles/cmake/vmcs.cmake: allow to override
+ VMCS_INSTALL_PREFIX
+
+Signed-off-by: Samuel Martin <[email protected]>
+---
+ makefiles/cmake/vmcs.cmake | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/makefiles/cmake/vmcs.cmake b/makefiles/cmake/vmcs.cmake
+index 0f8641b..cc70cca 100644
+--- a/makefiles/cmake/vmcs.cmake
++++ b/makefiles/cmake/vmcs.cmake
+@@ -9,7 +9,7 @@ INCLUDE(CPack)
+ # Where shall we install?
+ if (ANDROID)
+   SET(VMCS_INSTALL_PREFIX "/vendor/brcm/islands" CACHE PATH "Prefix prepended to install directories" FORCE)
+-else()
++elseif(NOT DEFINED VMCS_INSTALL_PREFIX)
+   SET(VMCS_INSTALL_PREFIX "/opt/vc" CACHE PATH "Prefix prepended to install directories" FORCE)
+ endif()
+ 
+-- 
+1.8.1
package/rpi-userland/rpi-userland.mk new file +19 -0
new file mode 100644
index 0000000..2b919ea
@@ -0,0 +1,19 @@
+#############################################################
+#
+# rpi-userland
+#
+#############################################################
+RPI_USERLAND_VERSION = 9852ce28826889e50c4d6786b942f51bccccac54
+RPI_USERLAND_SITE = http://github.com/raspberrypi/userland/tarball/master
+RPI_USERLAND_LICENSE = BSD-3c
+RPI_USERLAND_LICENSE_FILE = LICENCE
+RPI_USERLAND_INSTALL_STAGING = YES
+RPI_USERLAND_CONF_OPT = -DVMCS_INSTALL_PREFIX=/usr
+
+define RPI_USERLAND_POST_TARGET_CLEANUP
+    rm -Rf $(TARGET_DIR)/usr/src
+endef
+
+RPI_USERLAND_POST_INSTALL_TARGET_HOOKS += RPI_USERLAND_POST_TARGET_CLEANUP
+
+$(eval $(cmake-package))
Signature · 1 line
1.7.10.4
#6 lore raw

PATCH 3/3 rpi-firmware: New package

In reply to Maxime Hadjinlian

Introducing a package to install pre-built binaries for the bootloader and the GPU firmware for the RaspberryPi board.

---
 package/Config.in                    |    1 +
 package/rpi-firmware/Config.in       |    9 +++++++++
 package/rpi-firmware/config.txt      |   13 +++++++++++++
 package/rpi-firmware/rpi-firmware.mk |   21 +++++++++++++++++++++
 4 files changed, 44 insertions(+)
 create mode 100644 package/rpi-firmware/Config.in
 create mode 100644 package/rpi-firmware/config.txt
 create mode 100644 package/rpi-firmware/rpi-firmware.mk
package/Config.in +1 -0
index 17205fe..30c39ac 100644
@@ -202,6 +202,7 @@ menu "Hardware handling"
 menu "Misc devices firmwares"
 source "package/b43-firmware/Config.in"
 source "package/linux-firmware/Config.in"
+source "package/rpi-firmware/Config.in"
 source "package/ux500-firmware/Config.in"
 source "package/zd1211-firmware/Config.in"
 endmenu
package/rpi-firmware/Config.in new file +9 -0
new file mode 100644
index 0000000..5723dea
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_RPI_FIRMWARE
+	bool "RaspberryPi Firmware"
+	depends on BR2_arm
+	help
+	  RaspberryPi Firmware
+	  Pre-compiled binaries of the current bootloader and GPU firmware
+
+	  https://github.com/raspberrypi/firmware
+
package/rpi-firmware/config.txt new file +13 -0
new file mode 100644
index 0000000..14d320d
@@ -0,0 +1,13 @@
+# Please note that this is only a sample, we recommend you to change it to fit
+# your needs.
+# You should override this file using a post-build script.
+# See http://buildroot.uclibc.org/downloads/manual/manual.html#rootfs-custom 
+
+arm_freq=700
+core_freq=250
+disable_overscan=1
+gpu_mem_256=100
+gpu_mem_512=100
+sdram_freq=400
+over_voltage=0
+cmdline="dwc_otg.fiq_fix_enable=1 sdhci-bcm2708.sync_after_dma=0 dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait"
package/rpi-firmware/rpi-firmware.mk new file +21 -0
new file mode 100644
index 0000000..74a7409
@@ -0,0 +1,21 @@
+#############################################################
+#
+# rpi-firmware
+#
+#############################################################
+RPI_FIRMWARE_VERSION = 76d0ac38f16b6343c6155c80db1e4758b3a5838a
+RPI_FIRMWARE_SITE = http://github.com/raspberrypi/firmware/tarball/master
+RPI_FIRMWARE_LICENSE = BSD-3c
+RPI_FIRMWARE_LICENSE_FILE = boot/LICENCE.broadcom
+
+define RPI_FIRMWARE_INSTALL_TARGET_CMDS
+	$(INSTALL) -D -m 0644 $(@D)/boot/bootcode.bin $(TARGET_DIR)/boot/
+	$(INSTALL) -D -m 0644 $(@D)/boot/start.elf $(TARGET_DIR)/boot/
+	$(INSTALL) -D -m 0644 $(@D)/boot/start_cd.elf $(TARGET_DIR)/boot/
+	$(INSTALL) -D -m 0644 $(@D)/boot/fixup.dat $(TARGET_DIR)/boot/
+	$(INSTALL) -D -m 0644 $(@D)/boot/fixup_cd.dat $(TARGET_DIR)/boot/
+	$(INSTALL) -D -m 0644 package/rpi-fw/cmdline.txt $(TARGET_DIR)/boot/
+	$(INSTALL) -D -m 0644 package/rpi-fw/config.txt $(TARGET_DIR)/boot/
+endef
+
+$(eval $(generic-package))
Signature · 1 line
1.7.10.4
#7 lore raw

PATCH 3/3 rpi-firmware: New package

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

Quoted 4 lines · Maxime Hadjinlian
package/rpi-firmware/rpi-firmware.mk new file +4 -0
+RPI_FIRMWARE_VERSION = 76d0ac38f16b6343c6155c80db1e4758b3a5838a
+RPI_FIRMWARE_SITE = http://github.com/raspberrypi/firmware/tarball/master
+RPI_FIRMWARE_LICENSE = BSD-3c
+RPI_FIRMWARE_LICENSE_FILE = boot/LICENCE.broadcom

Although at a glance the licence file looks like 3-clause BSD (which the licence for the Raspberry Pi 'userland' code is), it's actually not. It only allows distribution without modification and has the condition "This software may only be used for the purposes of developing for, running or using a Raspberry Pi device." The license is of course derived from the BSD license, and looks pretty similar to the license Intel uses for various wlan firmware.

Regards,

Alex

#8 lore raw

PATCH 3/3 rpi-firmware: New package

Quoted 13 lines · Alex Bradbury

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

Quoted 4 lines · Maxime Hadjinlian
package/rpi-firmware/rpi-firmware.mk new file +4 -0
+RPI_FIRMWARE_VERSION = 76d0ac38f16b6343c6155c80db1e4758b3a5838a
+RPI_FIRMWARE_SITE = http://github.com/raspberrypi/firmware/tarball/master
+RPI_FIRMWARE_LICENSE = BSD-3c
+RPI_FIRMWARE_LICENSE_FILE = boot/LICENCE.broadcom

Although at a glance the licence file looks like 3-clause BSD (which the licence for the Raspberry Pi 'userland' code is), it's actually not. It only allows distribution without modification and has the condition "This software may only be used for the purposes of developing for, running or using a Raspberry Pi device." The license is of course derived from the BSD license, and looks pretty similar to the license Intel uses for various wlan firmware.

So what should be put as a license for this package then ? I'm actually pretty ignorant on the subject I must say.

Quoted 4 lines

Regards,

Alex