Skip to contentSkip to conversation

package/rpi-userland: fix build on 64-bit Raspberry Pi 3

PATCH New Mike Davies 2 participants 3 messages Jun 17, 2020 – Jun 18, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/rpi-userland: fix build on 64-bit Raspberry Pi 3

Prior to this patch it was not possible to select the package rpi-userland if raspberrypi3_64_defconfig was used.
Then the .mk file needed updating to allow 64 bit builds.

---
 package/rpi-userland/Config.in       | 4 ++--
 package/rpi-userland/rpi-userland.mk | 6 ++++++
 2 files changed, 8 insertions(+), 2 deletions(-)
package/rpi-userland/Config.in +2 -2
index 342faf26e3..81f3588822 100644
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_RPI_USERLAND
        bool "rpi-userland"
-       depends on BR2_arm
+       depends on BR2_arm || BR2_aarch64
        depends on BR2_INSTALL_LIBSTDCPP
        depends on BR2_TOOLCHAIN_HAS_THREADS
        depends on !BR2_STATIC_LIBS
@@ -40,6 +40,6 @@ config BR2_PACKAGE_RPI_USERLAND_HELLO
 endif
 
 comment "rpi-userland needs a toolchain w/ C++, threads, dynamic library"
-       depends on BR2_arm
+       depends on BR2_arm || BR2_aarch64
        depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \
                BR2_STATIC_LIBS
package/rpi-userland/rpi-userland.mk +6 -0
index efb02f719f..d8b2a281af 100644
@@ -13,6 +13,12 @@ RPI_USERLAND_CONF_OPTS = -DVMCS_INSTALL_PREFIX=/usr
 
 RPI_USERLAND_PROVIDES = libegl libgles libopenmax libopenvg
 
+ifeq ($(BR2_aarch64),y)
+
+RPI_USERLAND_CONF_OPTS += -DARM64=YES
+
+endif # BR2_aarch64
+
 ifeq ($(BR2_PACKAGE_RPI_USERLAND_HELLO),y)
 
 RPI_USERLAND_CONF_OPTS += -DALL_APPS=ON
Signature · 1 line
2.21.3
#1 lore raw

PATCH 1/1 package/rpi-userland: fix build on 64-bit Raspberry Pi 3

Hello Mike,

Quoted 4 lines · Mike Davies

Prior to this patch it was not possible to select the package rpi-userland if raspberrypi3_64_defconfig was used.
Then the .mk file needed updating to allow 64 bit builds.

There was already some discussion/patch predating yours with this topic in January (see [1]), a test showed that not the complete set of libraries/features are available with the 64-bit build (and therefore all rpi-userland dependencies should be checked)...

One of the latest upstream rpi-userland commits ([2]) reverts part of the 64-bit support...

Which part of the rpi-userland do you use on a 64-bit build?

Regards,
Peter

[1] http://lists.busybox.net/pipermail/buildroot/2020-January/271588.html
[2] https://github.com/raspberrypi/userland/commit/f97b1af1b3e653f9da2c1a3643479bfd469e3b74

Quoted 43 lines
---
 package/rpi-userland/Config.in       | 4 ++--
 package/rpi-userland/rpi-userland.mk | 6 ++++++
 2 files changed, 8 insertions(+), 2 deletions(-)
package/rpi-userland/Config.in +2 -2
index 342faf26e3..81f3588822 100644
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_RPI_USERLAND
        bool "rpi-userland"
-       depends on BR2_arm
+       depends on BR2_arm || BR2_aarch64
        depends on BR2_INSTALL_LIBSTDCPP
        depends on BR2_TOOLCHAIN_HAS_THREADS
        depends on !BR2_STATIC_LIBS
@@ -40,6 +40,6 @@ config BR2_PACKAGE_RPI_USERLAND_HELLO
 endif
 
 comment "rpi-userland needs a toolchain w/ C++, threads, dynamic library"
-       depends on BR2_arm
+       depends on BR2_arm || BR2_aarch64
        depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \
                BR2_STATIC_LIBS
