diff mbox

[v3,02/18] arm/boot: Turn arm_load_kernel() into no-op for qtest without -kernel

Message ID 1379943352-1979-3-git-send-email-afaerber@suse.de
State New
Headers show

Commit Message

Andreas Färber Sept. 23, 2013, 1:35 p.m. UTC
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 hw/arm/boot.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Andreas Färber Sept. 23, 2013, 2:51 p.m. UTC | #1
Am 23.09.2013 15:35, schrieb Andreas Färber:
> Signed-off-by: Andreas Färber <afaerber@suse.de>
> ---
>  hw/arm/boot.c | 4 ++++
>  1 file changed, 4 insertions(+)

Sorry, I forgot that Grant Likely had an alternative patch [1] not
restricted to qtest. Last thing I read was that PMM had similar/further
patches. How to proceed?

Andreas

[1] http://patchwork.ozlabs.org/patch/257997/

> 
> diff --git a/hw/arm/boot.c b/hw/arm/boot.c
> index 1e313af..0c3dc5f 100644
> --- a/hw/arm/boot.c
> +++ b/hw/arm/boot.c
> @@ -15,6 +15,7 @@
>  #include "hw/loader.h"
>  #include "elf.h"
>  #include "sysemu/device_tree.h"
> +#include "sysemu/qtest.h"
>  #include "qemu/config-file.h"
>  
>  #define KERNEL_ARGS_ADDR 0x100
> @@ -354,6 +355,9 @@ void arm_load_kernel(ARMCPU *cpu, struct arm_boot_info *info)
>  
>      /* Load the kernel.  */
>      if (!info->kernel_filename) {
> +        if (qtest_enabled()) {
> +            return;
> +        }
>          fprintf(stderr, "Kernel image must be specified\n");
>          exit(1);
>      }
>
Peter Maydell Sept. 23, 2013, 11:55 p.m. UTC | #2
On 23 September 2013 23:51, Andreas Färber <afaerber@suse.de> wrote:
> Am 23.09.2013 15:35, schrieb Andreas Färber:
>> Signed-off-by: Andreas Färber <afaerber@suse.de>
>> ---
>>  hw/arm/boot.c | 4 ++++
>>  1 file changed, 4 insertions(+)
>
> Sorry, I forgot that Grant Likely had an alternative patch [1] not
> restricted to qtest. Last thing I read was that PMM had similar/further
> patches. How to proceed?

Whoops, I forgot about that. I'll stick the patches I have out on
the list, but I'm not really in a position to put them in the arm
tree for a pullreq yet; so I'm happy for you to either stick them
in this series, or to commit this patch (and then I'll fix it up later).

-- PMM
Andreas Färber Sept. 30, 2013, 1:58 p.m. UTC | #3
Am 24.09.2013 01:55, schrieb Peter Maydell:
> On 23 September 2013 23:51, Andreas Färber <afaerber@suse.de> wrote:
>> Am 23.09.2013 15:35, schrieb Andreas Färber:
>>> Signed-off-by: Andreas Färber <afaerber@suse.de>
>>> ---
>>>  hw/arm/boot.c | 4 ++++
>>>  1 file changed, 4 insertions(+)
>>
>> Sorry, I forgot that Grant Likely had an alternative patch [1] not
>> restricted to qtest. Last thing I read was that PMM had similar/further
>> patches. How to proceed?
> 
> Whoops, I forgot about that. I'll stick the patches I have out on
> the list, but I'm not really in a position to put them in the arm
> tree for a pullreq yet; so I'm happy for you to either stick them
> in this series,

Done, thanks.

Andreas

> or to commit this patch (and then I'll fix it up later).
> 
> -- PMM
>
diff mbox

Patch

diff --git a/hw/arm/boot.c b/hw/arm/boot.c
index 1e313af..0c3dc5f 100644
--- a/hw/arm/boot.c
+++ b/hw/arm/boot.c
@@ -15,6 +15,7 @@ 
 #include "hw/loader.h"
 #include "elf.h"
 #include "sysemu/device_tree.h"
+#include "sysemu/qtest.h"
 #include "qemu/config-file.h"
 
 #define KERNEL_ARGS_ADDR 0x100
@@ -354,6 +355,9 @@  void arm_load_kernel(ARMCPU *cpu, struct arm_boot_info *info)
 
     /* Load the kernel.  */
     if (!info->kernel_filename) {
+        if (qtest_enabled()) {
+            return;
+        }
         fprintf(stderr, "Kernel image must be specified\n");
         exit(1);
     }