All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/4] Require libfdt for arm/microblaze/ppc softmmu targets
@ 2013-05-24 15:26 Peter Maydell
  2013-05-24 15:26 ` [Qemu-devel] [PATCH 1/4] configure: Require libfdt for arm, ppc, microblaze " Peter Maydell
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Peter Maydell @ 2013-05-24 15:26 UTC (permalink / raw)
  To: qemu-devel
  Cc: Anthony Liguori, patches, Alexander Graf, Andreas Färber,
	qemu-ppc, Peter Crosthwaite, Edgar E. Iglesias

This patchset makes libfdt mandatory for building the ARM,
MicroBlaze and PPC softmmu targets. These architectures need
libfdt for at least some of their board models to be usefully
functional, so now that we have an in-tree version of libfdt
it's better to insist on using it rather than allowing users
to build less-than-useful binaries.

NB: I have tested the ARM change, but only compile-tested PPC
and MicroBlaze.

Peter Maydell (4):
  configure: Require libfdt for arm, ppc, microblaze softmmu targets
  arm: Remove CONFIG_FDT conditionals
  microblaze: Remove CONFIG_FDT conditionals
  ppc: Remove CONFIG_FDT conditionals

 configure                          |   20 ++++++++++++++++++++
 default-configs/ppc-softmmu.mak    |    2 +-
 default-configs/ppc64-softmmu.mak  |    4 ++--
 default-configs/ppcemb-softmmu.mak |    2 +-
 hw/arm/boot.c                      |    7 -------
 hw/microblaze/boot.c               |   12 ------------
 hw/ppc/ppc440_bamboo.c             |    2 --
 hw/ppc/spapr_vio.c                 |    6 ------
 hw/ppc/virtex_ml507.c              |   18 ------------------
 9 files changed, 24 insertions(+), 49 deletions(-)

-- 
1.7.9.5

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

* [Qemu-devel] [PATCH 1/4] configure: Require libfdt for arm, ppc, microblaze softmmu targets
  2013-05-24 15:26 [Qemu-devel] [PATCH 0/4] Require libfdt for arm/microblaze/ppc softmmu targets Peter Maydell
@ 2013-05-24 15:26 ` Peter Maydell
  2013-05-28  4:07   ` Peter Crosthwaite
  2013-05-28  9:03   ` Andreas Färber
  2013-05-24 15:26 ` [Qemu-devel] [PATCH 2/4] arm: Remove CONFIG_FDT conditionals Peter Maydell
                   ` (3 subsequent siblings)
  4 siblings, 2 replies; 11+ messages in thread
From: Peter Maydell @ 2013-05-24 15:26 UTC (permalink / raw)
  To: qemu-devel
  Cc: Anthony Liguori, patches, Alexander Graf, Andreas Färber,
	qemu-ppc, Peter Crosthwaite, Edgar E. Iglesias

A number of our softmmu targets (PPC, ARM, Microblaze) now more or
less require flattened device tree support for various board models
to work correctly.  Make libfdt mandatory if the target list includes
these, rather than building unhelpful half-functional binaries.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 configure |   20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/configure b/configure
index 5ae7e4a..708c010 100755
--- a/configure
+++ b/configure
@@ -2518,6 +2518,26 @@ fi
 
 ##########################################
 # fdt probe
+# fdt support is mandatory for at least some target architectures,
+# so insist on it if we're building those system emulators.
+fdt_required=no
+for target in $target_list; do
+  case $target in
+    arm*softmmu|ppc*softmmu|microblaze*softmmu)
+      fdt_required=yes
+    ;;
+  esac
+done
+
+if test "$fdt_required" = "yes"; then
+  if test "$fdt" = "no"; then
+    error_exit "fdt disabled but some requested targets require it." \
+      "You can turn off fdt only if you also disable all the system emulation" \
+      "targets which need it (by specifying a cut down --target-list)."
+  fi
+  fdt=yes
+fi
+
 if test "$fdt" != "no" ; then
   fdt_libs="-lfdt"
   cat > $TMPC << EOF
-- 
1.7.9.5

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

* [Qemu-devel] [PATCH 2/4] arm: Remove CONFIG_FDT conditionals
  2013-05-24 15:26 [Qemu-devel] [PATCH 0/4] Require libfdt for arm/microblaze/ppc softmmu targets Peter Maydell
  2013-05-24 15:26 ` [Qemu-devel] [PATCH 1/4] configure: Require libfdt for arm, ppc, microblaze " Peter Maydell
@ 2013-05-24 15:26 ` Peter Maydell
  2013-05-28  4:09   ` Peter Crosthwaite
  2013-05-24 15:26 ` [Qemu-devel] [PATCH 3/4] microblaze: " Peter Maydell
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 11+ messages in thread
From: Peter Maydell @ 2013-05-24 15:26 UTC (permalink / raw)
  To: qemu-devel
  Cc: Anthony Liguori, patches, Alexander Graf, Andreas Färber,
	qemu-ppc, Peter Crosthwaite, Edgar E. Iglesias

Now that we know we're compiling with libfdt, we can remove the
CONFIG_FDT conditionals.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 hw/arm/boot.c |    7 -------
 1 file changed, 7 deletions(-)

diff --git a/hw/arm/boot.c b/hw/arm/boot.c
index f451529..defcf15 100644
--- a/hw/arm/boot.c
+++ b/hw/arm/boot.c
@@ -227,7 +227,6 @@ static void set_kernel_args_old(const struct arm_boot_info *info)
 
 static int load_dtb(hwaddr addr, const struct arm_boot_info *binfo)
 {
-#ifdef CONFIG_FDT
     uint32_t *mem_reg_property;
     uint32_t mem_reg_propsize;
     void *fdt = NULL;
@@ -308,12 +307,6 @@ static int load_dtb(hwaddr addr, const struct arm_boot_info *binfo)
     cpu_physical_memory_write(addr, fdt, size);
 
     return 0;
-
-#else
-    fprintf(stderr, "Device tree requested, "
-                "but qemu was compiled without fdt support\n");
-    return -1;
-#endif
 }
 
 static void do_cpu_reset(void *opaque)
-- 
1.7.9.5

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

* [Qemu-devel] [PATCH 3/4] microblaze: Remove CONFIG_FDT conditionals
  2013-05-24 15:26 [Qemu-devel] [PATCH 0/4] Require libfdt for arm/microblaze/ppc softmmu targets Peter Maydell
  2013-05-24 15:26 ` [Qemu-devel] [PATCH 1/4] configure: Require libfdt for arm, ppc, microblaze " Peter Maydell
  2013-05-24 15:26 ` [Qemu-devel] [PATCH 2/4] arm: Remove CONFIG_FDT conditionals Peter Maydell
@ 2013-05-24 15:26 ` Peter Maydell
  2013-05-28  4:10   ` Peter Crosthwaite
  2013-05-24 15:26 ` [Qemu-devel] [PATCH 4/4] ppc: " Peter Maydell
  2013-05-25 12:32 ` [Qemu-devel] [PATCH 0/4] Require libfdt for arm/microblaze/ppc softmmu targets Edgar E. Iglesias
  4 siblings, 1 reply; 11+ messages in thread
From: Peter Maydell @ 2013-05-24 15:26 UTC (permalink / raw)
  To: qemu-devel
  Cc: Anthony Liguori, patches, Alexander Graf, Andreas Färber,
	qemu-ppc, Peter Crosthwaite, Edgar E. Iglesias

Now that we know we're compiling with libfdt we can remove the
CONFIG_FDT conditionals.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 hw/microblaze/boot.c |   12 ------------
 1 file changed, 12 deletions(-)

diff --git a/hw/microblaze/boot.c b/hw/microblaze/boot.c
index e543d88..3f1d70e 100644
--- a/hw/microblaze/boot.c
+++ b/hw/microblaze/boot.c
@@ -61,7 +61,6 @@ static int microblaze_load_dtb(hwaddr addr,
                                       const char *dtb_filename)
 {
     int fdt_size;
-#ifdef CONFIG_FDT
     void *fdt = NULL;
     int r;
 
@@ -81,17 +80,6 @@ static int microblaze_load_dtb(hwaddr addr,
     }
 
     cpu_physical_memory_write(addr, fdt, fdt_size);
-#else
-    /* We lack libfdt so we cannot manipulate the fdt. Just pass on the blob
-       to the kernel.  */
-    if (dtb_filename) {
-        fdt_size = load_image_targphys(dtb_filename, addr, 0x10000);
-    }
-    if (kernel_cmdline) {
-        fprintf(stderr,
-                "Warning: missing libfdt, cannot pass cmdline to kernel!\n");
-    }
-#endif
     return fdt_size;
 }
 
-- 
1.7.9.5

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

* [Qemu-devel] [PATCH 4/4] ppc: Remove CONFIG_FDT conditionals
  2013-05-24 15:26 [Qemu-devel] [PATCH 0/4] Require libfdt for arm/microblaze/ppc softmmu targets Peter Maydell
                   ` (2 preceding siblings ...)
  2013-05-24 15:26 ` [Qemu-devel] [PATCH 3/4] microblaze: " Peter Maydell
@ 2013-05-24 15:26 ` Peter Maydell
  2013-05-25 12:32 ` [Qemu-devel] [PATCH 0/4] Require libfdt for arm/microblaze/ppc softmmu targets Edgar E. Iglesias
  4 siblings, 0 replies; 11+ messages in thread
From: Peter Maydell @ 2013-05-24 15:26 UTC (permalink / raw)
  To: qemu-devel
  Cc: Anthony Liguori, patches, Alexander Graf, Andreas Färber,
	qemu-ppc, Peter Crosthwaite, Edgar E. Iglesias

Now that we know we're compiling with libfdt we can remove the
CONFIG_FDT conditionals.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 default-configs/ppc-softmmu.mak    |    2 +-
 default-configs/ppc64-softmmu.mak  |    4 ++--
 default-configs/ppcemb-softmmu.mak |    2 +-
 hw/ppc/ppc440_bamboo.c             |    2 --
 hw/ppc/spapr_vio.c                 |    6 ------
 hw/ppc/virtex_ml507.c              |   18 ------------------
 6 files changed, 4 insertions(+), 30 deletions(-)

diff --git a/default-configs/ppc-softmmu.mak b/default-configs/ppc-softmmu.mak
index cc3587f..bcaa52f 100644
--- a/default-configs/ppc-softmmu.mak
+++ b/default-configs/ppc-softmmu.mak
@@ -42,6 +42,6 @@ CONFIG_I8259=y
 CONFIG_XILINX=y
 CONFIG_XILINX_ETHLITE=y
 CONFIG_OPENPIC=y
-CONFIG_E500=$(CONFIG_FDT)
+CONFIG_E500=y
 # For PReP
 CONFIG_MC146818RTC=y
diff --git a/default-configs/ppc64-softmmu.mak b/default-configs/ppc64-softmmu.mak
index 884ea8a..8b7874e 100644
--- a/default-configs/ppc64-softmmu.mak
+++ b/default-configs/ppc64-softmmu.mak
@@ -42,8 +42,8 @@ CONFIG_I8259=y
 CONFIG_XILINX=y
 CONFIG_XILINX_ETHLITE=y
 CONFIG_OPENPIC=y
-CONFIG_PSERIES=$(CONFIG_FDT)
-CONFIG_E500=$(CONFIG_FDT)
+CONFIG_PSERIES=y
+CONFIG_E500=y
 # For pSeries
 CONFIG_PCI_HOTPLUG=y
 # For PReP
diff --git a/default-configs/ppcemb-softmmu.mak b/default-configs/ppcemb-softmmu.mak
index be93e03..61920ff 100644
--- a/default-configs/ppcemb-softmmu.mak
+++ b/default-configs/ppcemb-softmmu.mak
@@ -37,6 +37,6 @@ CONFIG_I8259=y
 CONFIG_XILINX=y
 CONFIG_XILINX_ETHLITE=y
 CONFIG_OPENPIC=y
-CONFIG_E500=$(CONFIG_FDT)
+CONFIG_E500=y
 # For PReP
 CONFIG_MC146818RTC=y
diff --git a/hw/ppc/ppc440_bamboo.c b/hw/ppc/ppc440_bamboo.c
index a55e717..b0c1c02 100644
--- a/hw/ppc/ppc440_bamboo.c
+++ b/hw/ppc/ppc440_bamboo.c
@@ -58,7 +58,6 @@ static int bamboo_load_device_tree(hwaddr addr,
                                      const char *kernel_cmdline)
 {
     int ret = -1;
-#ifdef CONFIG_FDT
     uint32_t mem_reg_property[] = { 0, 0, cpu_to_be32(ramsize) };
     char *filename;
     int fdt_size;
@@ -115,7 +114,6 @@ static int bamboo_load_device_tree(hwaddr addr,
     g_free(fdt);
 
 out:
-#endif
 
     return ret;
 }
diff --git a/hw/ppc/spapr_vio.c b/hw/ppc/spapr_vio.c
index 1405c32..304f316 100644
--- a/hw/ppc/spapr_vio.c
+++ b/hw/ppc/spapr_vio.c
@@ -34,9 +34,7 @@
 #include "hw/ppc/spapr_vio.h"
 #include "hw/ppc/xics.h"
 
-#ifdef CONFIG_FDT
 #include <libfdt.h>
-#endif /* CONFIG_FDT */
 
 /* #define DEBUG_SPAPR */
 
@@ -94,7 +92,6 @@ VIOsPAPRDevice *spapr_vio_find_by_reg(VIOsPAPRBus *bus, uint32_t reg)
     return NULL;
 }
 
-#ifdef CONFIG_FDT
 static int vio_make_devnode(VIOsPAPRDevice *dev,
                             void *fdt)
 {
@@ -159,7 +156,6 @@ static int vio_make_devnode(VIOsPAPRDevice *dev,
 
     return node_off;
 }
-#endif /* CONFIG_FDT */
 
 /*
  * CRQ handling
@@ -570,7 +566,6 @@ static void spapr_vio_register_types(void)
 
 type_init(spapr_vio_register_types)
 
-#ifdef CONFIG_FDT
 static int compare_reg(const void *p1, const void *p2)
 {
     VIOsPAPRDevice const *dev1, *dev2;
@@ -655,4 +650,3 @@ int spapr_populate_chosen_stdout(void *fdt, VIOsPAPRBus *bus)
 
     return ret;
 }
-#endif /* CONFIG_FDT */
diff --git a/hw/ppc/virtex_ml507.c b/hw/ppc/virtex_ml507.c
index 1b4ce76..709a707 100644
--- a/hw/ppc/virtex_ml507.c
+++ b/hw/ppc/virtex_ml507.c
@@ -141,7 +141,6 @@ static int xilinx_load_device_tree(hwaddr addr,
 {
     char *path;
     int fdt_size;
-#ifdef CONFIG_FDT
     void *fdt;
     int r;
 
@@ -162,23 +161,6 @@ static int xilinx_load_device_tree(hwaddr addr,
     if (r < 0)
         fprintf(stderr, "couldn't set /chosen/bootargs\n");
     cpu_physical_memory_write(addr, fdt, fdt_size);
-#else
-    /* We lack libfdt so we cannot manipulate the fdt. Just pass on the blob
-       to the kernel.  */
-    fdt_size = load_image_targphys("ppc.dtb", addr, 0x10000);
-    if (fdt_size < 0) {
-        path = qemu_find_file(QEMU_FILE_TYPE_BIOS, BINARY_DEVICE_TREE_FILE);
-        if (path) {
-            fdt_size = load_image_targphys(path, addr, 0x10000);
-            g_free(path);
-        }
-    }
-
-    if (kernel_cmdline) {
-        fprintf(stderr,
-                "Warning: missing libfdt, cannot pass cmdline to kernel!\n");
-    }
-#endif
     return fdt_size;
 }
 
-- 
1.7.9.5

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

* Re: [Qemu-devel] [PATCH 0/4] Require libfdt for arm/microblaze/ppc softmmu targets
  2013-05-24 15:26 [Qemu-devel] [PATCH 0/4] Require libfdt for arm/microblaze/ppc softmmu targets Peter Maydell
                   ` (3 preceding siblings ...)
  2013-05-24 15:26 ` [Qemu-devel] [PATCH 4/4] ppc: " Peter Maydell
@ 2013-05-25 12:32 ` Edgar E. Iglesias
  4 siblings, 0 replies; 11+ messages in thread
From: Edgar E. Iglesias @ 2013-05-25 12:32 UTC (permalink / raw)
  To: Peter Maydell
  Cc: Anthony Liguori, patches, Alexander Graf, qemu-devel,
	Andreas Färber, qemu-ppc, Peter Crosthwaite

On Fri, May 24, 2013 at 04:26:53PM +0100, Peter Maydell wrote:
> This patchset makes libfdt mandatory for building the ARM,
> MicroBlaze and PPC softmmu targets. These architectures need
> libfdt for at least some of their board models to be usefully
> functional, so now that we have an in-tree version of libfdt
> it's better to insist on using it rather than allowing users
> to build less-than-useful binaries.
> 
> NB: I have tested the ARM change, but only compile-tested PPC
> and MicroBlaze.

Hi,

I test ran the ppc virtex-ml507 and microblaze petalogix s3adsp images,
works ok.

Tested-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>

Cheers,
Edgar

> 
> Peter Maydell (4):
>   configure: Require libfdt for arm, ppc, microblaze softmmu targets
>   arm: Remove CONFIG_FDT conditionals
>   microblaze: Remove CONFIG_FDT conditionals
>   ppc: Remove CONFIG_FDT conditionals
> 
>  configure                          |   20 ++++++++++++++++++++
>  default-configs/ppc-softmmu.mak    |    2 +-
>  default-configs/ppc64-softmmu.mak  |    4 ++--
>  default-configs/ppcemb-softmmu.mak |    2 +-
>  hw/arm/boot.c                      |    7 -------
>  hw/microblaze/boot.c               |   12 ------------
>  hw/ppc/ppc440_bamboo.c             |    2 --
>  hw/ppc/spapr_vio.c                 |    6 ------
>  hw/ppc/virtex_ml507.c              |   18 ------------------
>  9 files changed, 24 insertions(+), 49 deletions(-)
> 
> -- 
> 1.7.9.5
> 

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

* Re: [Qemu-devel] [PATCH 1/4] configure: Require libfdt for arm, ppc, microblaze softmmu targets
  2013-05-24 15:26 ` [Qemu-devel] [PATCH 1/4] configure: Require libfdt for arm, ppc, microblaze " Peter Maydell
@ 2013-05-28  4:07   ` Peter Crosthwaite
  2013-05-28  9:03   ` Andreas Färber
  1 sibling, 0 replies; 11+ messages in thread
From: Peter Crosthwaite @ 2013-05-28  4:07 UTC (permalink / raw)
  To: Peter Maydell
  Cc: Anthony Liguori, patches, Alexander Graf, qemu-devel,
	Andreas Färber, qemu-ppc, Edgar E. Iglesias

On Sat, May 25, 2013 at 1:26 AM, Peter Maydell <peter.maydell@linaro.org> wrote:
> A number of our softmmu targets (PPC, ARM, Microblaze) now more or
> less require flattened device tree support for various board models
> to work correctly.  Make libfdt mandatory if the target list includes
> these, rather than building unhelpful half-functional binaries.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>

> ---
>  configure |   20 ++++++++++++++++++++
>  1 file changed, 20 insertions(+)
>
> diff --git a/configure b/configure
> index 5ae7e4a..708c010 100755
> --- a/configure
> +++ b/configure
> @@ -2518,6 +2518,26 @@ fi
>
>  ##########################################
>  # fdt probe
> +# fdt support is mandatory for at least some target architectures,
> +# so insist on it if we're building those system emulators.
> +fdt_required=no
> +for target in $target_list; do
> +  case $target in
> +    arm*softmmu|ppc*softmmu|microblaze*softmmu)
> +      fdt_required=yes
> +    ;;
> +  esac
> +done
> +
> +if test "$fdt_required" = "yes"; then
> +  if test "$fdt" = "no"; then
> +    error_exit "fdt disabled but some requested targets require it." \
> +      "You can turn off fdt only if you also disable all the system emulation" \
> +      "targets which need it (by specifying a cut down --target-list)."
> +  fi
> +  fdt=yes
> +fi
> +
>  if test "$fdt" != "no" ; then
>    fdt_libs="-lfdt"
>    cat > $TMPC << EOF
> --
> 1.7.9.5
>
>

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

* Re: [Qemu-devel] [PATCH 2/4] arm: Remove CONFIG_FDT conditionals
  2013-05-24 15:26 ` [Qemu-devel] [PATCH 2/4] arm: Remove CONFIG_FDT conditionals Peter Maydell
@ 2013-05-28  4:09   ` Peter Crosthwaite
  0 siblings, 0 replies; 11+ messages in thread
From: Peter Crosthwaite @ 2013-05-28  4:09 UTC (permalink / raw)
  To: Peter Maydell
  Cc: Anthony Liguori, patches, Alexander Graf, qemu-devel,
	Andreas Färber, qemu-ppc, Edgar E. Iglesias

On Sat, May 25, 2013 at 1:26 AM, Peter Maydell <peter.maydell@linaro.org> wrote:
> Now that we know we're compiling with libfdt, we can remove the
> CONFIG_FDT conditionals.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>

> ---
>  hw/arm/boot.c |    7 -------
>  1 file changed, 7 deletions(-)
>
> diff --git a/hw/arm/boot.c b/hw/arm/boot.c
> index f451529..defcf15 100644
> --- a/hw/arm/boot.c
> +++ b/hw/arm/boot.c
> @@ -227,7 +227,6 @@ static void set_kernel_args_old(const struct arm_boot_info *info)
>
>  static int load_dtb(hwaddr addr, const struct arm_boot_info *binfo)
>  {
> -#ifdef CONFIG_FDT
>      uint32_t *mem_reg_property;
>      uint32_t mem_reg_propsize;
>      void *fdt = NULL;
> @@ -308,12 +307,6 @@ static int load_dtb(hwaddr addr, const struct arm_boot_info *binfo)
>      cpu_physical_memory_write(addr, fdt, size);
>
>      return 0;
> -
> -#else
> -    fprintf(stderr, "Device tree requested, "
> -                "but qemu was compiled without fdt support\n");
> -    return -1;
> -#endif
>  }
>
>  static void do_cpu_reset(void *opaque)
> --
> 1.7.9.5
>
>

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

* Re: [Qemu-devel] [PATCH 3/4] microblaze: Remove CONFIG_FDT conditionals
  2013-05-24 15:26 ` [Qemu-devel] [PATCH 3/4] microblaze: " Peter Maydell
@ 2013-05-28  4:10   ` Peter Crosthwaite
  0 siblings, 0 replies; 11+ messages in thread
From: Peter Crosthwaite @ 2013-05-28  4:10 UTC (permalink / raw)
  To: Peter Maydell
  Cc: Anthony Liguori, patches, Alexander Graf, qemu-devel,
	Andreas Färber, qemu-ppc, Edgar E. Iglesias

On Sat, May 25, 2013 at 1:26 AM, Peter Maydell <peter.maydell@linaro.org> wrote:
> Now that we know we're compiling with libfdt we can remove the
> CONFIG_FDT conditionals.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>

> ---
>  hw/microblaze/boot.c |   12 ------------
>  1 file changed, 12 deletions(-)
>
> diff --git a/hw/microblaze/boot.c b/hw/microblaze/boot.c
> index e543d88..3f1d70e 100644
> --- a/hw/microblaze/boot.c
> +++ b/hw/microblaze/boot.c
> @@ -61,7 +61,6 @@ static int microblaze_load_dtb(hwaddr addr,
>                                        const char *dtb_filename)
>  {
>      int fdt_size;
> -#ifdef CONFIG_FDT
>      void *fdt = NULL;
>      int r;
>
> @@ -81,17 +80,6 @@ static int microblaze_load_dtb(hwaddr addr,
>      }
>
>      cpu_physical_memory_write(addr, fdt, fdt_size);
> -#else
> -    /* We lack libfdt so we cannot manipulate the fdt. Just pass on the blob
> -       to the kernel.  */
> -    if (dtb_filename) {
> -        fdt_size = load_image_targphys(dtb_filename, addr, 0x10000);
> -    }
> -    if (kernel_cmdline) {
> -        fprintf(stderr,
> -                "Warning: missing libfdt, cannot pass cmdline to kernel!\n");
> -    }
> -#endif
>      return fdt_size;
>  }
>
> --
> 1.7.9.5
>
>

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

* Re: [Qemu-devel] [PATCH 1/4] configure: Require libfdt for arm, ppc, microblaze softmmu targets
  2013-05-24 15:26 ` [Qemu-devel] [PATCH 1/4] configure: Require libfdt for arm, ppc, microblaze " Peter Maydell
  2013-05-28  4:07   ` Peter Crosthwaite
@ 2013-05-28  9:03   ` Andreas Färber
  2013-05-28  9:39     ` Peter Maydell
  1 sibling, 1 reply; 11+ messages in thread
From: Andreas Färber @ 2013-05-28  9:03 UTC (permalink / raw)
  To: Peter Maydell
  Cc: Anthony Liguori, patches, Alexander Graf, qemu-devel,
	Andreas Färber, qemu-ppc, Peter Crosthwaite,
	Edgar E. Iglesias

Am 24.05.2013 17:26, schrieb Peter Maydell:
> A number of our softmmu targets (PPC, ARM, Microblaze) now more or
> less require flattened device tree support for various board models
> to work correctly.  Make libfdt mandatory if the target list includes
> these, rather than building unhelpful half-functional binaries.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
>  configure |   20 ++++++++++++++++++++
>  1 file changed, 20 insertions(+)
> 
> diff --git a/configure b/configure
> index 5ae7e4a..708c010 100755
> --- a/configure
> +++ b/configure
> @@ -2518,6 +2518,26 @@ fi
>  
>  ##########################################
>  # fdt probe
> +# fdt support is mandatory for at least some target architectures,
> +# so insist on it if we're building those system emulators.
> +fdt_required=no
> +for target in $target_list; do
> +  case $target in
> +    arm*softmmu|ppc*softmmu|microblaze*softmmu)

Assuming you'll apply this through your tree, it would be more
self-explanatory to use foo*-softmmu despite no practical difference.

I'm guessing arm* is in preparation for a future armeb-softmmu?

Otherwise looks good; still have testing pseries on my TODO list.

Andreas

> +      fdt_required=yes
> +    ;;
> +  esac
> +done
> +
> +if test "$fdt_required" = "yes"; then
> +  if test "$fdt" = "no"; then
> +    error_exit "fdt disabled but some requested targets require it." \
> +      "You can turn off fdt only if you also disable all the system emulation" \
> +      "targets which need it (by specifying a cut down --target-list)."
> +  fi
> +  fdt=yes
> +fi
> +
>  if test "$fdt" != "no" ; then
>    fdt_libs="-lfdt"
>    cat > $TMPC << EOF

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

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

* Re: [Qemu-devel] [PATCH 1/4] configure: Require libfdt for arm, ppc, microblaze softmmu targets
  2013-05-28  9:03   ` Andreas Färber
@ 2013-05-28  9:39     ` Peter Maydell
  0 siblings, 0 replies; 11+ messages in thread
From: Peter Maydell @ 2013-05-28  9:39 UTC (permalink / raw)
  To: Andreas Färber
  Cc: Anthony Liguori, patches, Alexander Graf, qemu-devel,
	Andreas Färber, qemu-ppc, Peter Crosthwaite,
	Edgar E. Iglesias

On 28 May 2013 10:03, Andreas Färber <afaerber@suse.de> wrote:
> Am 24.05.2013 17:26, schrieb Peter Maydell:
>> +# fdt support is mandatory for at least some target architectures,
>> +# so insist on it if we're building those system emulators.
>> +fdt_required=no
>> +for target in $target_list; do
>> +  case $target in
>> +    arm*softmmu|ppc*softmmu|microblaze*softmmu)
>
> Assuming you'll apply this through your tree, it would be more
> self-explanatory to use foo*-softmmu despite no practical difference.

