Skip to contentSkip to conversation

odroid-mali: New Package

PATCH New Dagg Stompler 3 participants 5 messages Jun 9, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 odroid-mali: New Package

---
 package/Config.in                        |   1 +
 package/odroid-mali/10-odroidc2_fb.rules |   8 ++
 package/odroid-mali/Config.in            |  20 +++++
 package/odroid-mali/S50odroidc2_fb       |  20 +++++
 package/odroid-mali/odroid-mali.hash     |   3 +
 package/odroid-mali/odroid-mali.mk       |  56 ++++++++++++++
 package/odroid-mali/odroidc2_fb.service  |  14 ++++
 package/odroid-mali/odroidc2_init_fb.sh  | 125 +++++++++++++++++++++++++++++++
 8 files changed, 247 insertions(+)
 create mode 100644 package/odroid-mali/10-odroidc2_fb.rules
 create mode 100644 package/odroid-mali/Config.in
 create mode 100644 package/odroid-mali/S50odroidc2_fb
 create mode 100644 package/odroid-mali/odroid-mali.hash
 create mode 100644 package/odroid-mali/odroid-mali.mk
 create mode 100644 package/odroid-mali/odroidc2_fb.service
 create mode 100644 package/odroid-mali/odroidc2_init_fb.sh
package/Config.in +1 -0
index 0cb2e7e..de9573e 100644
@@ -420,6 +420,7 @@ endif
 	source "package/nvidia-driver/Config.in"
 	source "package/nvidia-tegra23/Config.in"
 	source "package/nvme/Config.in"
+	source "package/odroid-mali/Config.in"
 	source "package/ofono/Config.in"
 	source "package/ola/Config.in"
 	source "package/on2-8170-modules/Config.in"
package/odroid-mali/10-odroidc2_fb.rules new file +8 -0
new file mode 100644
index 0000000..e0374af
@@ -0,0 +1,8 @@
+# Mali Rules
+KERNEL=="mali",SUBSYSTEM=="misc",MODE="0777"
+KERNEL=="ump",SUBSYSTEM=="ump",MODE="0777"
+
+# Misc video rules
+KERNEL=="event*", SUBSYSTEM=="input", MODE="0777"
+KERNEL=="CEC", MODE="0777"
+KERNEL=="am*", MODE="0666"
package/odroid-mali/Config.in new file +20 -0
new file mode 100644
index 0000000..ea93159
@@ -0,0 +1,20 @@
+config BR2_PACKAGE_ODROID_MALI
+	bool "odroid-mali"
+	select BR2_PACKAGE_HAS_LIBEGL
+	select BR2_PACKAGE_HAS_LIBGLES
+	select BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
+	select BR2_PACKAGE_FBSET
+	depends on BR2_TOOLCHAIN_USES_GLIBC
+	depends on BR2_aarch64 || BR2_arm
+	help
+	  Install the ARM Mali drivers for odroidc2 based systems.
+
+	  https://github.com/mdrjr/c2_mali
+
+if BR2_PACKAGE_ODROID_MALI
+config BR2_PACKAGE_PROVIDES_LIBEGL
+	default "odroid-mali"
+
+config BR2_PACKAGE_PROVIDES_LIBGLES
+	default "odroid-mali"
+endif
package/odroid-mali/S50odroidc2_fb new file +20 -0
new file mode 100644
index 0000000..2aae59d
@@ -0,0 +1,20 @@
+#!/bin/sh
+#
+# Set up frame buffer
+#
+
+case "$1" in
+    start)
+        echo "Setting up display..."
+        /usr/sbin/odroidc2_init_fb.sh
+        ;;
+    stop)
+        ;;
+    restart|reload)
+        ;;
+    *)
+        echo "Usage: $0 {start|stop|restart}"
+        exit 1
+esac
+
+exit $?
package/odroid-mali/odroid-mali.hash new file +3 -0
new file mode 100644
index 0000000..7e6859a
@@ -0,0 +1,3 @@
+# locally computed hash
+sha256 122fe75fc105fc2f7c00b7f075deca567f6a3e56b5c128b00cf3096073b96e66  odroid-mali-4a34d59cd6120db67dc11023344e382afbaf28da.tar.gz
+sha256 29d98ed4b8694b860d9289787c416faa847b0de26d36580a53add1752b4c2e9a  odroid-mali-46fe49f37e3506c6205ad8c50980eca9bfff11e3.tar.gz
package/odroid-mali/odroid-mali.mk new file +56 -0

56 lines not on this page · raw message

package/odroid-mali/odroidc2_fb.service new file +14 -0
new file mode 100644
index 0000000..5a0b508
@@ -0,0 +1,14 @@
+[Unit]
+Description="ODROID-C2 Amlogic Display Configuration"
+
+DefaultDependencies=no
+Requires=sysinit.target
+After=sysinit.target
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/odroidc2_init_fb.sh
+
+[Install]
+WantedBy=basic.target
+WantedBy=sysinit.target
package/odroid-mali/odroidc2_init_fb.sh new file +125 -0

