testing for RPi chroot's kernel arch -- getting different results (anrv7l vs armv6l) depending on how I test. why?

Leitzell, Harry Harry.Leitzell at grainger.com
Fri Sep 5 14:48:27 PDT 2014


Invoke bash as a login shell (-l) or export QEMU_CPU before running chroot
commands:

# chroot rootfs bash -l -c "uname -m"
armv7l
# echo "export QEMU_CPU=arm1176" > rootfs/etc/profile.d/qemu_cpu.sh
# chroot rootfs bash -l -c "uname -m"
armv6l
# chroot rootfs bash -c "uname -m"
armv7l
# export QEMU_CPU=arm1176

# chroot rootfs bash -c "uname -m"
armv6l




Harry Leitzell | Principal Performance Engineer, eCommerce | W.W.
Grainger, Inc. 
500 W Madison St, Suite 3300 | Chicago, IL 60661-4512 | +1 (312) 802-7400







On 9/4/14, 10:20 PM, "Stephen Warren" <swarren at wwwdotorg.org> wrote:

>On 09/04/2014 08:43 PM, grantksupport at operamail.com wrote:
>> Hi
>> 
>> On Thu, Sep 4, 2014, at 07:19 PM, Stephen Warren wrote:
>>> I would suspect that. Try removing or comment that line and retesting.
>> 
>> Bingo. That ENV var is the 'culprit',
>> 
>> 	chroot /opt/raspbian-chroot bash -c "uname -rm"
>> 		3.16.1-7.g90bc0f1-desktop armv7l
>> 
>> 	chroot /opt/raspbian-chroot bash -c "QEMU_CPU=arm1176 uname -rm"
>> 		3.16.1-7.g90bc0f1-desktop armv6l
>> 
>> Since, for RPi, 'armv6l' is the correct arch, what/where in this ^^
>>setup can the default arch be set so that 'just'
>> 
>> 	chroot /opt/raspbian-chroot bash -c "uname -rm"
>> 
>> would correctly return
>> 
>> 	3.16.1-7.g90bc0f1-desktop armv6l
>
>I don't know. Hopefully "man qemu" or "man qemu-arm-static" would say.
>




More information about the linux-rpi-kernel mailing list