running 32 bit arm
#1
Can anyone point me in the direction of how to get 32 bit ARM packages running on Arch Linux aarch64?

My understanding is that armv8 (or aarch64) is backwards compatible, but I have no idea how to enable this.

The software I am trying to run is btsync.

It seems possible on Debian, http://forum.odroid.com/viewtopic.php?f=135&t=18806.  In that forum post, all that was needed was libc6 for armhf.  But specifying the desired alternate architecture in Arch linux does not seem to work when trying to install libc6 with either pacman or yaourt:

$ file btsync
btsync: ELF 32-bit LSB executable, ARM, EABI5 version 1 (GNU/Linux), dynamically linked, interpreter /lib/ld-linux.so.3, for GNU/Linux 3.2.0, BuildID[sha1]=c586701ab44d098336c08f952ac7cdf27373a1be, stripped

Which indicates that ld-linux.so.3 is required (which as I understand is in libc6 package on Debian)

But if I try to install libc6 on Arch:

$ yaourt -S --arch arm libc6
error: target not found: libc6

After investigating further, it seems libc6 is actually called glibc in Arch Linux - but I still cannot figure out how to install it for ARM and not aarch64:

$ pacman -S --arch arm glibc
warning: glibc-2.23-1 is up to date -- reinstalling
error: failed to prepare transaction (package architecture is not valid)
:: package glibc-2.23-1-aarch64 does not have a valid architecture
  Reply
#2
The armv8 processors can run in 32bit mode (like the Raspberry Pi 3 currently does) but the Linuxes do not support a mixed mode.

So everything is either 32 bit (OS and userland) or 64 bit.

You would have to build a 64bit btsync from source, but it's closed source, so that's no option.

A 32bit Linux does not exist for the Pine, so you cannot run the btsync binary.

Edit:

After reading the refered Debian post it indeed looks possible with the Debian multi Arch framework, but trying to reproduce this on Arch linux is obviously not the easy road.

You have two challenges at once:

Running Debian packages on Arch and running 32bit apps on a 64bit platform. Regarding the latter, I am not familiar with the Arch features for multi arch.

I would start with using the Debian based Ubuntu image instead of the Arch image.

If you really want to use Arch instead of Ubuntu then you should first try to run a simple standard Arch 32 bit binary like eg "cat" on your 64bit Arch installation. If that works you could focus on the Debian btsync.

Edit 2:

You'll need a kernel compiled with the

config ARMV7_COMPAT

option set for 32bit compatibility. See

https://github.com/longsleep/linux-pine6...64/Kconfig

Just checked, the longsleep kernel has this option set, so it should be possible to get it working...


Edit 3:

Shouldn't you use something like

pacman -S --arch armv7h glibc

instead of "arm"?
  Reply
#3
There are Debian Jessie (arrch64) rootfs options that I added links for under the Debian section on this forum. Check it out.
If you like my work be sure to check out my site or wish to donate to the cause

Cheers Big Grin
  Reply
#4
(04-03-2016, 01:39 AM)tomtor Wrote: Shouldn't you use something like

pacman -S --arch armv7h glibc

instead of "arm"?

$ sudo pacman -S --arch armv7h glibc
warning: glibc-2.23-1 is up to date -- reinstalling
error: failed to prepare transaction (package architecture is not valid)
:: package glibc-2.23-1-aarch64 does not have a valid architecture

Guess I might need to add the repository? https://wiki.archlinux.org/index.php/uno...rmv7h_only 

I will try out a Debian image to see if I can replicate the multiarch stuff.  But I assume that will work.  Since I've got a bunch of stuff already running on arch linux, it'd be nice not to have to switch distributions.  I've finally got syncthing running in place of btsync without eating up a ton a CPU resources, so this isn't urgent, just a curiosity.
  Reply
#5
If you are familiar with Docker, you can run a 32Bit Debian based container under Arch. Might be the easiest way to run a 32 bit executable without messing up your host environment.
  Reply
#6
(04-04-2016, 09:30 AM)[email protected] Wrote:
(04-03-2016, 01:39 AM)tomtor Wrote: Shouldn't you use something like

pacman -S --arch armv7h glibc

instead of "arm"?

$ sudo pacman -S --arch armv7h glibc
warning: glibc-2.23-1 is up to date -- reinstalling
error: failed to prepare transaction (package architecture is not valid)
:: package glibc-2.23-1-aarch64 does not have a valid architecture

Guess I might need to add the repository? https://wiki.archlinux.org/index.php/uno...rmv7h_only 

I will try out a Debian image to see if I can replicate the multiarch stuff.  But I assume that will work.  Since I've got a bunch of stuff already running on arch linux, it'd be nice not to have to switch distributions.  I've finally got syncthing running in place of btsync without eating up a ton a CPU resources, so this isn't urgent, just a curiosity.

