@@ -245,72 +245,6 @@ def get_qemu_version(emulator):
245245 return (int (major ), int (minor ))
246246
247247
248- def qemu_command (qemu = 'qemu-system-ppc64' , machine = 'pseries,cap-htm=off' , cpu = None ,
249- mem = '1G' , smp = 1 , vmlinux = None , initrd = None , drive = None ,
250- host_mount = None , cmdline = '' , accel = 'tcg' , net = '-nic user' , gdb = None ,
251- extra_args = []):
252-
253- qemu_path = get_qemu (qemu )
254- logging .info ('Using qemu version %s.%s' % get_qemu_version (qemu_path ))
255-
256- if vmlinux is None :
257- vmlinux = get_vmlinux ()
258-
259- l = [
260- get_qemu (qemu ),
261- '-nographic' ,
262- '-vga' , 'none' ,
263- '-M' , machine ,
264- '-smp' , str (smp ),
265- '-m' , mem ,
266- '-accel' , accel ,
267- '-kernel' , vmlinux ,
268- net ,
269- ]
270-
271- if initrd is None and drive is None :
272- if qemu == 'qemu-system-ppc' :
273- subarch = 'ppc'
274- elif get_endian (vmlinux ) == 'little' :
275- subarch = 'ppc64le'
276- else :
277- subarch = 'ppc64'
278-
279- initrd = f'{ subarch } -rootfs.cpio.gz'
280-
281- if initrd :
282- l .append ('-initrd' )
283- l .append (get_root_disk (initrd ))
284-
285- if drive :
286- l .append (drive )
287-
288- if host_mount :
289- bus = ''
290- if 'powernv' in machine :
291- bus = ',bus=pcie.0'
292-
293- l .append (f'-fsdev local,id=fsdev0,path={ host_mount } ,security_model=none' )
294- l .append (f'-device virtio-9p-pci,fsdev=fsdev0,mount_tag=host{ bus } ' )
295-
296- if cpu is not None :
297- l .append ('-cpu' )
298- l .append (cpu )
299-
300- if len (cmdline ):
301- l .append ('-append' )
302- l .append (f'"{ cmdline } "' )
303-
304- if gdb :
305- l .append (gdb )
306-
307- l .extend (extra_args )
308-
309- logging .debug (l )
310-
311- return ' ' .join (l )
312-
313-
314248def qemu_net_setup (p , iface = 'eth0' ):
315249 p .cmd ('ip addr show' )
316250 p .cmd ('ls -l /sys/class/net' )
0 commit comments