[Top][All Lists]

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

Re: [Qemu-discuss] setting default QEMU_CPU value for chroot env. where?

From: Peter Maydell
Subject: Re: [Qemu-discuss] setting default QEMU_CPU value for chroot env. where?
Date: Fri, 5 Sep 2014 15:23:25 +0100

On 5 September 2014 04:52,  <address@hidden> wrote:
> Since, for RPi, 'armv6l' is the correct arch, where in the qemu config/setup 
> -- either on host or in CHROOT -- can the default arch be set so that 'just'
>         chroot /opt/raspbian-chroot bash -c "uname -rm"
> correctly returns
>         3.16.1-7.g90bc0f1-desktop armv6l

If you absolutely must have a plain chroot command
result in the variable being set, then the simplest
thing is probably to make the qemu in your chroot be
a wrapper program that sets the environment variable
and launches the actual qemu executable.

However it's probably easier to have a simple
wrapper script in your host so you do
   chroot-raspbian bash -c "uname -rm"

and the chroot-raspbian script does the "set variable,
chroot and run command" part. (This is easier because
a wrapper inside the chroot would need to be a
statically linked C program rather than a shell script,
unless you want to mess around getting your chroot
to be able to run the host shell. A wrapper script
in the host can be a shell script without any

-- PMM

reply via email to

[Prev in Thread] Current Thread [Next in Thread]