All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [Bug 7844] New: Lua with hard-float on MIPS by buildroot doesn't work
@ 2015-01-29  0:04 bugzilla at busybox.net
  2015-01-29  0:06 ` [Buildroot] [Bug 7844] " bugzilla at busybox.net
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: bugzilla at busybox.net @ 2015-01-29  0:04 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=7844

           Summary: Lua with hard-float on MIPS by buildroot doesn't work
           Product: buildroot
           Version: 2014.11
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: critical
          Priority: P5
         Component: Other
        AssignedTo: unassigned at buildroot.uclibc.org
        ReportedBy: brotherjinho at gmail.com
                CC: buildroot at uclibc.org
   Estimated Hours: 0.0


I found something strange.

I wrote simple script that print the variable in Lua. It worked on x86 on
linux. I tried to run it on my target device that is MIPS little endian. I
prepared the lua by buildroot. I used 'hard-float' option for performance
issue. But this simple script doesn't work. I used Sourcery CodeBench.

I tested it with 'soft-float' option. Then lua worked correctly. Have you the
experience like that?

The lua code is like below.

=================
local var = 131523;
print(var);
=================

It must print 131523. But my target printed 0 . What's wrong?

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

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

* [Buildroot] [Bug 7844] Lua with hard-float on MIPS by buildroot doesn't work
  2015-01-29  0:04 [Buildroot] [Bug 7844] New: Lua with hard-float on MIPS by buildroot doesn't work bugzilla at busybox.net
@ 2015-01-29  0:06 ` bugzilla at busybox.net
  2015-01-29  8:18 ` bugzilla at busybox.net
                   ` (12 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: bugzilla at busybox.net @ 2015-01-29  0:06 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=7844

--- Comment #1 from Jinho Yoo <brotherjinho@gmail.com> 2015-01-29 00:06:55 UTC ---
Lua version is Lua 5.1.

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

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

* [Buildroot] [Bug 7844] Lua with hard-float on MIPS by buildroot doesn't work
  2015-01-29  0:04 [Buildroot] [Bug 7844] New: Lua with hard-float on MIPS by buildroot doesn't work bugzilla at busybox.net
  2015-01-29  0:06 ` [Buildroot] [Bug 7844] " bugzilla at busybox.net
@ 2015-01-29  8:18 ` bugzilla at busybox.net
  2015-01-29 10:51 ` bugzilla at busybox.net
                   ` (11 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: bugzilla at busybox.net @ 2015-01-29  8:18 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=7844

Thomas Petazzoni <thomas.petazzoni@free-electrons.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at buildroot.uclibc |vincent.riera at imgtec.com
                   |.org                        |

--- Comment #2 from Thomas Petazzoni <thomas.petazzoni@free-electrons.com> 2015-01-29 08:18:41 UTC ---
Thanks for the report. I've reassigned the bug to our MIPS guy Vicente.

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

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

* [Buildroot] [Bug 7844] Lua with hard-float on MIPS by buildroot doesn't work
  2015-01-29  0:04 [Buildroot] [Bug 7844] New: Lua with hard-float on MIPS by buildroot doesn't work bugzilla at busybox.net
  2015-01-29  0:06 ` [Buildroot] [Bug 7844] " bugzilla at busybox.net
  2015-01-29  8:18 ` bugzilla at busybox.net
@ 2015-01-29 10:51 ` bugzilla at busybox.net
  2015-01-29 11:05 ` bugzilla at busybox.net
                   ` (10 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: bugzilla at busybox.net @ 2015-01-29 10:51 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=7844

--- Comment #3 from Vicente Olivert Riera <vincent.riera@imgtec.com> 2015-01-29 10:51:14 UTC ---
Hello.

I have done a Buildroot build for x86_64 using the Sourcery CodeBench toolchain
and then I chrooted into it to check if this problem is not present in other
architectures.

I have never used Lua so, please tell me if this is expected:

# chroot images /bin/bash
bash-4.3# lua  
Lua 5.1.5  Copyright (C) 1994-2012 Lua.org, PUC-Rio
> local var = 12345
> print(var)
nil
> var = 12345
> print(var)
12345

I see exactly the same behavior on MIPS big endian, tested in real hardware,
for both soft and hard float. I will check it on little endian if you think
that is necessary.

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

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

* [Buildroot] [Bug 7844] Lua with hard-float on MIPS by buildroot doesn't work
  2015-01-29  0:04 [Buildroot] [Bug 7844] New: Lua with hard-float on MIPS by buildroot doesn't work bugzilla at busybox.net
                   ` (2 preceding siblings ...)
  2015-01-29 10:51 ` bugzilla at busybox.net
@ 2015-01-29 11:05 ` bugzilla at busybox.net
  2015-01-29 11:17 ` bugzilla at busybox.net
                   ` (9 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: bugzilla at busybox.net @ 2015-01-29 11:05 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=7844

--- Comment #4 from Gustavo Zacarias <gustavo@zacarias.com.ar> 2015-01-29 11:05:27 UTC ---
Vicente: yes, it's expected, see http://www.lua.org/pil/4.2.html (search for
interactive, it's not considered the same block in that case).
Try to run it from a file.

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

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

* [Buildroot] [Bug 7844] Lua with hard-float on MIPS by buildroot doesn't work
  2015-01-29  0:04 [Buildroot] [Bug 7844] New: Lua with hard-float on MIPS by buildroot doesn't work bugzilla at busybox.net
                   ` (3 preceding siblings ...)
  2015-01-29 11:05 ` bugzilla at busybox.net
@ 2015-01-29 11:17 ` bugzilla at busybox.net
  2015-01-29 12:16 ` bugzilla at busybox.net
                   ` (8 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: bugzilla at busybox.net @ 2015-01-29 11:17 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=7844

--- Comment #5 from Carlos Santos <unixmania@gmail.com> 2015-01-29 11:17:42 UTC ---
This is the expected behavior, as documented on http://www.lua.org/pil/4.2.html

$ rpm -qi lua
Name        : lua
Version     : 5.2.2
Release     : 8.fc21
Architecture: x86_64
Install Date: Wed 03 Dec 2014 06:33:31 PM BRST
Group       : Development/Languages
Size        : 602972
License     : MIT
Signature   : RSA/SHA256, Sun 17 Aug 2014 12:08:57 PM BRT, Key ID
89ad4e8795a43f54
Source RPM  : lua-5.2.2-8.fc21.src.rpm
Build Date  : Sun 17 Aug 2014 11:59:50 AM BRT
Build Host  : buildhw-02.phx2.fedoraproject.org
Relocations : (not relocatable)
Packager    : Fedora Project
Vendor      : Fedora Project
URL         : http://www.lua.org/
Summary     : Powerful light-weight programming language
[...]
$ lua
Lua 5.2.2  Copyright (C) 1994-2013 Lua.org, PUC-Rio
> local var = 12345
> print(var)
nil
> var = 12345
> print(var)
12345
> if 6 > 4 then
>> local var = 12345
>> print(var)
>> end
12345
> 

I'd close this as "not a bug".

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

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

* [Buildroot] [Bug 7844] Lua with hard-float on MIPS by buildroot doesn't work
  2015-01-29  0:04 [Buildroot] [Bug 7844] New: Lua with hard-float on MIPS by buildroot doesn't work bugzilla at busybox.net
                   ` (4 preceding siblings ...)
  2015-01-29 11:17 ` bugzilla at busybox.net
@ 2015-01-29 12:16 ` bugzilla at busybox.net
  2015-01-30 14:43 ` bugzilla at busybox.net
                   ` (7 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: bugzilla at busybox.net @ 2015-01-29 12:16 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=7844

--- Comment #6 from Vicente Olivert Riera <vincent.riera@imgtec.com> 2015-01-29 12:16:51 UTC ---
I have tested it on real MIPS hardware. I have built a Buildroot rootfs for
MIPS32 Little-Endian Hard-Float using the Sourcery CodeBench toolchain.

This is the defconfig I have used:

BR2_mipsel=y
# BR2_MIPS_SOFT_FLOAT is not set
BR2_TOOLCHAIN_EXTERNAL=y
BR2_INIT_SYSV=y
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y
BR2_TARGET_GENERIC_ROOT_PASSWD="root"
BR2_PACKAGE_LUA=y

It works for me:

Welcome to Buildroot
buildroot login: root
Password: 
# cat > test.lua << EOF
> local var = 12345;
> print(var);
> EOF
# lua test.lua 
12345

What target device do you have? Can you share your defconfig with us? What
kernel are you using?

Thanks.

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

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

* [Buildroot] [Bug 7844] Lua with hard-float on MIPS by buildroot doesn't work
  2015-01-29  0:04 [Buildroot] [Bug 7844] New: Lua with hard-float on MIPS by buildroot doesn't work bugzilla at busybox.net
                   ` (5 preceding siblings ...)
  2015-01-29 12:16 ` bugzilla at busybox.net
@ 2015-01-30 14:43 ` bugzilla at busybox.net
  2015-01-30 14:46 ` bugzilla at busybox.net
                   ` (6 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: bugzilla at busybox.net @ 2015-01-30 14:43 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=7844

--- Comment #7 from Jinho Yoo <brotherjinho@gmail.com> 2015-01-30 14:43:39 UTC ---
Created attachment 5834
  --> https://bugs.busybox.net/attachment.cgi?id=5834
Our linux build configuration

It's my linux build configuration.

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

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

* [Buildroot] [Bug 7844] Lua with hard-float on MIPS by buildroot doesn't work
  2015-01-29  0:04 [Buildroot] [Bug 7844] New: Lua with hard-float on MIPS by buildroot doesn't work bugzilla at busybox.net
                   ` (6 preceding siblings ...)
  2015-01-30 14:43 ` bugzilla at busybox.net
@ 2015-01-30 14:46 ` bugzilla at busybox.net
  2015-01-31  0:48 ` bugzilla at busybox.net
                   ` (5 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: bugzilla at busybox.net @ 2015-01-30 14:46 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=7844

--- Comment #8 from Vicente Olivert Riera <vincent.riera@imgtec.com> 2015-01-30 14:46:01 UTC ---
(In reply to comment #7)
> Created attachment 5834 [details]
> Our linux build configuration
> 
> It's my linux build configuration.

Please, tell us:
1. what target device are you using
2. what kernel version are you using
3. what defconfig are you using to generate the buildroot rootfs

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

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

* [Buildroot] [Bug 7844] Lua with hard-float on MIPS by buildroot doesn't work
  2015-01-29  0:04 [Buildroot] [Bug 7844] New: Lua with hard-float on MIPS by buildroot doesn't work bugzilla at busybox.net
                   ` (7 preceding siblings ...)
  2015-01-30 14:46 ` bugzilla at busybox.net
@ 2015-01-31  0:48 ` bugzilla at busybox.net
  2015-02-03 12:21 ` bugzilla at busybox.net
                   ` (4 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: bugzilla at busybox.net @ 2015-01-31  0:48 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=7844

--- Comment #9 from Jinho Yoo <brotherjinho@gmail.com> 2015-01-31 00:48:47 UTC ---
OK, I see. 

>1. what target device are you using
It's MIPS Little endian device. We're developing our own embedded system by
collaborating other H/W company. 

>2. what kernel version are you using
It's Linux kernel release 3.x. 

>3. what defconfig are you using to generate the build root rootfs
Please check the attached file.
(https://bugs.busybox.net/attachment.cgi?id=5834). We don't use buildroot to
build kernel. We're using buildroot to build 3rd parties. 

Jinho Yoo

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

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

* [Buildroot] [Bug 7844] Lua with hard-float on MIPS by buildroot doesn't work
  2015-01-29  0:04 [Buildroot] [Bug 7844] New: Lua with hard-float on MIPS by buildroot doesn't work bugzilla at busybox.net
                   ` (8 preceding siblings ...)
  2015-01-31  0:48 ` bugzilla at busybox.net
@ 2015-02-03 12:21 ` bugzilla at busybox.net
  2015-02-03 14:13 ` bugzilla at busybox.net
                   ` (3 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: bugzilla at busybox.net @ 2015-02-03 12:21 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=7844

--- Comment #10 from Vicente Olivert Riera <vincent.riera@imgtec.com> 2015-02-03 12:21:27 UTC ---
(In reply to comment #9)
> >1. what target device are you using
> It's MIPS Little endian device. We're developing our own embedded system by
> collaborating other H/W company. 

Ok, so it's not a common device but a custom one you are developing. Could you
tell me at least which SoC are you using?

> >2. what kernel version are you using
> It's Linux kernel release 3.x. 

3.x? Please, tell me the exact version you are using so I can try to reproduce
your problem. If you tell me 3.x, what kernel should I try? 3.0, 3.0.1, 3.0.2,
... 3.18.3, 3.19?

> >3. what defconfig are you using to generate the buildroot rootfs
> Please check the attached file.
> (https://bugs.busybox.net/attachment.cgi?id=5834). We don't use buildroot to
> build kernel. We're using buildroot to build 3rd parties. 

I didn't say anything about the kernel here. I wanted to see the defconfig you
are using to build the Buildroot rootfs. You have attached a binary file. The
defconfig should be a text file.

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

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

* [Buildroot] [Bug 7844] Lua with hard-float on MIPS by buildroot doesn't work
  2015-01-29  0:04 [Buildroot] [Bug 7844] New: Lua with hard-float on MIPS by buildroot doesn't work bugzilla at busybox.net
                   ` (9 preceding siblings ...)
  2015-02-03 12:21 ` bugzilla at busybox.net
@ 2015-02-03 14:13 ` bugzilla at busybox.net
  2015-04-02 15:21 ` bugzilla at busybox.net
                   ` (2 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: bugzilla at busybox.net @ 2015-02-03 14:13 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=7844

--- Comment #11 from Jinho Yoo <brotherjinho@gmail.com> 2015-02-03 14:13:12 UTC ---


Sorry for my late response. 

The kernel version we are using is 3.8.13. 

The attached file is ascii file, not binary. Please try to open it via text
editor. 

Well.. Is it enough information? 
========================
MIPS32 Core

- MIPS32 APTIV UP Core
- 32KB instruction and 32KB data L1 cache
- VPE(Virtual Processing Element)
- Hardware TC(Thread Context)
========================

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

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

* [Buildroot] [Bug 7844] Lua with hard-float on MIPS by buildroot doesn't work
  2015-01-29  0:04 [Buildroot] [Bug 7844] New: Lua with hard-float on MIPS by buildroot doesn't work bugzilla at busybox.net
                   ` (10 preceding siblings ...)
  2015-02-03 14:13 ` bugzilla at busybox.net
@ 2015-04-02 15:21 ` bugzilla at busybox.net
  2015-04-02 15:26 ` bugzilla at busybox.net
  2015-04-02 15:28 ` bugzilla at busybox.net
  13 siblings, 0 replies; 15+ messages in thread
From: bugzilla at busybox.net @ 2015-04-02 15:21 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=7844

--- Comment #12 from Vicente Olivert Riera <vincent.riera@imgtec.com> 2015-04-02 15:21:39 UTC ---
I cannot reproduce the bug, sorry. Are you still having this problem?

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

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

* [Buildroot] [Bug 7844] Lua with hard-float on MIPS by buildroot doesn't work
  2015-01-29  0:04 [Buildroot] [Bug 7844] New: Lua with hard-float on MIPS by buildroot doesn't work bugzilla at busybox.net
                   ` (11 preceding siblings ...)
  2015-04-02 15:21 ` bugzilla at busybox.net
@ 2015-04-02 15:26 ` bugzilla at busybox.net
  2015-04-02 15:28 ` bugzilla at busybox.net
  13 siblings, 0 replies; 15+ messages in thread
From: bugzilla at busybox.net @ 2015-04-02 15:26 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=7844

--- Comment #13 from Jinho Yoo <brotherjinho@gmail.com> 2015-04-02 15:26:44 UTC ---
Dear Everybody. 

 I found the reason. The CPU on target board doesn't have floating point
calculation unit. I got this information from our H/W partner. I'm very sorry
to make you guys confuse. 

 Regards, 
Jinho Yoo

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

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

* [Buildroot] [Bug 7844] Lua with hard-float on MIPS by buildroot doesn't work
  2015-01-29  0:04 [Buildroot] [Bug 7844] New: Lua with hard-float on MIPS by buildroot doesn't work bugzilla at busybox.net
                   ` (12 preceding siblings ...)
  2015-04-02 15:26 ` bugzilla at busybox.net
@ 2015-04-02 15:28 ` bugzilla at busybox.net
  13 siblings, 0 replies; 15+ messages in thread
From: bugzilla at busybox.net @ 2015-04-02 15:28 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=7844

Jinho Yoo <brotherjinho@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID

--- Comment #14 from Jinho Yoo <brotherjinho@gmail.com> 2015-04-02 15:28:00 UTC ---
It's my mistake. I had to check target board's CPU specification.

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

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

end of thread, other threads:[~2015-04-02 15:28 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-29  0:04 [Buildroot] [Bug 7844] New: Lua with hard-float on MIPS by buildroot doesn't work bugzilla at busybox.net
2015-01-29  0:06 ` [Buildroot] [Bug 7844] " bugzilla at busybox.net
2015-01-29  8:18 ` bugzilla at busybox.net
2015-01-29 10:51 ` bugzilla at busybox.net
2015-01-29 11:05 ` bugzilla at busybox.net
2015-01-29 11:17 ` bugzilla at busybox.net
2015-01-29 12:16 ` bugzilla at busybox.net
2015-01-30 14:43 ` bugzilla at busybox.net
2015-01-30 14:46 ` bugzilla at busybox.net
2015-01-31  0:48 ` bugzilla at busybox.net
2015-02-03 12:21 ` bugzilla at busybox.net
2015-02-03 14:13 ` bugzilla at busybox.net
2015-04-02 15:21 ` bugzilla at busybox.net
2015-04-02 15:26 ` bugzilla at busybox.net
2015-04-02 15:28 ` bugzilla at busybox.net

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.