Hot answers tagged

99

There are several gradations, since you can run a 32-bit or mixed operating system on a 64-bit-capable CPU. See 64-bit kernel, but all 32-bit ELF executable running processes, how is this? for a detailed discussion (written for x86, but most of it applies to arm as well). You can find the processor model in /proc/cpuinfo. For example: $ cat /proc/cpuinfo ...


58

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 particular example of this is virtual memory, which works in similar fashion on most architectures (hierarchy of page tables) but has specific details for each ...


42

/proc/device-tree or /sys/firmware/devicetree/base I think both are aliases, /sys/firmware/devicetree/base likely being the better choice after the taming of /proc. You can then access dts properties from files: hexdump /sys/firmware/devicetree/base/apb-pclk/clock-frequency The output format for integers is binary, so hexdump is needed. dtc -I fs Get ...


31

As Patrick has indicated in a comment, you got the path under /sys wrong. echo 0 > /sys/devices/system/cpu/cpu3/online If you want to switch all CPUs off except cpu0: for x in /sys/devices/system/cpu/cpu[1-9]*/online; do echo 0 >"$x" done Typing maxcpus=1 at a shell prompt has no effect. More precisely, it sets the variable maxcpus to the value 1 ...


28

Several people have answered the parts of your question dealing with the kernel and putting images (rather than text) onto the framebuffer, but so far the rest remains unaddressed. Yes, you can use the kernel virtual terminal subsystem to make a so-called framebuffer console. But there are several tools that allow you to use the framebuffer device to make ...


27

As richard points out, armv7 variants are all 32-bit, so there is no redundant label armv7-32, etc. On a linux system, you can easily, although not truly definitively, check by examining a common executable: > which bash /bin/bash > file /bin/bash /bin/bash: ELF 32-bit LSB executable, ARM, version 1 (SYSV) ... I say "not definitively" because it is ...


20

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 64-bit (Aarch64) processes. This is a limitation of the processor. There are other processors that don't have this limitation, for example it is possible to run ...


15

You can't easily convert an x86 binary to ARM. If you can't get the source code, or an ARM binary from the manufacturer, and you really do want to use the printer with your Pi2, then the Qemu approach is the correct one in this case, although it will likely be very slow. Qemu does full system emulation but it also works very well for single process emulation....


14

Now that I'm at work, I'll write up a step by step answer. First off you seem to be doing the steps in the wrong order. As such, I'll number these steps in the order they should be executed. mkdir -pv ~/chromium cd ~/chromium git config --global user.name “Joel Maranhao” git config --global user.email “youremail@example.com” git config --global core....


13

TL,DR: if you're only offered a choice of “32-bit” and “64-bit”, neither is right for a Raspberry Pi (or any other ARM-based computer). You need a package for ARM, and the right one to boot, which is armhf. “32-bit” and “64-bit” are only one of the characteristics of a processor architecture. Many processor families come in both 32-bit and 64-bit variants (...


12

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 for you. The answer might be a little bit long, since if you don't use some console you will need to print the pixels of chars yourself. Luckily someone have ...


12

Install the 'lshw' package. # lshw ... description: Computer product: Raspberry Pi 3 Model B Rev 1.2 width: 32 bits ...


12

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/class -name name to find all the components because of the symbolic links. You neither can use find -L because of the circle links. cat /sys/class/*/*/device/*/{,...


12

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, but at least on systems using GNU ld they can also be linker scripts, and that’s perfectly OK. If you look on a modern glibc-based system you’ll find that libc.so ...


11

x86 Find it yourself in 4.1.3 x86 and the Intel manual arch/x86/include/asm/cpufeature.h contains the full list. The define values are of type: X*32 + Y E.g.: #define X86_FEATURE_FPU ( 0*32+ 0) /* Onboard FPU */ The features flags, extracted from CPUID, are stored inside the: __u32 x86_capability[NCAPINTS + NBUGINTS]; field of struct cpuinfo_x86 ...


11

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. aarch64. At the heart of your question is that different CPUs provide different instruction sets. I typically reference this Wikipedia page titled: List of ...


11

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 typically used with low-level user space components from the GNU project, of which the most critical are: The C compiler, assembler, and linker: GCC and GNU ...


10

Or alternatively you can use cpuid program, it must be in debian repository. It dumps every possible info about your CPU with some explanations, so you don't get those obscure flags.


8

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 normally use arch root@rpi4:~# tr '\0' '\n' </proc/device-tree/model;arch Raspberry Pi Model B Rev 2 armv6l pi@rpi9:~ $ tr '\0' '\n' </proc/device-tree/model;...


8

I made it :-) I basically followed Gilles's advice and decided to do it properly: i.e. manage a complete cross-compilation of GLIBC. I started from crosstool-ng, and was initially disappointed - seeing that it didn't support my old kernel. I kept at it, though - manually editing the configuration file saved by crosstool-ng to do changes like these on the ...


8

el stands for little-endian; see the email explaining (briefly) the decision; the follow-up emails contain more information. Endianness isn't the most distinguishing feature of armel, but that's the name that was chosen... Further evidence is in Wookey's Debconf7 talk introducing the armel architecture; in the video at 26:47 he explicitly says "armel, ...


8

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, an alternative method is to simply execute the instructions. Only a few instructions can't be executed directly because the guest doesn't have full control ...


8

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) tends to connect a lot of the hardware to the USB(s) controller(s). As for listing ALL the components; that won't be possible. There are no reliable methods to ...


7

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 needs to be referenced using the ampersand character and the label. Later device tree entries overwrite earlier entries (the sequence order of entries is what ...


7

In the ARM world from ARMv4 to ARMv7 floating-point support is called VFP, and hardware support for it appears in the Features line of /proc/cpuinfo or in the VFP support log message printed by the kernel while booting. (In ARMv8 it's just "FP".) In /proc/cpuinfo on an Allwinner A20 this gives: Features : swp half thumb fastmult vfp edsp thumbee neon ...


7

If I were to guess, your sh favours simplicity or performance over user friendliness. The "permission denied" error is that provided by perror(3), a standard function for printing an error message. For example: $ cat foo.c #include <stdio.h> #include <unistd.h> int main() { char* const args[] = { "/usr", NULL }; if (execv(args[0],...


7

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.2) grep Serial /proc/cpuinfo Serial : 64355040058f0d000000 (taken from my H3 based Soc, Orange Pi One with Armbian/Jessie kernel 3.4) Getting Your ...


7

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 needs to understand the hardware which it is working with. For some architectures (like amd64) the discovery of firmware is handled by the BIOS via "...


7

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 “aware” that there’s a sysvinit-style init script present, and that it needs to take it into account when considering the state of the rng-tools service. It doesn’t ...


6

"Linux", strictly speaking, is an operating system kernel used by both Android and the unix-like operating system referred to colloquially as linux, and sometimes more formally as GNU/Linux which we know via distributions such as ubuntu and debian. Linux, the operating system kernel, is written in C and must be compiled to native machine code. I think ...


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