[OE-core] [PATCH 2/2] runqemu: Allow the user to specity no kernel or rootFS

Alistair Francis alistair23 at gmail.com
Thu Nov 3 00:19:29 UTC 2016


On Wed, Nov 2, 2016 at 5:13 PM, Andre McCurdy <armccurdy at gmail.com> wrote:
> On Wed, Nov 2, 2016 at 4:30 PM, Alistair Francis <alistair23 at gmail.com> wrote:
>> On Wed, Nov 2, 2016 at 4:18 PM, Alistair Francis
>> <alistair.francis at xilinx.com> wrote:
>>> In some cirsumstances the user doesn't want to supply a kernel, rootFS
>>> or DTB to QEMU. This will occur more now that QEMU supports loading
>>> images using a '-device loader' method.
>>>
>>> Allow users to specify 'none' for QB_DEFAULT_FSTYPE or QB_DEFAULT_KERNEL
>>> to avoid supplying these options to QEMU.
>>>
>>> Signed-off-by: Alistair Francis <alistair.francis at xilinx.com>
>>> ---
>>>  scripts/runqemu | 6 +++++-
>>>  1 file changed, 5 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/scripts/runqemu b/scripts/runqemu
>>> index 922ebaf..ac10ee2 100755
>>> --- a/scripts/runqemu
>>> +++ b/scripts/runqemu
>>> @@ -453,7 +453,7 @@ class BaseConfig(object):
>>>      def check_rootfs(self):
>>>          """Check and set rootfs"""
>>>
>>> -        if self.fstype == 'nfs':
>>> +        if self.fstype == 'nfs' or self.fstype == "none":
>>>              return
>>>
>>>          if self.rootfs and not os.path.exists(self.rootfs):
>>> @@ -481,6 +481,10 @@ class BaseConfig(object):
>>>          # QB_DEFAULT_KERNEL is always a full file path
>>>          kernel_name = os.path.basename(self.get('QB_DEFAULT_KERNEL'))
>>>
>>> +        # The user didn't want a kernel to be loaded
>>> +        if kernel_name == "none":
>>> +            return
>>> +
>>>          deploy_dir_image = self.get('DEPLOY_DIR_IMAGE')
>>>          if not self.kernel:
>>>              kernel_match_name = "%s/%s" % (deploy_dir_image, kernel_name)
>>
>> This diff didn't end up making it in somehow. This is also required:
>
> Squash the two commits and send the result as a v2.

I was trying to avoid spam, but you are right. I sent a v2

Thanks,

Alistair

>
>> diff --git a/scripts/runqemu b/scripts/runqemu
>> index ac10ee2..5f60312 100755
>> --- a/scripts/runqemu
>> +++ b/scripts/runqemu
>> @@ -861,6 +861,9 @@ class BaseConfig(object):
>>              k_root = '/dev/nfs nfsroot=%s:%s,%s' % (self.nfs_server,
>> self.nfs_dir, self.unfs_opts)
>>              self.kernel_cmdline = 'root=%s rw highres=off' % k_root
>>
>> +        if self.fstype == 'none':
>> +            self.rootfs_options = ''
>> +
>>          self.set('ROOTFS_OPTIONS', self.rootfs_options)
>>
>>      def guess_qb_system(self):
>>
>> Thanks,
>>
>> Alistair
>>
>>> --
>>> 2.7.4
>>>
>> --
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core at lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-core



More information about the Openembedded-core mailing list