67 votes

Is it possible to get the information for a device tree using /sys of a running kernel?

/proc/device-tree or /sys/firmware/devicetree/base /proc/device-tree is a symlink to /sys/firmware/devicetree/base and the kernel documentation says userland should stick to /proc/device-tree: ...
Ciro Santilli OurBigBook.com's user avatar
59 votes
Accepted

Porting Linux to another platform requirements

Even though most of the code in the Linux kernel is written in C, there are still many parts of that code that are very specific to the platform where it's running and need to account for that. One ...
filbranden's user avatar
  • 21.8k
27 votes
Accepted

Why doesn’t binary compiled on M1 Mac (arm64) run on EC2 t4g.micro instance (aarch64)?

It’s not enough to have a binary for the same hardware architecture; it also needs to target the appropriate software platform. A binary built for macOS on M1 won’t run on Debian, even on an M1 (let ...
Stephen Kitt's user avatar
21 votes

Install 64 bit programs on a 32 bit OS with a 64 bit processor

Is it possible to install a 64 bit program on a 32 bit OS with a 64 bit processor? In principle yes, but the processor and the OS have to support it. On ARMv8, a 32-bit (Aarch32) kernel cannot run ...
Gilles 'SO- stop being evil''s user avatar
20 votes

What is the difference between different implemetation of arm64/aarch64 for Linux or other software to run on?

Your question could be interpreted as pretty broad, but I think what you're actually asking about is extremely specific. The fundamental difference between the different implementations of arm64 vs. ...
slm's user avatar
  • 370k
18 votes

How to use /dev/fb0 as a console from userspace, or output text to it

If you can cat /dev/urandom > /dev/fb0 and get random pixels on the screen, you have all you need. In my case I needed to dump some text info. I tested this in busybox and raspi, so it might work ...
Zeh's user avatar
  • 281
18 votes

is my linux ARM 32 or 64 bit?

Seems like most ways to see bit count is to somehow know that arm7=32 bit and while that may be true but what about pi@rpi9:~ $ getconf LONG_BIT 32 And if you want to look for the cpu model I ...
lpaseen's user avatar
  • 631
17 votes

Linker script in .so file? (libc.so) Is that right?

When you see a file named .so, it’s not necessarily a shared library. These files are used when linking a program at build-time, not run-time; they are commonly symlinks to the real shared library, ...
Stephen Kitt's user avatar
15 votes

is my linux ARM 32 or 64 bit?

Install the 'lshw' package. # lshw ... description: Computer product: Raspberry Pi 3 Model B Rev 1.2 width: 32 bits ...
Ralph's user avatar
  • 151
12 votes
Accepted

QEMU with KVM with differing host/guest architectures

The naive way to run a virtual machine is to interpret each instruction. The VM software decodes each instruction and runs it. When the instruction set of the virtual machine is the same as the host, ...
Gilles 'SO- stop being evil''s user avatar
12 votes

list all components of an ARM computer in Linux?

The variation of ARM implementations is too high to be covered with the standard tools. Digging down /sys/class you will find all your components, but it's a pain to do so. You can't use find /sys/...
Philippos's user avatar
  • 13.5k
11 votes

Porting Linux to another platform requirements

In addition to porting the Linux kernel, you will need to define the application binary interface (ABI) for "user space" programs and port the lowest layers of the user space software stack. Linux is ...
zwol's user avatar
  • 7,177
10 votes

Meaning of an ampersand prefix in a device tree

From: http://developer.toradex.com/device-tree-customization Nodes can be referenced using the ampersand (&) character and the label. Overwriting properties To overwrite a property, the node ...
Xofo's user avatar
  • 639
9 votes

list all components of an ARM computer in Linux?

For listing hardware in IoT devices, usually the most useful commands after dmesg are cat /proc/cpuinfo and lsusb. In most IoT brands, lsusb reveals itself useful, as for instance sinovoip (banana) ...
Rui F Ribeiro's user avatar
8 votes
Accepted

Building and running a ARM system image with QEMU?

This is a great question and one I chose to dig into myself a while ago, only for me it was using MIPS/MIP64. There are a few issues which make this challenging. When booting a Linux host the Kernel ...
Brian Redbeard's user avatar
8 votes

Is it possible to run x86 executable on ARM?

Each architecture speaks its own hardware language so of course ARM CPUs can only run ARM binaries natively. If you want to run binaries for another architecture you need to use an emulator. The most ...
phuclv's user avatar
  • 2,086
7 votes

How to uniquely identify ARM devices without relying on MAC-address?

Get the serial of the device from /proc/cpuinfo grep Serial /proc/cpuinfo Serial : 1651660a0642ebb0 (taken from my A20 based SoC, Lamobo R1 aka Banana Pi R1 and ArmBian/Jessie with kernel 4.5....
Rui F Ribeiro's user avatar
7 votes

How to remove a systemd wrapper script for sysV service and use a unit file instead?

Synchronizing state of rng-tools.service with SysV service script with /lib/systemd/systemd-sysv-install. Executing: /lib/systemd/systemd-sysv-install enable rng-tools only means that systemd is “...
Stephen Kitt's user avatar
7 votes

Is it possible to run x86 executable on ARM?

Debian has multiarch support which means that you can install and run programs built for one architecture on other architectures. However, you need to take the following into consideration: As the ...
Kapil's user avatar
  • 301
6 votes
Accepted

Static linking util-linux - cross-compiling (produces dynamically linked files instead)

I just figured out why the original commands posted in my question weren't producing static files! I had to run make LDFLAGS="--static". After I did this, everything linked statically! To repeat, I ...
rwx's user avatar
  • 261
6 votes

How to run 32-bit (armhf) binaries on 64-bit (arm64) Debian OS on Raspberry Pi?

I had the same issue (multiple package architecture (armhf) does not match system (arm64) when doing apt install libc6:armhf). For me executing dpkg --add-architecture armhf solved this problem.
FPK's user avatar
  • 161
5 votes

Install 64 bit programs on a 32 bit OS with a 64 bit processor

On some architectures, yes. But not on ARM or x86. You could use QEMU to emulate a 64-bit system, but you don't want to.
Ignacio Vazquez-Abrams's user avatar
5 votes

How to install a functional ARM cross-GCC toolchain on Ubuntu 18.04 (Bionic Beaver)

You can download a functional toolchain from developer.arm.com and install it manually after removing your existing gcc-arm-none-eabi package. Go to that website, click the "Download" button ...
user3486184's user avatar
5 votes
Accepted

Can QEMU -M virt on arm / aarch64 have multiple serial TTYs like such as PL011 ttyAMA0 and ttyAMA1?

this is my multiple serial support patch for virt board in qemu 4.0.1 (official git commit is f9bec78), please enjoy it :-) diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index ...
LastRitter's user avatar
5 votes
Accepted

Ubuntu Jammy (in WSL): adding armhf arch, can't find packages or repositories

Your final sources.list should look something like: deb [ arch=amd64,i386 ] http://archive.ubuntu.com/ jammy main restricted universe multiverse deb [ arch=amd64,i386 ] http://archive.ubuntu.com/ ...
muru's user avatar
  • 73k
4 votes

Set GPIO permissions cleanly

I added the /etc/udev/rules.d/99-gpio.rules to set all permission correctly and cleanly: SUBSYSTEM=="bcm2835-gpiomem", KERNEL=="gpiomem", GROUP="gpio", MODE="0660&...
T. Pham's user avatar
  • 41
4 votes

What do the flags in /proc/cpuinfo mean?

Inspired by the top answer by @Gilles, here is a bash script (requires bash v4 or higher, a network connection, and a recent wget) to annotate the current CPU flags: #! /bin/bash CPUFEATURES="$(...
Will's user avatar
  • 41
4 votes

Is it possible to get the information for a device tree using /sys of a running kernel?

I'm not sure if I understand you correctly. If you're on a system that booted using a dtb, your device tree should be accessible inside debugfs. You can also try the dtc tools by Pantelis Antoniou, ...
FRob's user avatar
  • 181
4 votes

How to disable processor's L1 and L2 caches?

You can accomplish this with a little ASM code, see chapter 11 of the Intel System Programming Guide 11.5.3 Preventing Caching To disable the L1, L2, and L3 caches after they have been ...
Gaius's user avatar
  • 358
4 votes
Accepted

apt-get update: Unable to find expected entry 'main/binary-armel/Packages'

The armel architecture supports ARMv4 instruction set. In the Raspberry Pi family, that is: Raspberry Pi 1 model A Raspberry Pi 1 model B Compute Module 1 Raspberry Pi Zero The armhf architecture ...
Victor's user avatar
  • 147

Only top scored, non community-wiki answers of a minimum length are eligible