How did you get syncthing running? I installed prebuild arm64 from https://github.com/syncthing/syncthing/r....21.tar.gz . It starts fine and I can connect to other devices and accept sync folder. Only the syncing itself doesn't happen. Curious how you installed it on my PINE64 devices with Ubuntu Xenial and longsleep's kernel and /or how to go about finding the fault of this problem as syncthing is running without problem on all of my other devices. See also http://forum.pine64.org/showthread.php?tid=3176
  Reply
#7
(01-25-2017, 10:15 AM)Pander Wrote:
(04-04-2016, 09:30 AM)[email protected] Wrote:
(04-03-2016, 01:39 AM)tomtor Wrote: Shouldn't you use something like

pacman -S --arch armv7h glibc

instead of "arm"?

$ sudo pacman -S --arch armv7h glibc
warning: glibc-2.23-1 is up to date -- reinstalling
error: failed to prepare transaction (package architecture is not valid)
:: package glibc-2.23-1-aarch64 does not have a valid architecture

Guess I might need to add the repository? https://wiki.archlinux.org/index.php/uno...rmv7h_only 

I will try out a Debian image to see if I can replicate the multiarch stuff.  But I assume that will work.  Since I've got a bunch of stuff already running on arch linux, it'd be nice not to have to switch distributions.  I've finally got syncthing running in place of btsync without eating up a ton a CPU resources, so this isn't urgent, just a curiosity.

How did you get syncthing running? I installed prebuild arm64 from https://github.com/syncthing/syncthing/r....21.tar.gz . It starts fine and I can connect to other devices and accept sync folder. Only the syncing itself doesn't happen. Curious how you installed it on my PINE64 devices with Ubuntu Xenial and longsleep's kernel and /or how to go about finding the fault of this problem as syncthing is running without problem on all of my other devices. See also http://forum.pine64.org/showthread.php?tid=3176

I'm actually on Ubuntu now.  How are you trying to start it?  I essentially followed the guide on the wiki to make a systemd unit file and run it that way.  But the first step is to make sure you are actually able to start it - so you can do that with just running syncthing from the command line.
  Reply
#8
(01-25-2017, 10:33 AM)[email protected] Wrote:
(01-25-2017, 10:15 AM)Pander Wrote:
(04-04-2016, 09:30 AM)[email protected] Wrote:
(04-03-2016, 01:39 AM)tomtor Wrote: Shouldn't you use something like

pacman -S --arch armv7h glibc

instead of "arm"?

$ sudo pacman -S --arch armv7h glibc
warning: glibc-2.23-1 is up to date -- reinstalling
error: failed to prepare transaction (package architecture is not valid)
:: package glibc-2.23-1-aarch64 does not have a valid architecture

Guess I might need to add the repository? https://wiki.archlinux.org/index.php/uno...rmv7h_only 

I will try out a Debian image to see if I can replicate the multiarch stuff.  But I assume that will work.  Since I've got a bunch of stuff already running on arch linux, it'd be nice not to have to switch distributions.  I've finally got syncthing running in place of btsync without eating up a ton a CPU resources, so this isn't urgent, just a curiosity.

How did you get syncthing running? I installed prebuild arm64 from https://github.com/syncthing/syncthing/r....21.tar.gz . It starts fine and I can connect to other devices and accept sync folder. Only the syncing itself doesn't happen. Curious how you installed it on my PINE64 devices with Ubuntu Xenial and longsleep's kernel and /or how to go about finding the fault of this problem as syncthing is running without problem on all of my other devices. See also http://forum.pine64.org/showthread.php?tid=3176

I'm actually on Ubuntu now.  How are you trying to start it?  I essentially followed the guide on the wiki to make a systemd unit file and run it that way.  But the first step is to make sure you are actually able to start it - so you can do that with just running syncthing from the command line.

That I can, I even get the web interface and can add devices.
  Reply
#9
So if you can get it to run, I'm confused then - what do you mean by "Only the syncing itself doesn't happen."  What do your logs look like?

Edit: Nevermind, read your other post - and yes, there was a recent version of syncthing that caused a lot of problems on ARM64.
  Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Fedora Running On Pine64! cztian 26 5,231 10-26-2017, 05:51 PM
Last Post: gregjo
  Can't boot headless after running update_uboot.sh Borglesnorgle Williams 2 363 08-17-2017, 04:08 AM
Last Post: Borglesnorgle Williams
  Pine64 will be supported by HypriotOS (a Debian Jessie based OS for running Docker) Quintus23M 9 7,102 02-03-2017, 05:50 AM
Last Post: pfeerick
Question Need help : Issue in running compiled kernel with tftp+uboot dinesh.bhoyar 2 804 01-30-2017, 12:44 AM
Last Post: dinesh.bhoyar

Forum Jump:


Users browsing this thread: 1 Guest(s)