125 lines not on this page · raw message

Signature · 1 line
2.8.3
#1 lore raw

PATCH 1/1 odroid-mali: New Package

Hello,

Thanks for re-submitting with your full name, we can now merge your patches! \o/

Quoted 11 lines · Dagg Stompler
---
 package/Config.in                        |   1 +
 package/odroid-mali/10-odroidc2_fb.rules |   8 ++
 package/odroid-mali/Config.in            |  20 +++++
 package/odroid-mali/S50odroidc2_fb       |  20 +++++
 package/odroid-mali/odroid-mali.hash     |   3 +
 package/odroid-mali/odroid-mali.mk       |  56 ++++++++++++++
 package/odroid-mali/odroidc2_fb.service  |  14 ++++
 package/odroid-mali/odroidc2_init_fb.sh  | 125 +++++++++++++++++++++++++++++++
 8 files changed, 247 insertions(+)

There is one thing I'm not really happy with however: this package is mixing installing the OpenGL implementation (for the GPU) with the initialization of the display.

Wouldn't it make more sense to have one package for the OpenGL implementation, and one package installing all the init scripts and udev rules related to the display? (Attention: some udev rules are needed for the GPU).

Another thing that bothers me is that it's called "odroid-mali", where "odroid" is the name of the board. I really find it weird that an OpenGL implementation is board specific. It should be SoC specific for sure, but not board-specific. If there are other Amlogic S905 SoC boards added in Buildroot, wouldn't they be able to use the same OpenGL implementation ?

That being said, we already have rpi-userland for RPi, but well, RPi is the only board that will ever be made with this funky Broadcom SoC.

But in the Allwinner land, we have the sunxi-mali package, which works with various boards.

But maybe I'm being too annoying with this aspect: this OpenGL stuff is usually a big mess, so it's probably fine if we have a odroid-mali package.

But I would nonetheless like to have the thing split in two packages.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
author
#2 lore raw

PATCH 1/1 odroid-mali: New Package

Greetings,

Quoted 5 lines

Hello,

Thanks for re-submitting with your full name, we can now merge your patches! \o/

I've found out that patches which I've sent to my distros were merged as is to their repo so oking it there and not here is illogical.

Quoted 13 lines · Dagg Stompler
Quoted 11 lines
---
 package/Config.in                        |   1 +
 package/odroid-mali/10-odroidc2_fb.rules |   8 ++
 package/odroid-mali/Config.in            |  20 +++++
 package/odroid-mali/S50odroidc2_fb       |  20 +++++
 package/odroid-mali/odroid-mali.hash     |   3 +
 package/odroid-mali/odroid-mali.mk       |  56 ++++++++++++++
 package/odroid-mali/odroidc2_fb.service  |  14 ++++
 package/odroid-mali/odroidc2_init_fb.sh  | 125 +++++++++++++++++++++++++++++++
 8 files changed, 247 insertions(+)
Quoted 4 lines

There is one thing I'm not really happy with however: this package is mixing installing the OpenGL implementation (for the GPU) with the initialization of the display.

I've modeled the code after the sunxi-mali driver.
I assumed that if it was good enough to get into buildroot, I can use it as tamplate.

Quoted 5 lines

Wouldn't it make more sense to have one package for the OpenGL implementation, and one package installing all the init scripts and udev rules related to the display? (Attention: some udev rules are needed for the GPU).

is there such package I can use as tamplate?

Quoted 7 lines

Another thing that bothers me is that it's called "odroid-mali", where "odroid" is the name of the board. I really find it weird that an OpenGL implementation is board specific. It should be SoC specific for sure, but not board-specific. If there are other Amlogic S905 SoC boards added in Buildroot, wouldn't they be able to use the same OpenGL implementation ?

afaik, the implementation is vendor specific, e.g. we don't have the code, the vendor (hardkernel) provides the lib file and headers. odroid is the name of the product line, there are odroid c{0,1,1+ and 2}. also there are u and x models I think. this implementation is specific to the c2 boards I assume it can retrofitted for other boards.
the main change it will need is the files url change as.

Quoted 12 lines

That being said, we already have rpi-userland for RPi, but well, RPi is the only board that will ever be made with this funky Broadcom SoC.

But in the Allwinner land, we have the sunxi-mali package, which works with various boards.

But maybe I'm being too annoying with this aspect: this OpenGL stuff is usually a big mess, so it's probably fine if we have a odroid-mali package.

But I would nonetheless like to have the thing split in two packages.

one of my previous patches added all the scripts in the overlay root fs but Eric said it isn't a good idea.

