Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/2] runqemu: two fixes
@ 2017-09-11  9:28 Robert Yang
  2017-09-11  9:28 ` [PATCH 1/2] runqemu: default qemumips memory to 256M Robert Yang
  2017-09-11  9:28 ` [PATCH 2/2] runqemu: let qemuparams override previous settings Robert Yang
  0 siblings, 2 replies; 4+ messages in thread
From: Robert Yang @ 2017-09-11  9:28 UTC (permalink / raw)
  To: openembedded-core

The following changes since commit cc319b6dcc5b4a5019fb91c9771b12ce17f3c953:

  mesa-gl: Fix build after recent mesa PACKAGECONFIG changes (2017-09-05 14:58:37 +0100)

are available in the git repository at:

  git://git.openembedded.org/openembedded-core-contrib rbt/qemu
  http://cgit.openembedded.org/openembedded-core-contrib/log/?h=rbt/qemu

Robert Yang (2):
  runqemu: default qemumips memory to 256M
  runqemu: let qemuparams override previous settings

 scripts/runqemu | 26 +++++++++++++++++++-------
 1 file changed, 19 insertions(+), 7 deletions(-)

-- 
2.10.2



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] runqemu: default qemumips memory to 256M
  2017-09-11  9:28 [PATCH 0/2] runqemu: two fixes Robert Yang
@ 2017-09-11  9:28 ` Robert Yang
  2017-09-11 10:49   ` Burton, Ross
  2017-09-11  9:28 ` [PATCH 2/2] runqemu: let qemuparams override previous settings Robert Yang
  1 sibling, 1 reply; 4+ messages in thread
From: Robert Yang @ 2017-09-11  9:28 UTC (permalink / raw)
  To: openembedded-core

The qemumips or qemumips64 can't be boot with 512M.

*Fixed when no QB_MEM is set:
 - runqemu qemumips nographic core-image-minimal
[    0.000000] Call Trace:
[    0.000000] [<8011c010>] clear_page+0x0/0x128
[    0.000000] [<8022b818>] get_page_from_freelist+0xa1c/0xb48
[    0.000000] [<8022c00c>] __alloc_pages_nodemask+0xd8/0xf0c
[    0.000000] [<8022ce58>] __get_free_pages+0x18/0x60
[    0.000000] [<80118674>] setup_zero_pages+0x1c/0x98
[    0.000000] [<80bd23e4>] mem_init+0x44/0x54
[    0.000000] [<80bca964>] start_kernel+0x20c/0x4bc
[    0.000000] [<80920090>] kernel_entry+0x0/0x40
[    0.000000] Code: 00000000  00000000  00000000 <34860f80> cc9e0000  cc9e0010  cc9e0020  cc9e0030  cc9e0040
[    0.000000]
[    0.000000] ---[ end trace 0000000000000000 ]---
[    0.000000] Kernel panic - not syncing: Attempted to kill the idle task!
[    0.000000] ---[ end Kernel panic - not syncing: Attempted to kill the idle task!

[YOCTO #11521]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 scripts/runqemu | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/scripts/runqemu b/scripts/runqemu
index df76270..ce8cccc 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -639,8 +639,13 @@ class BaseConfig(object):
         if s:
             self.set('QB_MEM', '-m %s' % s.group(1))
         elif not self.get('QB_MEM'):
-            logger.info('QB_MEM is not set, use 512M by default')
-            self.set('QB_MEM', '-m 512')
+            mach = self.get('MACHINE')
+            if mach.startswith('qemumips'):
+                logger.info('QB_MEM is not set, use 256M by default')
+                self.set('QB_MEM', '-m 256')
+            else:
+                logger.info('QB_MEM is not set, use 512M by default')
+                self.set('QB_MEM', '-m 512')
 
         self.kernel_cmdline_script += ' mem=%s' % self.get('QB_MEM').replace('-m','').strip() + 'M'
         self.qemu_opt_script += ' %s' % self.get('QB_MEM')
-- 
2.10.2



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] runqemu: let qemuparams override previous settings
  2017-09-11  9:28 [PATCH 0/2] runqemu: two fixes Robert Yang
  2017-09-11  9:28 ` [PATCH 1/2] runqemu: default qemumips memory to 256M Robert Yang
