All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Problem with starting TI Graphics
@ 2014-02-13  8:11 Peter Kuemmel
  2014-02-13 21:35 ` Marcelo Gutierrez
  0 siblings, 1 reply; 7+ messages in thread
From: Peter Kuemmel @ 2014-02-13  8:11 UTC (permalink / raw)
  To: buildroot

Hi, 
I have problems with the package ti-gfx.

Setup uses a buildroot compiler with eabihf enabled.
All goes fine until TI's pvrsrvctl gets called:

#pvrsrvctl
/usr/bin/pvrsrvctl: line 1: syntax error: unexpected word (expecting ")")

# strace pvrsrvctl
execve("/usr/bin/pvrsrvctl", ["pvrsrvctl"], [/* 16 vars */]) = -1 ENOEXEC (Exec format error)
write(2, "strace: exec: Exec format error\n", 32strace: exec: Exec format error
) = 32
exit_group(1)                           = ?
+++ exited with 1 +++

But no problems with the modules
# lsmod
Module                  Size  Used by    Not tainted
bufferclass_ti          4734  0
omaplfb                10298  0
pvrsrvkm              157244  2 bufferclass_ti,omaplfb


First I thought it is ABI-problem so I configured the system until they match,
see below, but this didn't help.

Could it be a mis-match in the eglibc version?

# LD_TRACE_LOADED_OBJECTS=1 /usr/bin/pvrsrvctl
        libc.so.6 => /lib/libc.so.6 (0x401dc000)
        /lib/ld-linux-armhf.so.3 (0x40094000)

Many thanks for any hints!

Peter


$ readelf -A /share/rootfs/usr/lib/pvr_drv.so
Attribute Section: aeabi
File Attributes
  Tag_CPU_name: "7-A"
  Tag_CPU_arch: v7
  Tag_CPU_arch_profile: Application
  Tag_ARM_ISA_use: Yes
  Tag_THUMB_ISA_use: Thumb-2
  Tag_FP_arch: VFPv3
  Tag_Advanced_SIMD_arch: NEONv1
  Tag_ABI_PCS_wchar_t: 4
  Tag_ABI_FP_denormal: Needed
  Tag_ABI_FP_exceptions: Needed
  Tag_ABI_FP_number_model: IEEE 754
  Tag_ABI_align_needed: 8-byte
  Tag_ABI_align_preserved: 8-byte, except leaf SP
  Tag_ABI_enum_size: int
  Tag_ABI_HardFP_use: SP and DP
  Tag_ABI_VFP_args: VFP registers
  Tag_ABI_optimization_goals: Aggressive Speed
  Tag_CPU_unaligned_access: v6
  Tag_DIV_use: Not allowed

 $ readelf -A /share/rootfs/usr/bin/pvrsrvctl 
Attribute Section: aeabi
File Attributes
  Tag_CPU_name: "7-A"
  Tag_CPU_arch: v7
  Tag_CPU_arch_profile: Application
  Tag_ARM_ISA_use: Yes
  Tag_THUMB_ISA_use: Thumb-2
  Tag_FP_arch: VFPv3
  Tag_Advanced_SIMD_arch: NEONv1
  Tag_ABI_PCS_wchar_t: 4
  Tag_ABI_FP_denormal: Needed
  Tag_ABI_FP_exceptions: Needed
  Tag_ABI_FP_number_model: IEEE 754
  Tag_ABI_align_needed: 8-byte
  Tag_ABI_align_preserved: 8-byte, except leaf SP
  Tag_ABI_enum_size: int
  Tag_ABI_HardFP_use: SP and DP
  Tag_ABI_VFP_args: VFP registers
  Tag_CPU_unaligned_access: v6
  Tag_DIV_use: Not allowed

Attribute Section: aeabi
File Attributes
  Tag_CPU_name: "7-A"
  Tag_CPU_arch: v7
  Tag_CPU_arch_profile: Application
  Tag_ARM_ISA_use: Yes
  Tag_THUMB_ISA_use: Thumb-2
  Tag_FP_arch: VFPv3
  Tag_ABI_PCS_wchar_t: 4
  Tag_ABI_FP_rounding: Needed
  Tag_ABI_FP_denormal: Needed
  Tag_ABI_FP_exceptions: Needed
  Tag_ABI_FP_number_model: IEEE 754
  Tag_ABI_align_needed: 8-byte
  Tag_ABI_align_preserved: 8-byte, except leaf SP
  Tag_ABI_enum_size: int
  Tag_ABI_HardFP_use: SP and DP
  Tag_ABI_VFP_args: VFP registers
  Tag_CPU_unaligned_access: v6
  Tag_Virtualization_use: TrustZone

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] Problem with starting TI Graphics
  2014-02-13  8:11 [Buildroot] Problem with starting TI Graphics Peter Kuemmel
@ 2014-02-13 21:35 ` Marcelo Gutierrez
  2014-02-14 10:24   ` Peter Kuemmel
  0 siblings, 1 reply; 7+ messages in thread
From: Marcelo Gutierrez @ 2014-02-13 21:35 UTC (permalink / raw)
  To: buildroot

Hi Peter, all

Can you apply this patch and see if it fixes the problem?

http://patchwork.ozlabs.org/patch/320194/raw/

Regards,
Marcelo


2014-02-13 5:11 GMT-03:00 Peter Kuemmel <syntheticpp@gmx.net>:

> Hi,
> I have problems with the package ti-gfx.
>
> Setup uses a buildroot compiler with eabihf enabled.
> All goes fine until TI's pvrsrvctl gets called:
>
> #pvrsrvctl
> /usr/bin/pvrsrvctl: line 1: syntax error: unexpected word (expecting ")")
>
> # strace pvrsrvctl
> execve("/usr/bin/pvrsrvctl", ["pvrsrvctl"], [/* 16 vars */]) = -1 ENOEXEC
> (Exec format error)
> write(2, "strace: exec: Exec format error\n", 32strace: exec: Exec format
> error
> ) = 32
> exit_group(1)                           = ?
> +++ exited with 1 +++
>
> But no problems with the modules
> # lsmod
> Module                  Size  Used by    Not tainted
> bufferclass_ti          4734  0
> omaplfb                10298  0
> pvrsrvkm              157244  2 bufferclass_ti,omaplfb
>
>
> First I thought it is ABI-problem so I configured the system until they
> match,
> see below, but this didn't help.
>
> Could it be a mis-match in the eglibc version?
>
> # LD_TRACE_LOADED_OBJECTS=1 /usr/bin/pvrsrvctl
>         libc.so.6 => /lib/libc.so.6 (0x401dc000)
>         /lib/ld-linux-armhf.so.3 (0x40094000)
>
> Many thanks for any hints!
>
> Peter
>
>
> $ readelf -A /share/rootfs/usr/lib/pvr_drv.so
> Attribute Section: aeabi
> File Attributes
>   Tag_CPU_name: "7-A"
>   Tag_CPU_arch: v7
>   Tag_CPU_arch_profile: Application
>   Tag_ARM_ISA_use: Yes
>   Tag_THUMB_ISA_use: Thumb-2
>   Tag_FP_arch: VFPv3
>   Tag_Advanced_SIMD_arch: NEONv1
>   Tag_ABI_PCS_wchar_t: 4
>   Tag_ABI_FP_denormal: Needed
>   Tag_ABI_FP_exceptions: Needed
>   Tag_ABI_FP_number_model: IEEE 754
>   Tag_ABI_align_needed: 8-byte
>   Tag_ABI_align_preserved: 8-byte, except leaf SP
>   Tag_ABI_enum_size: int
>   Tag_ABI_HardFP_use: SP and DP
>   Tag_ABI_VFP_args: VFP registers
>   Tag_ABI_optimization_goals: Aggressive Speed
>   Tag_CPU_unaligned_access: v6
>   Tag_DIV_use: Not allowed
>
>  $ readelf -A /share/rootfs/usr/bin/pvrsrvctl
> Attribute Section: aeabi
> File Attributes
>   Tag_CPU_name: "7-A"
>   Tag_CPU_arch: v7
>   Tag_CPU_arch_profile: Application
>   Tag_ARM_ISA_use: Yes
>   Tag_THUMB_ISA_use: Thumb-2
>   Tag_FP_arch: VFPv3
>   Tag_Advanced_SIMD_arch: NEONv1
>   Tag_ABI_PCS_wchar_t: 4
>   Tag_ABI_FP_denormal: Needed
>   Tag_ABI_FP_exceptions: Needed
>   Tag_ABI_FP_number_model: IEEE 754
>   Tag_ABI_align_needed: 8-byte
>   Tag_ABI_align_preserved: 8-byte, except leaf SP
>   Tag_ABI_enum_size: int
>   Tag_ABI_HardFP_use: SP and DP
>   Tag_ABI_VFP_args: VFP registers
>   Tag_CPU_unaligned_access: v6
>   Tag_DIV_use: Not allowed
>
> Attribute Section: aeabi
> File Attributes
>   Tag_CPU_name: "7-A"
>   Tag_CPU_arch: v7
>   Tag_CPU_arch_profile: Application
>   Tag_ARM_ISA_use: Yes
>   Tag_THUMB_ISA_use: Thumb-2
>   Tag_FP_arch: VFPv3
>   Tag_ABI_PCS_wchar_t: 4
>   Tag_ABI_FP_rounding: Needed
>   Tag_ABI_FP_denormal: Needed
>   Tag_ABI_FP_exceptions: Needed
>   Tag_ABI_FP_number_model: IEEE 754
>   Tag_ABI_align_needed: 8-byte
>   Tag_ABI_align_preserved: 8-byte, except leaf SP
>   Tag_ABI_enum_size: int
>   Tag_ABI_HardFP_use: SP and DP
>   Tag_ABI_VFP_args: VFP registers
>   Tag_CPU_unaligned_access: v6
>   Tag_Virtualization_use: TrustZone
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20140213/1f44b342/attachment.html>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] Problem with starting TI Graphics
  2014-02-13 21:35 ` Marcelo Gutierrez
