[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: QEMU user mode for dynamically linked binaries



On 6/12/19 11:33 PM, Paul-Antoine Arras wrote:
> However, after reading the wiki page on QEMU user emulation [1], it seemed to me that it should be possible to run dynamically-linked binaries without chroot, simply by installing the target libc6 with multiarch.
> 
> Am I mistaken?

No, you're right, this will work as well.

But since riscv64 is currently only available in Debian unstable, you
can only do this on a system running said version of Debian. Neither
Debian stable, testing or any other Debian-based distribution (including
Ubuntu) will work.

So, what you need to do is the following:

1) Install debian-ports-archive-keyring package:

   # apt install debian-ports-archive-keyring

2) Modify your sources.list to support riscv64:

   deb [arch=i386,amd64] http://ftp.debian.org/debian unstable main contrib non-free
   deb-src http://ftp.debian.org/debian unstable main contrib non-free

   deb [arch=riscv64] http://ftp.ports.debian.org/debian-ports/ unstable main
   deb [arch=riscv64] http://ftp.ports.debian.org/debian-ports/ unreleased main

3) Enable riscv64 in dpkg:

   # dpkg --add-architecture riscv64

4) Run apt update

   # apt update

5) Install the runtime dependencies of your application:

   # apt install libfoo1:riscv64 libbar2:riscv64

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz@debian.org
`. `'   Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913


Reply to: