Skip to contentSkip to conversation

Add defconfig for ATMEL at91sam9g45m10ek board

PATCH New Alexandre Belloni 4 participants 9 messages Feb 4, 2013 – May 25, 2013 Arm/Microchip (AT91) SoC support

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 Add defconfig for ATMEL at91sam9g45m10ek board

---
 configs/at91sam9g45m10ek_defconfig |    9 +++++++++
 1 file changed, 9 insertions(+)
 create mode 100644 configs/at91sam9g45m10ek_defconfig
configs/at91sam9g45m10ek_defconfig new file +9 -0
new file mode 100644
index 0000000..c958859
@@ -0,0 +1,9 @@
+BR2_arm=y
+BR2_arm926t=y
+BR2_PACKAGE_HOST_SAM_BA=y
+BR2_TARGET_AT91BOOTSTRAP=y
+BR2_TARGET_AT91BOOTSTRAP_BOARD="at91sam9m10g45ek"
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BOARDNAME="at91sam9m10g45ek_nandflash"
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_DEFCONFIG="at91sam9g45"
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 2/2 Add HW decoding support for Hantro x170

---
 package/multimedia/Config.in                       |    2 ++
 package/multimedia/gst-plugin-x170/Config.in       |   10 ++++++++++
 .../multimedia/gst-plugin-x170/gst-plugin-x170.mk  |   11 +++++++++++
 package/multimedia/on2-8170-libs/Config.in         |    5 +++++
 package/multimedia/on2-8170-libs/on2-8170-libs.mk  |   20 ++++++++++++++++++++
 5 files changed, 48 insertions(+)
 create mode 100644 package/multimedia/gst-plugin-x170/Config.in
 create mode 100644 package/multimedia/gst-plugin-x170/gst-plugin-x170.mk
 create mode 100644 package/multimedia/on2-8170-libs/Config.in
 create mode 100644 package/multimedia/on2-8170-libs/on2-8170-libs.mk
package/multimedia/Config.in +2 -0
index 931e6d3..e13e9da 100644
@@ -14,12 +14,14 @@ source "package/multimedia/gst-plugins-base/Config.in"
 source "package/multimedia/gst-plugins-good/Config.in"
 source "package/multimedia/gst-plugins-bad/Config.in"
 source "package/multimedia/gst-plugins-ugly/Config.in"
+source "package/multimedia/gst-plugin-x170/Config.in"
 source "package/multimedia/lame/Config.in"
 source "package/multimedia/madplay/Config.in"
 source "package/multimedia/mpd/Config.in"
 source "package/multimedia/mpg123/Config.in"
 source "package/multimedia/mplayer/Config.in"
 source "package/multimedia/musepack/Config.in"
+source "package/multimedia/on2-8170-libs/Config.in"
 source "package/opus-tools/Config.in"
 source "package/multimedia/pulseaudio/Config.in"
 source "package/multimedia/tidsp-binaries/Config.in"
package/multimedia/gst-plugin-x170/Config.in new file +10 -0
new file mode 100644
index 0000000..abbfa5e
@@ -0,0 +1,10 @@
+config BR2_PACKAGE_GST_PLUGIN_X170
+	bool "gst-plugin-x170"
+	depends on BR2_PACKAGE_GSTREAMER
+	select BR2_PACKAGE_ON2_8170_LIBS
+	help
+	  GStreamer plug-in to use the Hantro X170 video decoder present on
+	  ATMEL AT91SAM9M10 SoC.
+
+	  http://www.at91.com/linux4sam/bin/view/Linux4SAM/SAM9M10Gstreamer
+
package/multimedia/gst-plugin-x170/gst-plugin-x170.mk new file +11 -0
new file mode 100644
index 0000000..0e14185
@@ -0,0 +1,11 @@
+GST_PLUGIN_X170_VERSION=1.0
+GST_PLUGIN_X170_SOURCE=gst-plugin-x170-$(GST_PLUGIN_X170_VERSION).tar.gz
+GST_PLUGIN_X170_SITE=ftp://ftp.linux4sam.org/pub/demo/linux4sam_1.9/codec/
+
+GST_PLUGIN_X170_AUTORECONF = YES
+GST_PLUGIN_X170_AUTORECONF_OPT = -Im4/
+GST_PLUGIN_X170_DEPENDENCIES = gstreamer libglib2 on2-8170-libs
+
+GST_PLUGIN_X170_CONF_ENV = CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/glib-2.0 -I$(STAGING_DIR)/usr/lib/glib-2.0/include -I$(STAGING_DIR)/usr/include/gstreamer-0.10 -I$(STAGING_DIR)/usr/include/libxml2/"
+
+$(eval $(autotools-package))
package/multimedia/on2-8170-libs/Config.in new file +5 -0
new file mode 100644
index 0000000..35eb628
@@ -0,0 +1,5 @@
+config BR2_PACKAGE_ON2_8170_LIBS
+	bool "on2-8170-libs"
+	help
+	  Libraries for Hantro X170 video decoder
+
package/multimedia/on2-8170-libs/on2-8170-libs.mk new file +20 -0
new file mode 100644
index 0000000..edb1c5d
@@ -0,0 +1,20 @@
+ON2_8170_LIBS_VERSION=1.0
+ON2_8170_LIBS_SOURCE=on2-8170-libs-$(ON2_8170_LIBS_VERSION).tar.gz
+ON2_8170_LIBS_SITE=ftp://ftp.linux4sam.org/pub/demo/linux4sam_1.9/codec/
+
+ON2_8170_LIBS_INSTALL_STAGING = YES
+
+define ON2_8170_LIBS_BUILD_CMDS
+endef
+
+define ON2_8170_LIBS_INSTALL_STAGING_CMDS
+	$(INSTALL) -D -m 0755 $(@D)/*.a $(STAGING_DIR)/usr/lib
+	$(INSTALL) -D -m 0644 $(@D)/*.h $(STAGING_DIR)/usr/include
+	$(INSTALL) -D -m 0755 $(@D)/*.so $(STAGING_DIR)/usr/lib
+endef
+
+define ON2_8170_LIBS_INSTALL_TARGET_CMDS
+	$(INSTALL) -D -m 0755 $(@D)/*.so $(TARGET_DIR)/usr/lib
+endef
+
+$(eval $(generic-package))
Signature · 1 line
1.7.10.4
#2 lore raw

PATCH 2/2 Add HW decoding support for Hantro x170

Dear Alexandre Belloni,

package/multimedia/gst-plugin-x170/Config.in line 3

Quoted 6 lines · Alexandre Belloni
package/multimedia/gst-plugin-x170/Config.in new file +3 -0
@@ -0,0 +1,10 @@
+config BR2_PACKAGE_GST_PLUGIN_X170
+	bool "gst-plugin-x170"
+	depends on BR2_PACKAGE_GSTREAMER

A "depends on BR2_arm" should be added here. We generally try to hide such architecture-specific packages when they really don't make sense. Of course, technically speaking, it should only appear if the SoC is an AT91 SoC that has this specific video unit, but we are not able to do that with the existing Buildroot options. But we still try to make such options depend on BR2_arm.

package/multimedia/gst-plugin-x170/gst-plugin-x170.mk

Quoted 6 lines
package/multimedia/gst-plugin-x170/gst-plugin-x170.mk new file +0 -0
new file mode 100644
index 0000000..0e14185
@@ -0,0 +1,11 @@

Missing comment header.

package/multimedia/gst-plugin-x170/gst-plugin-x170.mk line 3

Quoted 3 lines
package/multimedia/gst-plugin-x170/gst-plugin-x170.mk new file +3 -0
+GST_PLUGIN_X170_VERSION=1.0
+GST_PLUGIN_X170_SOURCE=gst-plugin-x170-$(GST_PLUGIN_X170_VERSION).tar.gz
+GST_PLUGIN_X170_SITE=ftp://ftp.linux4sam.org/pub/demo/linux4sam_1.9/codec/

Spaces before and after the equal sign.

<foo>_SOURCE line not beeded since it's the default value.

package/multimedia/gst-plugin-x170/gst-plugin-x170.mk line 6

Quoted 3 lines
package/multimedia/gst-plugin-x170/gst-plugin-x170.mk new file +3 -0
+
+GST_PLUGIN_X170_AUTORECONF = YES
+GST_PLUGIN_X170_AUTORECONF_OPT = -Im4/

Please add a justification here in a short comment before the _AUTORECONF option to explain why it's needed. Normally, it's not needed for tarballs when no patches are applied, so we try to give a short justification through a comment.

package/multimedia/gst-plugin-x170/gst-plugin-x170.mk line 9

Quoted 3 lines
package/multimedia/gst-plugin-x170/gst-plugin-x170.mk new file +3 -0
+GST_PLUGIN_X170_DEPENDENCIES = gstreamer libglib2 on2-8170-libs
+
+GST_PLUGIN_X170_CONF_ENV = CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/glib-2.0 -I$(STAGING_DIR)/usr/lib/glib-2.0/include -I$(STAGING_DIR)/usr/include/gstreamer-0.10 -I$(STAGING_DIR)/usr/include/libxml2/"

Isn't the configure script capable it detecting those libraries? What fails if you don't add all those -I values?

package/multimedia/on2-8170-libs/Config.in line 2

Quoted 10 lines
package/multimedia/gst-plugin-x170/gst-plugin-x170.mk new file +2 -0
+
+$(eval $(autotools-package))
package/multimedia/on2-8170-libs/Config.in new file +2 -0
new file mode 100644
index 0000000..35eb628
@@ -0,0 +1,5 @@
+config BR2_PACKAGE_ON2_8170_LIBS
+	bool "on2-8170-libs"

depends on BR2_arm.

package/multimedia/on2-8170-libs/Config.in line 5

Quoted 3 lines
package/multimedia/on2-8170-libs/Config.in new file +3 -0
+	help
+	  Libraries for Hantro X170 video decoder
+

Link to an upstream URL. Could probably be the same as the other package.

package/multimedia/on2-8170-libs/on2-8170-libs.mk

Quoted 6 lines
package/multimedia/on2-8170-libs/on2-8170-libs.mk new file +0 -0
new file mode 100644
index 0000000..edb1c5d
@@ -0,0 +1,20 @@

Comment header.

package/multimedia/on2-8170-libs/on2-8170-libs.mk line 3

Quoted 3 lines
package/multimedia/on2-8170-libs/on2-8170-libs.mk new file +3 -0
+ON2_8170_LIBS_VERSION=1.0
+ON2_8170_LIBS_SOURCE=on2-8170-libs-$(ON2_8170_LIBS_VERSION).tar.gz
+ON2_8170_LIBS_SITE=ftp://ftp.linux4sam.org/pub/demo/linux4sam_1.9/codec/

Spaces before and after =. The _SOURCE value is the default, so you can get rid of it.

package/multimedia/on2-8170-libs/on2-8170-libs.mk line 8

Quoted 5 lines
package/multimedia/on2-8170-libs/on2-8170-libs.mk new file +5 -0
+
+ON2_8170_LIBS_INSTALL_STAGING = YES
+
+define ON2_8170_LIBS_BUILD_CMDS
+endef

If it's empty, then it's not needed. The default _BUILD_CMDS for a generic-package is empty anyway.

package/multimedia/on2-8170-libs/on2-8170-libs.mk line 18

Quoted 9 lines
package/multimedia/on2-8170-libs/on2-8170-libs.mk new file +9 -0
+define ON2_8170_LIBS_INSTALL_STAGING_CMDS
+	$(INSTALL) -D -m 0755 $(@D)/*.a $(STAGING_DIR)/usr/lib
+	$(INSTALL) -D -m 0644 $(@D)/*.h $(STAGING_DIR)/usr/include
+	$(INSTALL) -D -m 0755 $(@D)/*.so $(STAGING_DIR)/usr/lib
+endef
+
+define ON2_8170_LIBS_INSTALL_TARGET_CMDS
+	$(INSTALL) -D -m 0755 $(@D)/*.so $(TARGET_DIR)/usr/lib
+endef

If you use -D, then you must path a complete path as a second argument. Otherwise, if the destination directory doesn't exist, then your file will be copied as the directory name. I.e, you "libblabla.so" would be a file named "lib" under the usr/ directory.

If we want to do a wildcard-based copy of files, I don't think install plays really well. We generally do a 'cp' instead in this case, but maybe others could comment on this specific point.

Best regards,

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 2/2 Add HW decoding support for Hantro x170

Hi,

Quoted 9 lines · Thomas Petazzoni

package/multimedia/gst-plugin-x170/gst-plugin-x170.mk line 6

Quoted 3 lines
package/multimedia/gst-plugin-x170/gst-plugin-x170.mk new file +3 -0
+
+GST_PLUGIN_X170_AUTORECONF = YES
+GST_PLUGIN_X170_AUTORECONF_OPT = -Im4/

Please add a justification here in a short comment before the _AUTORECONF option to explain why it's needed. Normally, it's not needed for tarballs when no patches are applied, so we try to give a short justification through a comment.

There is no configure script in the archive so you basically have to run autoreconf to be able to build.

Quoted 7 lines

package/multimedia/gst-plugin-x170/gst-plugin-x170.mk line 9

Quoted 3 lines
package/multimedia/gst-plugin-x170/gst-plugin-x170.mk new file +3 -0
+GST_PLUGIN_X170_DEPENDENCIES = gstreamer libglib2 on2-8170-libs
+
+GST_PLUGIN_X170_CONF_ENV = CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/glib-2.0 -I$(STAGING_DIR)/usr/lib/glib-2.0/include -I$(STAGING_DIR)/usr/include/gstreamer-0.10 -I$(STAGING_DIR)/usr/include/libxml2/"

Isn't the configure script capable it detecting those libraries? What fails if you don't add all those -I values?

The configure script itself seems to be able to find the includes correctly but the include path is limited to . and .. when compiling so I had to force the -I at configure.

It may be related to the way I'm using autoreconf. I think that package is expectig you to use gst-autogen.sh to do that but I could'nt get that to work.

Signature · 1 line
Alexandre Belloni
#4 lore raw

PATCH 2/2 Add HW decoding support for Hantro x170

In reply to Thomas Petazzoni
Quoted 16 lines · Thomas Petazzoni

Dear Alexandre Belloni,

package/multimedia/gst-plugin-x170/Config.in line 3

Quoted 6 lines · Alexandre Belloni
package/multimedia/gst-plugin-x170/Config.in new file +3 -0
@@ -0,0 +1,10 @@
+config BR2_PACKAGE_GST_PLUGIN_X170
+     bool "gst-plugin-x170"
+     depends on BR2_PACKAGE_GSTREAMER

A "depends on BR2_arm" should be added here. We generally try to hide such architecture-specific packages when they really don't make sense. Of course, technically speaking, it should only appear if the SoC is an AT91 SoC that has this specific video unit, but we are not able to do that with the existing Buildroot options. But we still try to make such options depend on BR2_arm.

I think it's ARM9 only, so we can probably be slightly more specific:

  depends on (BR2_arm920t || BR2_arm922t || BR2_arm926t)

Simon

#5 lore raw

PATCH 2/2 Add HW decoding support for Hantro x170

Quoted 6 lines
Quoted 6 lines
Quoted 5 lines
Quoted 1 line
Quoted 1 line

"Simon" == Simon Dawson <[email protected]> writes:

package/multimedia/gst-plugin-x170/Config.in new file +3 -0
+config BR2_PACKAGE_GST_PLUGIN_X170
+     bool "gst-plugin-x170"
+     depends on BR2_PACKAGE_GSTREAMER
Quoted 6 lines
Quoted 6 lines

A "depends on BR2_arm" should be added here. We generally try to hide such architecture-specific packages when they really don't make sense. Of course, technically speaking, it should only appear if the SoC is an AT91 SoC that has this specific video unit, but we are not able to do that with the existing Buildroot options. But we still try to make such options depend on BR2_arm.

Simon> I think it's ARM9 only, so we can probably be slightly more specific:

Simon> depends on (BR2_arm920t || BR2_arm922t || BR2_arm926t)

And the only device I've ever seen with this IP block integrated are at91sam9m10/11, both of which are arm926t.

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

PATCH 2/2 Add HW decoding support for Hantro x170

In reply to Alexandre Belloni
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Alexandre" == Alexandre Belloni <[email protected]> writes:

Alexandre> Signed-off-by: Alexandre Belloni <[email protected]>

Hi,

Will you send a v2 fixing the comments Thomas had?

For the on2-8170-libs package, do you know what toolchain the binaries have been built with? Do we need to limit the C library / arch variant to ensure it is only available on compatible configs?

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

PATCH 2/2 Add HW decoding support for Hantro x170

Hi,

Quoted 2 lines · Peter Korsgaard

Will you send a v2 fixing the comments Thomas had?

I had a look again today, I addressed almost all the comments but I'm still try to figure what is happening with the configure script. It is actually find glib and the other one correctly but it is not using the correct environment variable in the Makefile.

I'll try to send something next week.

Quoted 4 lines

For the on2-8170-libs package, do you know what toolchain the binaries have been built with? Do we need to limit the C library / arch variant to ensure it is only available on compatible configs?

The symbol that are coming from the libc are limited and if I recall correctly, it was working with a toolchain built by buildroot (that is using uClibc).

Regards

Signature · 1 line
Alexandre Belloni