@ 2014-02-14 10:24   ` Peter Kuemmel
  2014-03-04 19:09     ` Thomas Petazzoni
  0 siblings, 1 reply; 7+ messages in thread
From: Peter Kuemmel @ 2014-02-14 10:24 UTC (permalink / raw)
  To: buildroot

An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20140214/06103641/attachment.html>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] Problem with starting TI Graphics
  2014-02-14 10:24   ` Peter Kuemmel
@ 2014-03-04 19:09     ` Thomas Petazzoni
  2014-03-05 21:09       ` Arnout Vandecappelle
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Petazzoni @ 2014-03-04 19:09 UTC (permalink / raw)
  To: buildroot

Dear Peter Kuemmel,

On Fri, 14 Feb 2014 11:24:06 +0100, Peter Kuemmel wrote:

> Thanks, I found the issue: it was the missing user binary thumb support in the kernel.

Interesting. Were you building the kernel with Buildroot, or separately?

If you built your kernel with Buildroot, then maybe we should add
something like:

	$(if $(BR2_ARM_INSTRUCTIONS_THUMB)$(BR2_ARM_INSTRUCTIONS_THUMB2),
		$(call KCONFIG_ENABLE_OPT,CONFIG_ARM_THUMB,$(@D)/.config))

This way we would ensure that the kernel gets built with
CONFIG_ARM_THUMB=y when the Thumb or Thumb-2 instruction sets have been
selected for userspace.

Thoughts?

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] Problem with starting TI Graphics
  2014-03-04 19:09     ` Thomas Petazzoni
