Re: FWIW debian/qemu-user-static.README.Debian

Johannes Schauer <[email protected]>
Newsgroups gmane.linux.debian.devel.embedded
Message-ID <20110701054518.GA32625@hoothoot>
Hi,

I attached the very simple patch that will make the requested
functionality work in qemu. One can now do something like this:

export QEMU_LD_PREFIX=/tmp/debian-sid-armel
fakeroot fakechroot chroot /tmp/debian-sid-armel dpkg --configure -a

and it works! without anything in /etc/qemu-binfmt/arm :D

cheers, josch
0001-add-QEMU_LD_PREFIX-environment-variable.patch (text/x-diff, 814 B)
>From 1a665ff5d4adb007fe0612013c5450682bec6ecc Mon Sep 17 00:00:00 2001
From: Johannes Schauer <[email protected]>
Date: Fri, 1 Jul 2011 05:27:13 +0000
Subject: [PATCH] add QEMU_LD_PREFIX environment variable

---
 linux-user/main.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/linux-user/main.c b/linux-user/main.c
index 0d627d6..c802175 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -2758,6 +2758,11 @@ int main(int argc, char **argv, char **envp)
     cpudef_setup(); /* parse cpu definitions in target config file (TBD) */
 #endif
 
+    /* read interp_prefix from environment variable */
+    if (getenv("QEMU_LD_PREFIX") != NULL) {
+        interp_prefix = getenv("QEMU_LD_PREFIX");
+    }
+
     optind = 1;
     for(;;) {
         if (optind >= argc)
-- 
1.7.5.4
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.