Skip to contentSkip to conversation

qemu-binfmt-conf.sh

Qemu-devel Sean Omalley 2 participants 2 messages Apr 12, 2014

lore
Share & tools
lore
#0 lore raw

I was looking at  rc2 and /scripts/qemu-binfmt-conf.sh briefly, it has

# probe cpu type
cpu=`uname -m`
case "$cpu" in

Then there is no cpu for aarch64, but if you poke down further, there is a if-then that uses a cpu=aarch64.

Should this be split into something like:

armv[4-7]*)
    cpu="arm"
  ;;
armv[8-9]*)
    cpu="aarch64"
  ;;

Sean

#1 lore raw
Quoted 10 lines · Sean Omalley

I was looking at rc2 and /scripts/qemu-binfmt-conf.sh briefly, it has

# probe cpu type
cpu=`uname -m`
case "$cpu" in

Then there is no cpu for aarch64, but if you poke down further, there is a if-then that uses a cpu=aarch64.

Quoted 8 lines

Should this be split into something like:

armv[4-7]*)

    cpu="arm"
  ;;
armv[8-9]*)
    cpu="aarch64"

;;

This would be wrong, because AArch64 systems don't report their 'uname -m' as "armv8", but as "aarch64". This case statement only needs entries for the cases where uname can report multiple different things for systems which QEMU considers to be the same thing. For everything else the default (set $cpu to the output of uname -m) is correct.

thanks
-- PMM