@ 2014-03-05 21:09       ` Arnout Vandecappelle
  2014-03-06 12:47         ` Peter Kümmel
  0 siblings, 1 reply; 7+ messages in thread
From: Arnout Vandecappelle @ 2014-03-05 21:09 UTC (permalink / raw)
  To: buildroot

On 04/03/14 20:09, Thomas Petazzoni wrote:
> Dear Peter Kuemmel,
> 
> On Fri, 14 Feb 2014 11:24:06 +0100, Peter Kuemmel wrote:
> 
>> Thanks, I found the issue: it was the missing user binary thumb support in the kernel.
> 
> Interesting. Were you building the kernel with Buildroot, or separately?
> 
> If you built your kernel with Buildroot, then maybe we should add
> something like:
> 
> 	$(if $(BR2_ARM_INSTRUCTIONS_THUMB)$(BR2_ARM_INSTRUCTIONS_THUMB2),
> 		$(call KCONFIG_ENABLE_OPT,CONFIG_ARM_THUMB,$(@D)/.config))
> 
> This way we would ensure that the kernel gets built with
> CONFIG_ARM_THUMB=y when the Thumb or Thumb-2 instruction sets have been
> selected for userspace.

 This is a good idea, but wouldn't help with Peter's problem: the
pvrsrvctl binary is not built by buildroot, so the problem occurs even if
buildroot is build with ARM instructions.

 Regards,
 Arnout

