Skip to content

[dfu-util] Cannot execute i686 files on 32-bit systems #45

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jgillick opened this issue Oct 20, 2019 · 5 comments
Closed

[dfu-util] Cannot execute i686 files on 32-bit systems #45

jgillick opened this issue Oct 20, 2019 · 5 comments
Labels
bug 🐛 Something isn't working
Milestone

Comments

@jgillick
Copy link
Contributor

First off, I apologize if I am misunderstanding the structure of linux/linux_x86_64.

From what I can tell, the linux directory is for i686 systems (32-bit). However, when I was just trying to test it in a 32-bit virtualized environment, it seems that both versions of dfu-util are compiled for 64-bit systems and will not execute on 32-bit.

I was running this in Ubuntu 16.04, 32-bit, in VMWare Fusion on my mac.

Error:

$ ./linux/dfu-util/dfu-util
bash: ./linux/dfu-util/dfu-util: cannot execute binary file: Exec format error

Relevant output:

$ uname -m
i686

$ file ./linux/dfu-util/dfu-util
./linux/dfu-util/dfu-util: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib, for GNU/Linux 2.6.32, BuildID[sha1]=c58354ce3ca661a39bc97aacb5beffa73cf5dfb3, not stripped

$ file ./linux/dfu-util_x86_64/dfu-util
./linux/dfu-util_x86_64/dfu-util: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib, for GNU/Linux 2.6.32, BuildID[sha1]=683c50b08daafbb5db685fc3d9503d0c160fe108, not stripped
@jgillick jgillick changed the title [dfu-util] i686 files don't run on 32-bit systems [dfu-util] i686 files don't work on 32-bit systems Oct 20, 2019
@jgillick jgillick changed the title [dfu-util] i686 files don't work on 32-bit systems [dfu-util] Cannot execute i686 files on 32-bit systems Oct 20, 2019
@fpistm
Copy link
Member

fpistm commented Oct 21, 2019

Hi @jgillick
Right, I've missed that when refactoring.
In fact dfu-util binaries came from legacy core for Roger.
I didn't check arch and assuming thy are aligned (linux: 32 bits and linux64: 64 bits).
To solve this the 32 bits version needs to be provided.

@jgillick
Copy link
Contributor Author

I could compile the 32-bit version in the virtualized environment I have and provide a PR if that would be helpful.

@fpistm
Copy link
Member

fpistm commented Oct 21, 2019

It would be helpful, like this you could test it.

@jgillick
Copy link
Contributor Author

Good news. I just confirmed that the official i386 binaries, linked from the dfu-util site (http://dfu-util.sourceforge.net/releases/dfu-util-0.8-binaries.tar.xz), work for 32-bit systems. I'm adding this to my existing PR: #46

@fpistm
Copy link
Member

fpistm commented Oct 21, 2019

Thanks a lot @jgillick
I will review that soon.

@fpistm fpistm added this to the 1.3.2 milestone Dec 19, 2019
@fpistm fpistm added the Bug label Dec 19, 2019
@fpistm fpistm closed this as completed Dec 19, 2019
@fpistm fpistm added bug 🐛 Something isn't working and removed Bug labels Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants