ChromeOS on ARM - vmlemon/understand GitHub Wiki
- Although ARM64 ELF binaries can be run in Crostini, execution will fail, with a misleading error, if copied into the main ChromeOS file system, under
/usr/local/bin
, or/usr/local/sbin
:
chronos@localhost ~/Downloads $ sudo /usr/local/bin/i2cdetect
sudo: unable to execute /usr/local/bin/i2cdetect: No such file or directory
chronos@localhost ~/Downloads $ sudo strace /usr/local/bin/i2cdetect
execve("/usr/local/bin/i2cdetect", ["/usr/local/bin/i2cdetect"], 0xff8322c0 /* 16 vars */) = -1 ENOENT (No such file or directory)
strace: exec: No such file or directory
+++ exited with 1 +++
- ChromeBrew will only build 32-bit executables, and the
objdump
utility will not recognise 64-bit ones:
chronos@localhost ~/Downloads $ file /usr/local/bin/c++-10.2.1
/usr/local/bin/c++-10.2.1: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, stripped
chronos@localhost ~/Downloads $ objdump -x /usr/local/bin/c++-10.2.1
/usr/local/bin/c++-10.2.1: file format elf32-littlearm
/usr/local/bin/c++-10.2.1
architecture: armv7, flags 0x00000112:
EXEC_P, HAS_SYMS, D_PAGED
start address 0x00015e68
Program Header:
0x70000001 off 0x000cdc10 vaddr 0x000ddc10 paddr 0x000ddc10 align 2**2
filesz 0x000011a8 memsz 0x000011a8 flags r--
PHDR off 0x00000034 vaddr 0x00010034 paddr 0x00010034 align 2**2
filesz 0x00000140 memsz 0x00000140 flags r--
INTERP off 0x00000174 vaddr 0x00010174 paddr 0x00010174 align 2**0
filesz 0x00000019 memsz 0x00000019 flags r--
LOAD off 0x00000000 vaddr 0x00010000 paddr 0x00010000 align 2**16
filesz 0x000cedbc memsz 0x000cedbc flags r-x
LOAD off 0x000cf438 vaddr 0x000ef438 paddr 0x000ef438 align 2**16
filesz 0x00001718 memsz 0x00004298 flags rw-
DYNAMIC off 0x000cff00 vaddr 0x000eff00 paddr 0x000eff00 align 2**2
filesz 0x00000100 memsz 0x00000100 flags rw-
NOTE off 0x00000190 vaddr 0x00010190 paddr 0x00010190 align 2**2
filesz 0x00000020 memsz 0x00000020 flags r--
TLS off 0x000cf438 vaddr 0x000ef438 paddr 0x000ef438 align 2**2
filesz 0x00000000 memsz 0x0000000c flags r--
STACK off 0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**4
filesz 0x00000000 memsz 0x00000000 flags rw-
RELRO off 0x000cf438 vaddr 0x000ef438 paddr 0x000ef438 align 2**0
filesz 0x00000bc8 memsz 0x00000bc8 flags r--
Dynamic Section:
NEEDED libm.so.6
NEEDED libc.so.6
NEEDED ld-linux-armhf.so.3
INIT 0x00011ca8
FINI 0x000705fc
INIT_ARRAY 0x000ef438
INIT_ARRAYSZ 0x0000000c
FINI_ARRAY 0x000ef444
FINI_ARRAYSZ 0x00000004
HASH 0x000101b0
GNU_HASH 0x000105dc
STRTAB 0x00011238
SYMTAB 0x000109d8
STRSZ 0x000004d2
SYMENT 0x00000010
DEBUG 0x00000000
PLTGOT 0x000f0000
PLTRELSZ 0x000003e0
PLTREL 0x00000011
JMPREL 0x000118c8
REL 0x00011878
RELSZ 0x00000050
RELENT 0x00000008
VERNEED 0x00011818
VERNEEDNUM 0x00000002
VERSYM 0x0001170a
Version References:
required from ld-linux-armhf.so.3:
0x0d696914 0x00 05 GLIBC_2.4
required from libc.so.6:
0x0d696919 0x00 04 GLIBC_2.9
0x06969191 0x00 03 GLIBC_2.11
0x0d696914 0x00 02 GLIBC_2.4
private flags = 0x5000400: [Version5 EABI] [hard-float ABI]
Sections:
Idx Name Size VMA LMA File off Algn
0 .interp 00000019 00010174 00010174 00000174 2**0
CONTENTS, ALLOC, LOAD, READONLY, DATA
1 .note.ABI-tag 00000020 00010190 00010190 00000190 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
2 .hash 0000042c 000101b0 000101b0 000001b0 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
3 .gnu.hash 000003fc 000105dc 000105dc 000005dc 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
4 .dynsym 00000860 000109d8 000109d8 000009d8 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
5 .dynstr 000004d2 00011238 00011238 00001238 2**0
CONTENTS, ALLOC, LOAD, READONLY, DATA
6 .gnu.version 0000010c 0001170a 0001170a 0000170a 2**1
CONTENTS, ALLOC, LOAD, READONLY, DATA
7 .gnu.version_r 00000060 00011818 00011818 00001818 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
8 .rel.dyn 00000050 00011878 00011878 00001878 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
9 .rel.plt 000003e0 000118c8 000118c8 000018c8 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
10 .init 0000000c 00011ca8 00011ca8 00001ca8 2**2
CONTENTS, ALLOC, LOAD, READONLY, CODE
11 .plt 000005e4 00011cb4 00011cb4 00001cb4 2**2
CONTENTS, ALLOC, LOAD, READONLY, CODE
12 .text 0005e364 00012298 00012298 00002298 2**3
CONTENTS, ALLOC, LOAD, READONLY, CODE
13 .fini 00000008 000705fc 000705fc 000605fc 2**2
CONTENTS, ALLOC, LOAD, READONLY, CODE
14 .rodata 0006cf10 00070608 00070608 00060608 2**3
CONTENTS, ALLOC, LOAD, READONLY, DATA
15 .ARM.extab 000006f8 000dd518 000dd518 000cd518 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
16 .ARM.exidx 000011a8 000ddc10 000ddc10 000cdc10 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
17 .eh_frame 00000004 000dedb8 000dedb8 000cedb8 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
18 .tbss 0000000c 000ef438 000ef438 000cf438 2**2
ALLOC, THREAD_LOCAL
19 .init_array 0000000c 000ef438 000ef438 000cf438 2**2
CONTENTS, ALLOC, LOAD, DATA
20 .fini_array 00000004 000ef444 000ef444 000cf444 2**2
CONTENTS, ALLOC, LOAD, DATA
21 .data.rel.ro 00000ab8 000ef448 000ef448 000cf448 2**2
CONTENTS, ALLOC, LOAD, DATA
22 .dynamic 00000100 000eff00 000eff00 000cff00 2**2
CONTENTS, ALLOC, LOAD, DATA
23 .got 0000031c 000f0000 000f0000 000d0000 2**2
CONTENTS, ALLOC, LOAD, DATA
24 .data 00000834 000f031c 000f031c 000d031c 2**2
CONTENTS, ALLOC, LOAD, DATA
25 .bss 00002b80 000f0b50 000f0b50 000d0b50 2**3
ALLOC
26 .comment 0000002c 00000000 00000000 000d0b50 2**0
CONTENTS, READONLY
27 .ARM.attributes 00000035 00000000 00000000 000d0b7c 2**0
CONTENTS, READONLY
SYMBOL TABLE:
no symbols
chronos@localhost ~/Downloads $ file /usr/local/bin/i2cdetect
/usr/local/bin/i2cdetect: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0, BuildID[sha1]=671c7085ee8b748af840591576f3dc960400a6be, stripped
chronos@localhost ~/Downloads $ objdump -x /usr/local/bin/i2cdetect
objdump: /usr/local/bin/i2cdetect: file format not recognized
The ì2cdetect
binary was obtained from the Crostini Debian environment repositories, and is not supplied by ChromeOS, or ChromeBrew.
-
Astah Professional requires that the Java Development Kit be installed, and will complain about certain versions being unsupported. Versions for ARM64 are available, from the AdoptOpenJDK project, that are compatible with Crostini.
-
Download the
OpenJDK8U-jdk_aarch64_linux_hotspot_jdk8u282-b08.tar.gz
TARBall, and extract it to/opt
-
Use the Debian packages, from https://astah.net/downloads/, to install Astah products, with
dpkg -i
-
It is now possible to run
/opt/jdk8u282-b08/bin/java -Xms16m -Xmx384m -Djava.library.path=/usr/lib/astah_professional/lib/rlm -splash:/usr/lib/astah_professional/astah_splash_professional.png -jar /usr/lib/astah_professional/astah-pro.jar
, to launch Astah. Larger models will require the stack/heap allocation adjusting, to enable PNG exporting to work reliably. -
On high-DPI devices, like the Lenovo ChromeBook Duet, workarounds may be necessary to tune the scaling of Astah windows, to make working more comfortable
Officially, Astah is incompatible with Java 9, but it is possible to force it to run, with 200% scaling, using the following command:
/opt/jdk-9+181/bin/java -Xms16m -Xmx384m -Djava.library.path=/usr/lib/astah_professional/lib/rlm -splash:/usr/lib/astah_professional/astah_splash_professional.png -Dsun.java2d.uiScale=200% -jar /usr/lib/astah_professional/astah-pro.jar -nojvchk
Astah will launch, and display the following error, on standard output, as well as an error dialogue, that should be confirmed:
WARNING!: This Java version is not supported in Astah. Supported Java version is 1.8.0_272 or later.
Note that Astah can not be used with version 9 or later.
Current Java version: 9
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.apache.felix.framework.util.SecureAction$Actions (file:/usr/lib/astah_professional/lib/org.apache.felix.framework.jar) to method java.net.URLClassLoader.addURL(java.net.URL)
WARNING: Please consider reporting this to the maintainers of org.apache.felix.framework.util.SecureAction$Actions
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
ERROR: Unable to resolve 0 (java.lang.IllegalArgumentException: name can't be empty)
java.lang.IllegalArgumentException: name can't be empty
at java.base/java.security.BasicPermission.init(BasicPermission.java:93)
at java.base/java.security.BasicPermission.<init>(BasicPermission.java:130)
at org.osgi.framework.CapabilityPermission.<init>(CapabilityPermission.java:205)
at org.osgi.framework.CapabilityPermission.<init>(CapabilityPermission.java:158)
at org.apache.felix.framework.BundleWiringImpl.<init>(BundleWiringImpl.java:366)
at org.apache.felix.framework.StatefulResolver.markResolvedRevisions(StatefulResolver.java:650)
at org.apache.felix.framework.StatefulResolver.resolve(StatefulResolver.java:189)
at org.apache.felix.framework.Felix.init(Felix.java:673)
at com.change_vision.astah.extension.plugin.PluginManager.e(X:141)
at com.change_vision.astah.extension.plugin.PluginManager.start(X:81)
at JP.co.esm.caddies.jomt.d.run(X:649)
at java.base/java.lang.Thread.run(Thread.java:844)
Exception in thread "starting plugin" java.lang.IllegalStateException: org.osgi.framework.BundleException: Unresolved constraint in System Bundle:null
at com.change_vision.astah.extension.plugin.PluginManager.e(X:143)
at com.change_vision.astah.extension.plugin.PluginManager.start(X:81)
at JP.co.esm.caddies.jomt.d.run(X:649)
at java.base/java.lang.Thread.run(Thread.java:844)
Caused by: org.osgi.framework.BundleException: Unresolved constraint in System Bundle:null
at org.apache.felix.framework.Felix.init(Felix.java:680)
at com.change_vision.astah.extension.plugin.PluginManager.e(X:141)
... 3 more
This is not officially supported by ChangeVision, and may break certain functionality. Java 9 for ARM64 is available from https://adoptopenjdk.net/releases.html?variant=openjdk9&jvmVariant=hotspot, in the [https://github.com/AdoptOpenJDK/openjdk9-binaries/releases/download/jdk-9%2B181/OpenJDK9U-jdk_aarch6
4_linux_hotspot_9_181.tar.gz](OpenJDK9U-jdk_aarch6 4_linux_hotspot_9_181.tar.gz
) package - install it in the same way, as Java 8.
- ChromeOS has a complex mesh of virtualised, and native file systems, and provides differing levels of access to user, and operating system data, depending on whether you are working in Crouton, Crostini, the Android runtime environment, or on the bare Developer Mode shell (CROSH)
- Whilst it is possible to use TAR-over-SSH to back up the raw NAND blocks, or the root filesystem to a Borg instance, without installing Borg on ChromeOS, from within a root CROSH environment, this will not work with services like BorgBase, that do not provide a freely-usable shell environment
-
CromeBrew can be used, to install a low-level set of tools, including Python 3, PIP, the OpenSSL headers, and and the
libacl
development package, as prerequisites for BorgBackup - After installing these, using the
crew
command,pip3.9 install borgbackup
can be used, to install Borg - To be able to access all files within the file system, the
borg
utility should be run usingsudo
QEMU can run on ChromeOS, under Crostini, or Crouton, however, binfmt_misc
support seems to be non-functional, so trying to use QEMU's user-mode binary translation transparently will not be possible:
tysonkey@penguin:~$ ls -l /proc/sys/fs/binfmt_misc
total 0
tysonkey@penguin:~$ sudo update-binfmts --enable
mount: /proc/sys/fs/binfmt_misc: permission denied.
update-binfmts: warning: Couldn't mount the binfmt_misc filesystem on /proc/sys/fs/binfmt_misc.
Trying to install CrossOver will not succeed, even with MultiArch support for AMD64 enabled, using the technique described in the [QEMU User Emulation](https://wiki.debian.org/QemuUserEmulation) page, on the Debian Wiki:
crossover:amd64 : Depends: lib32z1:amd64 but it is not going to be installed Depends: perl:amd64 but it is not going to be installed Depends: python3:amd64 but it is not going to be installed Depends: python3-gi:amd64 but it is not going to be installed Depends: python3-dbus:amd64 but it is not going to be installed Depends: gir1.2-gtk-3.0:amd64 but it is not going to be installed Depends: gir1.2-gdkpixbuf-2.0:amd64 but it is not going to be installed Depends: gir1.2-pango-1.0:amd64 but it is not going to be installed Depends: gir1.2-glib-2.0:amd64 but it is not going to be installed Depends: gir1.2-vte-2.91:amd64 but it is not going to be installed
It is possible to install these components, manually, but this will break package management, until the CrossOver package is removed:
tysonkey@penguin:~$ sudo dpkg -i crossover_20.0.4-1.deb Selecting previously unselected package crossover:amd64. (Reading database ... 134910 files and directories currently installed.) Preparing to unpack crossover_20.0.4-1.deb ... Unpacking crossover:amd64 (20.0.4-1) ... dpkg: dependency problems prevent configuration of crossover:amd64: crossover:amd64 depends on perl. crossover:amd64 depends on python3. crossover:amd64 depends on python3-gi. crossover:amd64 depends on python3-dbus.
dpkg: error processing package crossover:amd64 (--install): dependency problems - leaving unconfigured Errors were encountered while processing: crossover:amd64
Running the ```cxsetup``` shell script, directly will work, although it will bail, with being unable to locate certain
dependencies:
tysonkey@penguin:~$ /opt/cxoffice/bin/cxsetup Could not install some Unix packages Some errors may prevent CrossOver Linux from working correctly.
The following issues can be fixed:
-
https://www.codeweavers.com/support/wiki/Diag/python-vte-2-91 (32-bit) apt-get install gir1.2-vte-2.91
-
https://www.codeweavers.com/support/wiki/Diag/python3-dbus (32-bit) apt-get install python3-dbus
xkbcommon: ERROR: Key "" added to modifier map for multiple modifiers; Using Mod3, ignoring Lock
Trying to invoke it through QEMU will fail, as it does not support running BASH scripts:
tysonkey@penguin:$ qemu-x86_64 /opt/cxoffice/bin/cxsetup
Error while loading /opt/cxoffice/bin/cxsetup: Exec format error
tysonkey@penguin:$ file /opt/cxoffice/bin/cxsetup
/opt/cxoffice/bin/cxsetup: symbolic link to crossover
tysonkey@penguin:$ qemu-x86_64 /opt/cxoffice/bin/crossover
Error while loading /opt/cxoffice/bin/crossover: Exec format error
tysonkey@penguin:$ file /opt/cxoffice/bin/crossover
/opt/cxoffice/bin/crossover: POSIX shell script, ASCII text executable
Installing the x86-64 versions of the prerequisites will cause the ARM64 version of Python to be removed, along with everything else that depends upon it, so attempting this is not recommended!
Creating Bottles will also fail:
tysonkey@penguin:~$ /opt/cxoffice/bin/cxbottle --bottle DemoBottle --create Use of uninitialized value $value in string ne at /opt/cxoffice/lib/perl/CXRWConfig.pm line 190. Use of uninitialized value in concatenation (.) or string at /opt/cxoffice/lib/perl/CXRWConfig.pm line 152. /opt/cxoffice/bin/wineloader: 1: /opt/cxoffice/bin/wineloader: Syntax error: word unexpected (expecting ")") setup:error: 'rundll32 win98Install crossover.inf' failed cxbottle:error: unable to create the 'DemoBottle' bottle in '/home/tysonkey/.cxoffice/DemoBottle'