I think that the scripts beside the udev rule configures the fb and aren't directly tied to the opengl

Dagg.

#3 lore raw

PATCH 1/1 odroid-mali: New Package

Hi all!

Le Thu, 9 Jun 2016 10:35:36 +0200,
daggs <[email protected]> a ?crit :

Quoted 7 lines
Quoted 7 lines

Another thing that bothers me is that it's called "odroid-mali", where "odroid" is the name of the board. I really find it weird that an OpenGL implementation is board specific. It should be SoC specific for sure, but not board-specific. If there are other Amlogic S905 SoC boards added in Buildroot, wouldn't they be able to use the same OpenGL implementation ?

Quoted 6 lines

afaik, the implementation is vendor specific, e.g. we don't have the code, the vendor (hardkernel) provides the lib file and headers. odroid is the name of the product line, there are odroid c{0,1,1+ and 2}. also there are u and x models I think. this implementation is specific to the c2 boards I assume it can retrofitted for other boards. the main change it will need is the files url change as.

From the vendor website, we can see that odroid-c1+ and odroid-c2 have the same GPU (MALI 450). So maybe the "odroidc2_fb*" files could be renamed to "odroid_fb*" (if needed, tweaking according to the machine could be performed in the helper script).

Quoted 7 lines
Quoted 7 lines

That being said, we already have rpi-userland for RPi, but well, RPi is the only board that will ever be made with this funky Broadcom SoC.

But in the Allwinner land, we have the sunxi-mali package, which works with various boards.

Quoted 8 lines
Quoted 6 lines

But maybe I'm being too annoying with this aspect: this OpenGL stuff is usually a big mess, so it's probably fine if we have a odroid-mali package.

But I would nonetheless like to have the thing split in two packages.

one of my previous patches added all the scripts in the overlay root fs but Eric said it isn't a good idea.

As the display is to be set up via a service managed by the init system, it seemed logical to me to provide the script and the service files in a package to benefit from the helper for service installation (when using an overlay, a plain copy is performed, so you will end up with a systemd service file on a SysV-based system and vice-versa).

The sunxi-mali package does provide a service file for SysV: S80mali.

But maybe it will be better to provide the script, services files and rules in a package named "odroid-board" or "odroid-userspace" (as there is "sunix-board" and "rpi-userland").

Regards,

Signature · 1 line
ELB
author
#4 lore raw

PATCH 1/1 odroid-mali: New Package

Greetings,

Quoted 20 lines

Hi all!

Le Thu, 9 Jun 2016 10:35:36 +0200,
daggs <[email protected]> a ?crit :

Quoted 7 lines
Quoted 7 lines

Another thing that bothers me is that it's called "odroid-mali", where "odroid" is the name of the board. I really find it weird that an OpenGL implementation is board specific. It should be SoC specific for sure, but not board-specific. If there are other Amlogic S905 SoC boards added in Buildroot, wouldn't they be able to use the same OpenGL implementation ?

Quoted 6 lines

afaik, the implementation is vendor specific, e.g. we don't have the code, the vendor (hardkernel) provides the lib file and headers. odroid is the name of the product line, there are odroid c{0,1,1+ and 2}. also there are u and x models I think. this implementation is specific to the c2 boards I assume it can retrofitted for other boards. the main change it will need is the files url change as.

Quoted 4 lines

From the vendor website, we can see that odroid-c1+ and odroid-c2 have the same GPU (MALI 450). So maybe the "odroidc2_fb*" files could be renamed to "odroid_fb*" (if needed, tweaking according to the machine could be performed in the helper script).

I'd rather not guess something that I cannot be tested.

Quoted 23 lines
Quoted 8 lines
Quoted 8 lines

That being said, we already have rpi-userland for RPi, but well, RPi is the only board that will ever be made with this funky Broadcom SoC.

But in the Allwinner land, we have the sunxi-mali package, which works with various boards.

Quoted 8 lines
Quoted 6 lines

But maybe I'm being too annoying with this aspect: this OpenGL stuff is usually a big mess, so it's probably fine if we have a odroid-mali package.

But I would nonetheless like to have the thing split in two packages.

one of my previous patches added all the scripts in the overlay root fs but Eric said it isn't a good idea.

As the display is to be set up via a service managed by the init system, it seemed logical to me to provide the script and the service files in a package to benefit from the helper for service installation (when using an overlay, a plain copy is performed, so you will end up with a systemd service file on a SysV-based system and vice-versa).

Quoted 6 lines

The sunxi-mali package does provide a service file for SysV: S80mali.

But maybe it will be better to provide the script, services files and rules in a package named "odroid-board" or "odroid-userspace" (as there is "sunix-board" and "rpi-userland").

just did that (different name).
I think "odroid-userspace" is a better name than all of the possibilities.

Dagg.