Agreed.

> I'm guessing arm* is in preparation for a future armeb-softmmu?

Yes, also for consistency with ppc.

-- PMM

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

end of thread, other threads:[~2013-05-28  9:39 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-24 15:26 [Qemu-devel] [PATCH 0/4] Require libfdt for arm/microblaze/ppc softmmu targets Peter Maydell
2013-05-24 15:26 ` [Qemu-devel] [PATCH 1/4] configure: Require libfdt for arm, ppc, microblaze " Peter Maydell
2013-05-28  4:07   ` Peter Crosthwaite
2013-05-28  9:03   ` Andreas Färber
2013-05-28  9:39     ` Peter Maydell
2013-05-24 15:26 ` [Qemu-devel] [PATCH 2/4] arm: Remove CONFIG_FDT conditionals Peter Maydell
2013-05-28  4:09   ` Peter Crosthwaite
2013-05-24 15:26 ` [Qemu-devel] [PATCH 3/4] microblaze: " Peter Maydell
2013-05-28  4:10   ` Peter Crosthwaite
2013-05-24 15:26 ` [Qemu-devel] [PATCH 4/4] ppc: " Peter Maydell
2013-05-25 12:32 ` [Qemu-devel] [PATCH 0/4] Require libfdt for arm/microblaze/ppc softmmu targets Edgar E. Iglesias

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.