Skip to contentSkip to conversation

Support of iMX6 hardware ?

Buildroot Thierry Bultel 4 participants 9 messages Dec 6, 2012 – Dec 7, 2012

lore
Share & tools
lore
#0 lore raw

Hi,
I have 2 questions around the Buildroot support for iMX6 from Freescale, especially around graphics.

1) Is there current work on that for a coming release ? I have noticed that openbricks seem to already have integrated the imx6-lib and xdriver-xf86-video-imx

2) I have trying to get both of them integrated in buildroot The imx6-lib, which will be a 'generic-package', needs includes of the target kernel; these includes are not in the sysroot.

What is the most appropriate way to proceed ? The underlying Makefile has got a "INCLUDE" var to be set, shall I point it to my linux-custom build directory ? That does not seem very good.

Thanks
Thierry

#1 lore raw

Dear Thierry Bultel,

Quoted 4 lines · Thierry Bultel

I have 2 questions around the Buildroot support for iMX6 from Freescale, especially around graphics.

1) Is there current work on that for a coming release ?

Everything is in the Buildroot Git repository, and besides that I haven't heard of people working on i.MX6 "advanced" features. We have a defconfig for the nitrogen6x board that was done by Peter, but I guess Peter hasn't investigated the entire graphics stack of i.MX6 for now.

It would indeed be really, really great to improve i.MX6 support in Buildroot (and also for other SoCs).

Quoted 10 lines

I have noticed that openbricks seem to already have integrated the imx6-lib and xdriver-xf86-video-imx

2) I have trying to get both of them integrated in buildroot The imx6-lib, which will be a 'generic-package', needs includes of the target kernel; these includes are not in the sysroot.

What is the most appropriate way to proceed ? The underlying Makefile has got a "INCLUDE" var to be set, shall I point it to my linux-custom build directory ? That does not seem very good.

To me, it's the right solution. If you have userspace code that depends on very specific kernel headers that are not part of a traditional toolchain, then pointing to the kernel sources is the only solution.

Of course, it means that the package must "depends on BR2_LINUX_KERNEL" and have <foobar>_DEPENDENCIES = linux.

Thomas

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

"Thomas" == Thomas Petazzoni <[email protected]> writes:

Hi,

Quoted 1 line
Quoted 1 line

1) Is there current work on that for a coming release ?

Thomas> Everything is in the Buildroot Git repository, and besides that I Thomas> haven't heard of people working on i.MX6 "advanced" features. We have a Thomas> defconfig for the nitrogen6x board that was done by Peter, but I guess Thomas> Peter hasn't investigated the entire graphics stack of i.MX6 for now.

Indeed. I've only touched the open source bits. From the looks of it, I doubt I will be able to spend much time on further imx6 support during the 2013.02 cycle - So help would be ver much appreciated.

Signature · 1 line
Bye, Peter Korsgaard
#3 lore raw
In reply to Thomas Petazzoni

Le 06/12/2012 12:48, Thomas Petazzoni a ?crit :

Quoted 1 line

Dear Thierry Bultel,

Dear Thomas,

Quoted 8 lines · Thierry Bultel
Quoted 5 lines

I have 2 questions around the Buildroot support for iMX6 from Freescale, especially around graphics.

1) Is there current work on that for a coming release ?

Quoted 7 lines

Everything is in the Buildroot Git repository, and besides that I haven't heard of people working on i.MX6 "advanced" features. We have a defconfig for the nitrogen6x board that was done by Peter, but I guess Peter hasn't investigated the entire graphics stack of i.MX6 for now.

It would indeed be really, really great to improve i.MX6 support in Buildroot (and also for other SoCs).

As soon as I have something working, I will obviously submit a patch for it.

Quoted 8 lines
Quoted 8 lines

I have noticed that openbricks seem to already have integrated the imx6-lib and xdriver-xf86-video-imx

2) I have trying to get both of them integrated in buildroot The imx6-lib, which will be a 'generic-package', needs includes of the target kernel; these includes are not in the sysroot.

Quoted 5 lines
Quoted 3 lines

What is the most appropriate way to proceed ? The underlying Makefile has got a "INCLUDE" var to be set, shall I point it to my linux-custom build directory ? That does not seem very good.

To me, it's the right solution.

Ok
If you have userspace code that depends

Quoted 5 lines

on very specific kernel headers that are not part of a traditional toolchain, then pointing to the kernel sources is the only solution.

Of course, it means that the package must "depends on BR2_LINUX_KERNEL" and have <foobar>_DEPENDENCIES = linux.

Thanks for the tip.
I have (at least) 2 packages to build.

- The first one was the imx6-lib, that I have added under the Graphics section, as a generic-package, and

define IMX6_LIB_BUILD_CMDS

      $(MAKE) -C $(@D) all PLATFORM=IMX6Q CROSS_COMPILE=$(TARGET_CROSS)

INCLUDE=$(INCLUDE)
endef

... was just what was needed to build it succesfully.

The second one is the xdriver_xf86-video-imx
It is built as an autotools-package
But since the 'configure' intrisincs are not really my favorite food, I am looking how to add the needed INCLUDE to the CFLAGS that are automatically given to it.
Could you please advise me on how to do it in the cleanest way ?

Regards
Thierry

Quoted 2 lines

Thomas

#4 lore raw

Dear Thierry Bultel,

Quoted 2 lines · Thierry Bultel

As soon as I have something working, I will obviously submit a patch for it.

