[Title]change exec cmd
authormunkyu.im <munkyu.im@samsung.com>
Thu, 15 Mar 2012 14:20:49 +0000 (23:20 +0900)
committermunkyu.im <munkyu.im@samsung.com>
Thu, 15 Mar 2012 14:20:49 +0000 (23:20 +0900)
[Type]
[Module]
[Priority]
[CQ#]
[Redmine#]
[Problem]
[Cause]
[Solution]
[TestCase]

src/org/tizen/emulator/manager/tool/Launcher.java

index 4110641..9cab0b5 100644 (file)
@@ -84,36 +84,56 @@ public class Launcher {
                // make cmd to run emulator
                try {
                        List<String> cmd = new ArrayList<String>();
+                       int width = property.getConfiguration().getDevice().getDisplay().getResolution().getWidth();
+                       int height = property.getConfiguration().getDevice().getDisplay().getResolution().getHeight();
                        cmd.add(fio.getBinPath() + File.separator + binary);
-                       cmd.add("--skin-args width=" + property.getConfiguration().getDevice().getDisplay().getResolution().getWidth() + " height=" + property.getConfiguration().getDevice().getDisplay().getResolution().getHeight());
+                       cmd.add("--skin-args");
+                       cmd.add("width=" + width);
+                       cmd.add("height=" + height);
                        cmd.add("--qemu-args");
-                       cmd.add("-drive file=" + EmulatorVMs.getInstance().getVMsBaseDirectory() + File.separator  +property.getArch().toString() + File.separator + property.getName() + File.separator +"emulimg-" + property.getName() + ".x86,if=virtio");
+                       cmd.add("-drive");
+                       cmd.add("file=" + EmulatorVMs.getInstance().getVMsBaseDirectory() + File.separator  +property.getArch().toString() + File.separator + property.getName() + File.separator +"emulimg-" + property.getName() + ".x86,if=virtio");
                        cmd.add( "-boot");
                        cmd.add("c");
                        cmd.add("-append");
-                       cmd.add("\"console=ttyS0 video=uvesafb:ywrap,"
-                                       + property.getConfiguration().getDevice().getDisplay().getResolution().getWidth()
+                       cmd.add("console=ttyS0 video=uvesafb:ywrap,"
+                                       + width
                                        + "x" 
-                                       + property.getConfiguration().getDevice().getDisplay().getResolution().getHeight() 
+                                       + height 
                                        + "-32@60"
                                        + " sdb_port=" + portNo
                                        + " dpi=" + property.getConfiguration().getDevice().getDisplay().getDensity().getValue() 
                                        + " root=/dev/vda rw"
-                                       + " ip=10.0.2.16::10.0.2.2:255.255.255.0::eth0:none 5\"");
-                       cmd.add("-serial file:emulator.klog");
-                       cmd.add("-m " + property.getConfiguration().getDevice().getRAM().getSize().getValue());
-                       cmd.add("-M maru-x86-machine");
-                       cmd.add("-net nic,model=virtio");
-                       cmd.add("-soundhw all");
-                       cmd.add("-usb -usbdevice");
+                                       + " ip=10.0.2.16::10.0.2.2:255.255.255.0::eth0:none 5");
+                       cmd.add("-serial");
+                       cmd.add("file:emulator.klog");
+                       cmd.add("-m");
+                       cmd.add(String.valueOf(property.getConfiguration().getDevice().getRAM().getSize().getValue()));
+                       cmd.add("-M");
+                       cmd.add("maru-x86-machine");
+                       cmd.add("-net");
+                       cmd.add("nic,model=virtio");
+                       cmd.add("-soundhw");
+                       cmd.add("all");
+                       cmd.add("-usb");
+                       cmd.add("-usbdevice");
                        cmd.add("maru-touchscreen");
-                       cmd.add("-vga maru");
-                       cmd.add("-bios bios.bin -L .");
-                       cmd.add("-kernel " + fio.getKernelPath() + File.separator+ "bzImage");
-                       cmd.add("-usbdevice keyboard -net user -rtc base=utc");
+                       cmd.add("-vga");
+                       cmd.add("maru");
+                       cmd.add("-bios");
+                       cmd.add("bios.bin");
+                       cmd.add("-L");
+                       cmd.add("../x86/data/pc-bios");
+                       cmd.add("-kernel");
+                       cmd.add(fio.getKernelPath() + File.separator+ "bzImage");
+                       cmd.add("-net");
+                       cmd.add("user");
+                       cmd.add("-rtc");
+                       cmd.add("base=utc");
                        cmd.add(kvm);
-                       cmd.add("-redir tcp:1202:10.0.2.16:22");
-                       
+                       cmd.add("-redir");
+                       cmd.add("tcp:1202:10.0.2.16:22");
+                       //System.out.println(cmd);
                        ProcessBuilder pb = new ProcessBuilder(cmd);
                        
                        Process process = pb.start();