package/rpi-userland/rpi-userland.mk +6 -0
index efb02f719f..d8b2a281af 100644
@@ -13,6 +13,12 @@ RPI_USERLAND_CONF_OPTS = -DVMCS_INSTALL_PREFIX=/usr
 
 RPI_USERLAND_PROVIDES = libegl libgles libopenmax libopenvg
 
+ifeq ($(BR2_aarch64),y)
+
+RPI_USERLAND_CONF_OPTS += -DARM64=YES
+
+endif # BR2_aarch64
+
 ifeq ($(BR2_PACKAGE_RPI_USERLAND_HELLO),y)
 
 RPI_USERLAND_CONF_OPTS += -DALL_APPS=ON
#2 lore raw

PATCH 1/1 package/rpi-userland: fix build on 64-bit Raspberry Pi 3

Hi,

Sorry. I did not see those earlier messages.

I am not using much from rpi-userland, just tvservice to turn off the monitor to save a few milli-Watts of energy

Mike

Quoted 80 lines · Peter Seiderer

Hello Mike,

Quoted 5 lines · Mike Davies

Prior to this patch it was not possible to select the package rpi- userland if
raspberrypi3_64_defconfig was used.
Then the .mk file needed updating to allow 64 bit builds.

There was already some discussion/patch predating yours with this topic in
January (see [1]), a test showed that not the complete set of libraries/features
are available with the 64-bit build (and therefore all rpi-userland dependencies should be checked)...

One of the latest upstream rpi-userland commits ([2]) reverts part of the
64-bit support...

Which part of the rpi-userland do you use on a 64-bit build?

Regards,
Peter

[1]
http://lists.busybox.net/pipermail/buildroot/2020-January/271588.html
[2]
https://github.com/raspberrypi/userland/commit/f97b1af1b3e653f9da2c1a3643479bfd469e3b74

Quoted 48 lines
---
 package/rpi-userland/Config.in       | 4 ++--
 package/rpi-userland/rpi-userland.mk | 6 ++++++
 2 files changed, 8 insertions(+), 2 deletions(-)
package/rpi- renamed from package/rpi-userland/Config.in +0 -0

userland/Config.in
index 342faf26e3..81f3588822 100644

package/rpi-userland/Config.in +1 -1
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_RPI_USERLAND
        bool "rpi-userland"
-       depends on BR2_arm
+       depends on BR2_arm || BR2_aarch64
        depends on BR2_INSTALL_LIBSTDCPP
        depends on BR2_TOOLCHAIN_HAS_THREADS
        depends on !BR2_STATIC_LIBS
@@ -40,6 +40,6 @@ config BR2_PACKAGE_RPI_USERLAND_HELLO
 endif
 
 comment "rpi-userland needs a toolchain w/ C++, threads, dynamic

library"

package/rpi-userland/Config.in +1 -1
-       depends on BR2_arm
+       depends on BR2_arm || BR2_aarch64
        depends on !BR2_INSTALL_LIBSTDCPP ||

!BR2_TOOLCHAIN_HAS_THREADS || \
BR2_STATIC_LIBS

package/rpi- renamed from package/rpi-userland/rpi-userland.mk +0 -0

userland/rpi-userland.mk
index efb02f719f..d8b2a281af 100644

package/rpi-userland/rpi-userland.mk +6 -1
@@ -13,6 +13,12 @@ RPI_USERLAND_CONF_OPTS =
-DVMCS_INSTALL_PREFIX=/usr
 
 RPI_USERLAND_PROVIDES = libegl libgles libopenmax libopenvg
 
+ifeq ($(BR2_aarch64),y)
+
+RPI_USERLAND_CONF_OPTS += -DARM64=YES
+
+endif # BR2_aarch64
+
 ifeq ($(BR2_PACKAGE_RPI_USERLAND_HELLO),y)
 
 RPI_USERLAND_CONF_OPTS += -DALL_APPS=ON