diff mbox

[2,of,2] Introduction of Amlogic platform to buildroot

Message ID l53633$d6q$3@ger.gmane.org
State Changes Requested
Headers show

Commit Message

Stanislav Vasic Nov. 2, 2013, 3:35 p.m. UTC
From 674615f2986c928cadd122377bbb4254192f5923 Mon Sep 17 00:00:00 2001
From: Stanislav Vasic <svlasic@gmail.com>
Date: Sat, 2 Nov 2013 16:07:38 +0100
Subject: [PATCH] Introduce Amlogic MX platform to buildroot

Target platform options submenu added, currently used
only for setting up proper configuration of buildroot
for Amlogic MX platform.
---
 arch/Config.in.arm | 39 ++++++++++++++++++++++++++++++++++++++-
 1 file changed, 38 insertions(+), 1 deletion(-)

 	bool "ARM"

Comments

Thomas Petazzoni Nov. 2, 2013, 3:54 p.m. UTC | #1
Dear Stanislav Vasic,

On Sat, 2 Nov 2013 15:35:00 +0000 (UTC), Stanislav Vasic wrote:
> From 674615f2986c928cadd122377bbb4254192f5923 Mon Sep 17 00:00:00 2001
> From: Stanislav Vasic <svlasic@gmail.com>
> Date: Sat, 2 Nov 2013 16:07:38 +0100
> Subject: [PATCH] Introduce Amlogic MX platform to buildroot
> 
> Target platform options submenu added, currently used
> only for setting up proper configuration of buildroot
> for Amlogic MX platform.

I'm afraid, but we don't want to have per-SoC options in Buildroot. We
have discussed this in the past, and there are way too many ARM SoC to
make this reasonable. Why is this patch needed at all?

For all other ARM platforms, the user simply has to choose the
appropriate ARM core (Cortex-A8, Cortex-A9, Cortex-A15, etc.), and
that's it. We also provide default configurations (see the configs/
directory) for various well-known hardware platforms, and those
configurations correctly define which ARM core should be used.

Best regards,

Thomas
Stanislav Vasic Nov. 2, 2013, 4:10 p.m. UTC | #2
On Sat, 02 Nov 2013 16:54:59 +0100, Thomas Petazzoni wrote:

> Dear Stanislav Vasic,
> 
> On Sat, 2 Nov 2013 15:35:00 +0000 (UTC), Stanislav Vasic wrote:
>> From 674615f2986c928cadd122377bbb4254192f5923 Mon Sep 17 00:00:00 2001
>> From: Stanislav Vasic <svlasic@gmail.com>
>> Date: Sat, 2 Nov 2013 16:07:38 +0100 Subject: [PATCH] Introduce Amlogic
>> MX platform to buildroot
>> 
>> Target platform options submenu added, currently used only for setting
>> up proper configuration of buildroot for Amlogic MX platform.
> 
> I'm afraid, but we don't want to have per-SoC options in Buildroot. We
> have discussed this in the past, and there are way too many ARM SoC to
> make this reasonable. Why is this patch needed at all?

Hi,

That is what I was told yesterday (about adding it). Amlogic buildroot is 
too complicated and it's used mainly for running XBMC on top of buildroot. 
I agree there are too many things (such as non-standard opengl drivers, 
Amlogic property a/v libraries...).

Patch is needed so we know we're building for Amlogic SoC, and for other 
packages to know which eg. opengl or a/v libs to include in build.

> For all other ARM platforms, the user simply has to choose the
> appropriate ARM core (Cortex-A8, Cortex-A9, Cortex-A15, etc.), and
> that's it. We also provide default configurations (see the configs/
> directory) for various well-known hardware platforms, and those
> configurations correctly define which ARM core should be used.

See above, at this point it's not so simple for Amlogic.

> Best regards,
> 
> Thomas

Regards,
Stan
Thomas Petazzoni Nov. 2, 2013, 4:20 p.m. UTC | #3
Dear Stanislav Vasic,

On Sat, 2 Nov 2013 16:10:16 +0000 (UTC), Stanislav Vasic wrote:

> That is what I was told yesterday (about adding it). Amlogic buildroot is 
> too complicated and it's used mainly for running XBMC on top of buildroot. 
> I agree there are too many things (such as non-standard opengl drivers, 
> Amlogic property a/v libraries...).

That's not a problem. We already have a number of packages with OpenGL
drivers for specific platforms:

 package/freescale-imx/gpu-viv-bin-mx6q/ (for i.MX6)
 package/rpi-userland/ (for Rasberry Pi)
 package/sunxi-mali/ (for Allwinner)
 package/ti-gfx/ (for TI OMAP)

> Patch is needed so we know we're building for Amlogic SoC, and for other 
> packages to know which eg. opengl or a/v libs to include in build.

Just do it the way we do it for all of the platforms mentioned above:
add a package in Buildroot, and make it depend on BR2_arm. This way it
will only be visible on ARM platforms, and from this point, users are
expected to know which OpenGL implementation they need for their
platform.

We are also considering adding "demo" defconfigs in Buildroot so that
users could easily find a configuration that enables OpenGL for a given
platform.

> > For all other ARM platforms, the user simply has to choose the
> > appropriate ARM core (Cortex-A8, Cortex-A9, Cortex-A15, etc.), and
> > that's it. We also provide default configurations (see the configs/
> > directory) for various well-known hardware platforms, and those
> > configurations correctly define which ARM core should be used.
> 
> See above, at this point it's not so simple for Amlogic.

See above. Amlogic is not exceptional: it's just like several other
SoCs we already support in Buildroot :-)

Best regards,

Thomas
Stanislav Vasic Nov. 2, 2013, 8:49 p.m. UTC | #4
On Sat, 02 Nov 2013 17:20:23 +0100, Thomas Petazzoni wrote:

> Dear Stanislav Vasic,
> 
> On Sat, 2 Nov 2013 16:10:16 +0000 (UTC), Stanislav Vasic wrote:
> 
>> That is what I was told yesterday (about adding it). Amlogic buildroot
>> is too complicated and it's used mainly for running XBMC on top of
>> buildroot.
>> I agree there are too many things (such as non-standard opengl drivers,
>> Amlogic property a/v libraries...).
> 
> That's not a problem. We already have a number of packages with OpenGL
> drivers for specific platforms:
> 
>  package/freescale-imx/gpu-viv-bin-mx6q/ (for i.MX6)
>  package/rpi-userland/ (for Rasberry Pi) package/sunxi-mali/ (for
>  Allwinner) package/ti-gfx/ (for TI OMAP)
> 
>> Patch is needed so we know we're building for Amlogic SoC, and for
>> other packages to know which eg. opengl or a/v libs to include in
>> build.
> 
> Just do it the way we do it for all of the platforms mentioned above:
> add a package in Buildroot, and make it depend on BR2_arm. This way it
> will only be visible on ARM platforms, and from this point, users are
> expected to know which OpenGL implementation they need for their
> platform.
> 
> We are also considering adding "demo" defconfigs in Buildroot so that
> users could easily find a configuration that enables OpenGL for a given
> platform.
> 
>> > For all other ARM platforms, the user simply has to choose the
>> > appropriate ARM core (Cortex-A8, Cortex-A9, Cortex-A15, etc.), and
>> > that's it. We also provide default configurations (see the configs/
>> > directory) for various well-known hardware platforms, and those
>> > configurations correctly define which ARM core should be used.
>> 
>> See above, at this point it's not so simple for Amlogic.
> 
> See above. Amlogic is not exceptional: it's just like several other SoCs
> we already support in Buildroot :-)
> 
> Best regards,
> 
> Thomas

Hi,

I see your point. At the moment I don't have time to toy with it because 
lot of work, but if noone else is interested in doing such a thing, I'll 
do it but don't have any ETA on this one.

I did not follow since yesterday, but if not available, I can submit 
patch of extracting Linaro's gconv libs and copying it to target (option 
in toolchain configuration).

This patch works for all Linaros (oldest tested is 2012.03).

Regards,
Stan
diff mbox

Patch

diff --git a/arch/Config.in.arm b/arch/Config.in.arm
index c0fabb7..974dd80 100644
--- a/arch/Config.in.arm
+++ b/arch/Config.in.arm
@@ -117,6 +117,41 @@  config BR2_iwmmxt
 	bool "iwmmxt"
 endchoice
 
+menuconfig BR2_ARCH_SPECIFIC_PLATFORM
+      bool "Target platform options"
+      default n
+      help
+        If you have need to select additional options for your
+        target platform, choose Y here and set additional options.
+        
+        If unsure say N.
+
+if BR2_ARCH_SPECIFIC_PLATFORM
+
+choice
+      prompt "Target platform"
+      depends on BR2_arm
+      depends on BR2_cortex_a9
+      default BR2_ARCH_SPECIFIC_PLATFORM_AMLOGIC_M6
+      help
+        Selects specific plafrom on which buildroot will run. On this
+        selection, if used, other options and packages will be configured
+        to match selected platform.
+
+config BR2_ARCH_SPECIFIC_PLATFORM_AMLOGIC_M6
+	bool "Amlogic MX platform (AML8726MX SoC)"
+	select BR2_ARM_CPU_HAS_VFPV3
+	select BR2_ARM_CPU_HAS_THUMB2
+	select BR2_ARM_ENABLE_NEON
+	help
+	  Using this option, buildroot will be configured to
+	  work on Amlogic MX platform.
+
+endchoice
+
+endif
+
+
 config BR2_arm1136jf_s
 	bool
 	default BR2_arm1136jf_s_r0 || BR2_arm1136jf_s_r1
@@ -124,7 +159,8 @@  config BR2_arm1136jf_s
 choice
 	prompt "Target ABI"
 	depends on BR2_arm || BR2_armeb
-	default BR2_ARM_EABI
+	default BR2_ARM_EABI if !BR2_ARCH_SPECIFIC_PLATFORM_AMLOGIC_M6
+	default BR2_ARM_EABIHF if BR2_ARCH_SPECIFIC_PLATFORM_AMLOGIC_M6
 	help
 	  Application Binary Interface to use. The Application Binary
 	  Interface describes the calling conventions (how arguments
@@ -302,6 +338,7 @@  endchoice
 choice
 	prompt "ARM instruction set"
 	depends on BR2_ARM_CPU_HAS_THUMB || BR2_ARM_CPU_HAS_THUMB2
+	default BR2_ARM_INSTRUCTIONS_THUMB2 if 
BR2_ARCH_SPECIFIC_PLATFORM_AMLOGIC_M6
 
 config BR2_ARM_INSTRUCTIONS_ARM_CHOICE