Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Orange Pi PC: /usr/bin/su is a x86-64 binary

Featured Replies

I just discovered that /usr/bin/su in my Armbian:

 

 v26.2.1 for Orange Pi PC running Armbian Linux 6.12.58-current-sunxi
 

is a x86_64 binary:

 

$ ls -l /usr/bin/su
-rwsr-xr-x 1 root root 50800 Mar  6 13:10 /usr/bin/su

 

$ file /usr/bin/su
/usr/bin/su: setuid ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, no section header
 

I installed the rust version, su-rs, but I thought it would be useful to warn about this. 

 

I checked /usr/bin and /usr/sbin and this is the only x86-64 executable.

Edited by AlexaDP

Solved by Werner

Yes, applications are compiled into binaries, su is not a script.

 

This is on for example Arch:

$ file $(which su)

/usr/bin/su: setuid ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=d47af40eeb87fea42d555df0d1385bc9a4b4df2c, for GNU/Linux 4.4.0, stripped

 

Quote

I installed the rust version, su-rs, but I thought it would be useful to warn about this. 

 

Ok? So it's compiled with rust instead of C, still a binary.

 

Quote

I checked /usr/bin and /usr/sbin and this is the only x86-64 executable.

 

I find that extremely hard impossible to believe.

 

https://www.reddit.com/r/learnprogramming/comments/lyw9gf/can_someone_explain_what_people_mean_by_binaries

Edited by bedna

Bedna

 

I know that su  command is a compiled binary but Orange Pi PC has a 32 bit ARM processor and not a 64 bit Intel (x86_64) processor.

 

I find that extremely hard and impossible to believe that you missed the point.

Edited by AlexaDP

  • Solution

If this is really the case, then this must be an upstream issue since Armbian does not touch this file AFAIK.

 

Picked a random userspace from armhf (since you did not state which you are using)

 

~/build/cache/rootfs/bin# file su
su: setuid ELF 32-bit LSB pie executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, BuildID[sha1]=b24ceef58082e181650b17e52819559be2d3a97b, for GNU/Linux 3.2.0, stripped

 

It's ARMv7 so it could potentially run 64bit instructions.

 

https://developer.arm.com/documentation/den0013/0400/Introduction-to-Assembly-Language/The-ARM-instruction-sets

Quote

The ARMv7 architecture is a 32-bit processor architecture. It is also a load/store architecture, meaning that data-processing instructions operate only on values in general purpose registers. Only load and store instructions access memory. General purpose registers are also 32 bits. Throughout this book, when we refer to a word, we mean 32 bits. A doubleword is therefore 64 bits and a halfword is 16 bits wide.

Though the ARMv7 architecture is a 32-bit architecture, individual processor implementations do not necessarily have 32-bit width for all blocks and interconnections. For example, it is possible to have 64-bit, or wider paths for instruction fetches or data accesses.

 

I recall reading that opi pc is running 64-bit from someone here on armbian forums now that I think about it, but don't remember where.

It could also be a Mandela effect and I am completely wrong.

If so, I'm sorry, did not mean to make you upset.

 

8 hours ago, AlexaDP said:

I find that extremely hard and impossible to believe that you missed the point.

 

Not hard to miss at all, or you think everybody has every single board memorized? 😉

If you included that you think it should run 32 bit instructions and has a 32bit kernel, I would have asked you to provide "uname -m" to confirm, no need to be nasty. 🙃

Kinda strange that you could get the system running with su in 64bit with a 32bit kernel though.

Dear Bedna

 

Even though the Orange Pi PC had a 64-bit ARM processor it could not execute a program of the Intel x86-64 architecture


The purpose of my post was not to ask for help, it was simply to notify the port maintainer(s) for this SoC that there was a command/executable/compiled/binary/program (use the name that looks best and most correct for you) of the Intel 64 architecture in the /usr/ bin directory of an ARM 32 system.


I did not imagine that Armbian foruns get so hostile and aggressive and I will close my account as soon as possible.

I again apologize, even though I can not see what was "hostile" in what I wrote. I simply misunderstood and apologized for that, even though I think you are the passive aggressive one here.

I am so sorry.

(I will add you to ignore list so I will never accidentally interact with you again, so no need to leave the community if it is due to me)

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.