Great!

Quoted 10 lines

Thanks for the tip.
I have (at least) 2 packages to build.

- The first one was the imx6-lib, that I have added under the Graphics section, as a generic-package, and

define IMX6_LIB_BUILD_CMDS

      $(MAKE) -C $(@D) all PLATFORM=IMX6Q

CROSS_COMPILE=$(TARGET_CROSS) INCLUDE=$(INCLUDE)
endef

Sounds good. We'll do a complete review when you post the entire patch, but it sounds ok in principle.

Quoted 6 lines

The second one is the xdriver_xf86-video-imx
It is built as an autotools-package
But since the 'configure' intrisincs are not really my favorite food, I am looking how to add the needed INCLUDE to the CFLAGS that are automatically given to it.
Could you please advise me on how to do it in the cleanest way ?

Depends on whether you need to pass this environment variables at configure time or at build time.

For configure time:

<foobar>_CONF_ENV = \
	INCLUDE="blabla" \
	CFLAGS="$(TARGET_CFLAGS) -blabla"

For build time:

<foobar>_MAKE_ENV = \
	INCLUDE="blabla" \
	CFLAGS="$(TARGET_CFLAGS) -blabla"

See also
http://buildroot.org/downloads/manual/manual.html#_infrastructure_for_autotools_based_packages

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
#5 lore raw

Hi Thierry, Thomas, all,

2012/12/7 Thomas Petazzoni <[email protected]>:

Quoted 14 lines

Dear Thierry Bultel,

Quoted 2 lines · Thierry Bultel

As soon as I have something working, I will obviously submit a patch for it.

Great!

Quoted 5 lines

Thanks for the tip.
I have (at least) 2 packages to build.

- The first one was the imx6-lib, that I have added under the Graphics section, as a generic-package, and

Some people around Buildroot, like the Armadeus folks, have already done part of the imx-lib integration.
It seems they presently support imx-lib for both imx27 and imx51.

You could certainly give a look at their work, might be usefull ;-):
http://armadeus.git.sourceforge.net/git/gitweb.cgi?p=armadeus/armadeus;a=blob;f=patches/buildroot/2012.11/174-imx-lib-add_package.patch;hb=HEAD

Regards,

Signature · 1 line
Sam
#6 lore raw

Dear Samuel Martin,

Quoted 6 lines · Samuel Martin

Some people around Buildroot, like the Armadeus folks, have already done part of the imx-lib integration.
It seems they presently support imx-lib for both imx27 and imx51.

You could certainly give a look at their work, might be usefull ;-):
http://armadeus.git.sourceforge.net/git/gitweb.cgi?p=armadeus/armadeus;a=blob;f=patches/buildroot/2012.11/174-imx-lib-add_package.patch;hb=HEAD

Any idea why they don't submit their work upstream?

They have a huge number of patches for Buildroot in
http://armadeus.git.sourceforge.net/git/gitweb.cgi?p=armadeus/armadeus;a=tree;f=patches/buildroot/2012.11;hb=HEAD
and they don't submit anything. It's sad.

Thomas

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

Hi Thomas,

2012/12/7 Thomas Petazzoni <[email protected]>:

Quoted 8 lines

Dear Samuel Martin,

Quoted 4 lines · Samuel Martin

Some people around Buildroot, like the Armadeus folks, have already done part of the imx-lib integration.
It seems they presently support imx-lib for both imx27 and imx51.

Quoted 8 lines
Quoted 2 lines

You could certainly give a look at their work, might be usefull ;-):
http://armadeus.git.sourceforge.net/git/gitweb.cgi?p=armadeus/armadeus;a=blob;f=patches/buildroot/2012.11/174-imx-lib-add_package.patch;hb=HEAD

Any idea why they don't submit their work upstream?

They have a huge number of patches for Buildroot in
http://armadeus.git.sourceforge.net/git/gitweb.cgi?p=armadeus/armadeus;a=tree;f=patches/buildroot/2012.11;hb=HEAD
and they don't submit anything. It's sad.

They are working on it, see:
http://www.armadeus.com/wiki/index.php?title=Buildroot_Mainline_integration

And here, the WIP branch of what I've already done, and I plan to post shortly:
https://github.com/tSed/buildroot/commits/sma/armadeus-integration

It's just a slow process, not necessarly time-to-market-friendly at first look! ;-)

Regards,

Signature · 1 line
Sam
#8 lore raw

Dear Samuel Martin,

Quoted 2 lines · Samuel Martin

They are working on it, see:
http://www.armadeus.com/wiki/index.php?title=Buildroot_Mainline_integration

Great.

Quoted 3 lines

And here, the WIP branch of what I've already done, and I plan to post shortly:
https://github.com/tSed/buildroot/commits/sma/armadeus-integration

Good. Please submit step by step: if you spam us with hundred patches, we'll never see the end of it.

Quoted 2 lines

It's just a slow process, not necessarly time-to-market-friendly at first look! ;-)

The time-to-market excuse is a bad excuse because it is very often wrong, especially for Buildroot where the barrier to entry is quite low (writing Buildroot code that gets accepted is quite easy). Armadeus has been carrying those Buildroot patches for multiple years, and everytime they upgrade to a newer Buildroot release, they have to upgrade those patches as well. I am pretty sure that the time they have spent upgrading those patches and upgrading their Buildroot versions is significantly larger than the time it would have taken to get those improvements merged in the first place.

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