@ 2017-09-11  9:28 ` Robert Yang
  1 sibling, 0 replies; 4+ messages in thread
From: Robert Yang @ 2017-09-11  9:28 UTC (permalink / raw)
  To: openembedded-core

Fixed:
$ runqemu qemux86-64 qemuparams="-cpu coreduo"
The default cpu is core2duo, but coreduo should be used here.

Append qemuparams to the last can fix the problem.

[YOCTO #11773]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 scripts/runqemu | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/scripts/runqemu b/scripts/runqemu
index ce8cccc..b58c965 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -185,6 +185,7 @@ class BaseConfig(object):
 
         self.qemu_opt = ''
         self.qemu_opt_script = ''
+        self.qemuparams = ''
         self.clean_nfs_dir = False
         self.nfs_server = ''
         self.rootfs = ''
@@ -444,7 +445,7 @@ class BaseConfig(object):
             elif arg.startswith('biosfilename='):
                 self.qemu_opt_script += ' -bios %s' % arg[len('biosfilename='):]
             elif arg.startswith('qemuparams='):
-                self.qemu_opt_script += ' %s' % arg[len('qemuparams='):]
+                self.qemuparams = ' %s' % arg[len('qemuparams='):]
             elif arg.startswith('bootparams='):
                 self.bootparams = arg[len('bootparams='):]
             elif os.path.exists(arg) or (re.search(':', arg) and re.search('/', arg)):
@@ -635,10 +636,12 @@ class BaseConfig(object):
             raise RunQemuError("Invalid custombiosdir: %s" % self.custombiosdir)
 
     def check_mem(self):
-        s = re.search('-m +([0-9]+)', self.qemu_opt_script)
-        if s:
-            self.set('QB_MEM', '-m %s' % s.group(1))
-        elif not self.get('QB_MEM'):
+        for opt in (self.qemu_opt_script, self.qemuparams):
+            s = re.search('-m +([0-9]+)', opt)
+            if s:
+                self.set('QB_MEM', '-m %s' % s.group(1))
+
+        if not self.get('QB_MEM'):
             mach = self.get('MACHINE')
             if mach.startswith('qemumips'):
                 logger.info('QB_MEM is not set, use 256M by default')
@@ -1125,6 +1128,10 @@ class BaseConfig(object):
 
         self.qemu_opt += ' ' + self.qemu_opt_script
 
+        # Append qemuparams to override previous settings
+        if self.qemuparams:
+            self.qemu_opt += ' ' + self.qemuparams
+
         if self.snapshot:
             self.qemu_opt += " -snapshot"
 
-- 
2.10.2



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] runqemu: default qemumips memory to 256M
  2017-09-11  9:28 ` [PATCH 1/2] runqemu: default qemumips memory to 256M Robert Yang
@ 2017-09-11 10:49   ` Burton, Ross
  0 siblings, 0 replies; 4+ messages in thread
From: Burton, Ross @ 2017-09-11 10:49 UTC (permalink / raw)
  To: Robert Yang; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 1354 bytes --]

On 11 September 2017 at 10:28, Robert Yang <liezhi.yang@windriver.com>
wrote:

> The qemumips or qemumips64 can't be boot with 512M.
>
> *Fixed when no QB_MEM is set:
>  - runqemu qemumips nographic core-image-minimal
> [    0.000000] Call Trace:
> [    0.000000] [<8011c010>] clear_page+0x0/0x128
> [    0.000000] [<8022b818>] get_page_from_freelist+0xa1c/0xb48
> [    0.000000] [<8022c00c>] __alloc_pages_nodemask+0xd8/0xf0c
> [    0.000000] [<8022ce58>] __get_free_pages+0x18/0x60
> [    0.000000] [<80118674>] setup_zero_pages+0x1c/0x98
> [    0.000000] [<80bd23e4>] mem_init+0x44/0x54
> [    0.000000] [<80bca964>] start_kernel+0x20c/0x4bc
> [    0.000000] [<80920090>] kernel_entry+0x0/0x40
> [    0.000000] Code: 00000000  00000000  00000000 <34860f80> cc9e0000
> cc9e0010  cc9e0020  cc9e0030  cc9e0040
> [    0.000000]
> [    0.000000] ---[ end trace 0000000000000000 ]---
> [    0.000000] Kernel panic - not syncing: Attempted to kill the idle task!
> [    0.000000] ---[ end Kernel panic - not syncing: Attempted to kill the
> idle task!
>

This only happens after removing the QB_MEM assignment
from qemuboot-mips.inc right?  It seems to be that handling
machine-specific quirks like this should be done in the machine
configuration instead of starting to have a maze of special cases in
runqemu again...

Ross

[-- Attachment #2: Type: text/html, Size: 1882 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-09-11 10:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-11  9:28 [PATCH 0/2] runqemu: two fixes Robert Yang
2017-09-11  9:28 ` [PATCH 1/2] runqemu: default qemumips memory to 256M Robert Yang
2017-09-11 10:49   ` Burton, Ross
2017-09-11  9:28 ` [PATCH 2/2] runqemu: let qemuparams override previous settings Robert Yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox