| Summary: | Lua with hard-float on MIPS by buildroot doesn't work | ||
|---|---|---|---|
| Product: | buildroot | Reporter: | Jinho Yoo <brotherjinho> |
| Component: | Other | Assignee: | Vicente Olivert Riera <vincent.riera> |
| Status: | RESOLVED INVALID | ||
| Severity: | critical | CC: | buildroot |
| Priority: | P5 | ||
| Version: | 2014.11 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Host: | Target: | ||
| Build: | |||
| Attachments: | Our linux build configuration | ||
|
Description
Jinho Yoo
2015-01-29 00:04:18 UTC
Lua version is Lua 5.1. Thanks for the report. I've reassigned the bug to our MIPS guy Vicente. 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. 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. 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". 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.
Created attachment 5834 [details]
Our linux build configuration
It's my linux build configuration.
(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 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 (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. 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) ======================== I cannot reproduce the bug, sorry. Are you still having this problem? 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 It's my mistake. I had to check target board's CPU specification. |