> 
> Thoughts?
> 
> Thomas
> 


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] Problem with starting TI Graphics
  2014-03-05 21:09       ` Arnout Vandecappelle
@ 2014-03-06 12:47         ` Peter Kümmel
  2014-03-06 17:47           ` Arnout Vandecappelle
  0 siblings, 1 reply; 7+ messages in thread
From: Peter Kümmel @ 2014-03-06 12:47 UTC (permalink / raw)
  To: buildroot

On 05.03.2014 22:09, Arnout Vandecappelle wrote:
> On 04/03/14 20:09, Thomas Petazzoni wrote:
>> Dear Peter Kuemmel,
>>
>> On Fri, 14 Feb 2014 11:24:06 +0100, Peter Kuemmel wrote:
>>
>>> Thanks, I found the issue: it was the missing user binary thumb support in the kernel.
>>
>> Interesting. Were you building the kernel with Buildroot, or separately?
>>
>> If you built your kernel with Buildroot, then maybe we should add
>> something like:
>>
>> 	$(if $(BR2_ARM_INSTRUCTIONS_THUMB)$(BR2_ARM_INSTRUCTIONS_THUMB2),
>> 		$(call KCONFIG_ENABLE_OPT,CONFIG_ARM_THUMB,$(@D)/.config))
>>
>> This way we would ensure that the kernel gets built with
>> CONFIG_ARM_THUMB=y when the Thumb or Thumb-2 instruction sets have been
>> selected for userspace.
>
>   This is a good idea, but wouldn't help with Peter's problem: the
> pvrsrvctl binary is not built by buildroot, so the problem occurs even if
> buildroot is build with ARM instructions.

Yes, pvrsrvctl is not build by buildroot, but this is not the problem.
pvrsrvctl needs a kernel which supports thumb, so enabling thumb in the
kernel automatically by buildroot would solve the problem. (And would have
saved me many hours).

Peter

>
>   Regards,
>   Arnout
>
>>
>> Thoughts?
>>
>> Thomas
>>
>
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] Problem with starting TI Graphics
  2014-03-06 12:47         ` Peter Kümmel
@ 2014-03-06 17:47           ` Arnout Vandecappelle
  0 siblings, 0 replies; 7+ messages in thread
From: Arnout Vandecappelle @ 2014-03-06 17:47 UTC (permalink / raw)
  To: buildroot

On 06/03/14 13:47, Peter K?mmel wrote:
> On 05.03.2014 22:09, Arnout Vandecappelle wrote:
>> On 04/03/14 20:09, Thomas Petazzoni wrote:
>>> Dear Peter Kuemmel,
>>>
>>> On Fri, 14 Feb 2014 11:24:06 +0100, Peter Kuemmel wrote:
>>>
>>>> Thanks, I found the issue: it was the missing user binary thumb
>>>> support in the kernel.
>>>
>>> Interesting. Were you building the kernel with Buildroot, or separately?
>>>
>>> If you built your kernel with Buildroot, then maybe we should add
>>> something like:
>>>
>>>     $(if $(BR2_ARM_INSTRUCTIONS_THUMB)$(BR2_ARM_INSTRUCTIONS_THUMB2),
>>>         $(call KCONFIG_ENABLE_OPT,CONFIG_ARM_THUMB,$(@D)/.config))
>>>
>>> This way we would ensure that the kernel gets built with
>>> CONFIG_ARM_THUMB=y when the Thumb or Thumb-2 instruction sets have been
>>> selected for userspace.
>>
>>   This is a good idea, but wouldn't help with Peter's problem: the
>> pvrsrvctl binary is not built by buildroot, so the problem occurs even if
>> buildroot is build with ARM instructions.
> 
> Yes, pvrsrvctl is not build by buildroot, but this is not the problem.
> pvrsrvctl needs a kernel which supports thumb, so enabling thumb in the
> kernel automatically by buildroot would solve the problem. (And would have
> saved me many hours).

 Yes, but Thomas proposed to add it automatically only when you select to
build everything with thumb. It would not be done in the default case of
BR2_ARM_INSTRUCTIONS_ARM_CHOICE (which you probably have...).

 Regards,
 Arnout

> 
> Peter
> 
>>
>>   Regards,
>>   Arnout
>>
>>>
>>> Thoughts?
>>>
>>> Thomas
>>>
>>
>>
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
> 
> 


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-03-06 17:47 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-13  8:11 [Buildroot] Problem with starting TI Graphics Peter Kuemmel
2014-02-13 21:35 ` Marcelo Gutierrez
2014-02-14 10:24   ` Peter Kuemmel
2014-03-04 19:09     ` Thomas Petazzoni
2014-03-05 21:09       ` Arnout Vandecappelle
2014-03-06 12:47         ` Peter Kümmel
2014-03-06 17:47           ` Arnout Vandecappelle

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.