diff mbox

[1/2] device_tree: Fix build with latest libfdt

Message ID 1370529574-31069-2-git-send-email-hdegoede@redhat.com
State New
Headers show

Commit Message

Hans de Goede June 6, 2013, 2:39 p.m. UTC
We override libfdt_env.h with our own copy, and the latest libfdt expects
libfdt_env.h to define fdt##_t types.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 include/libfdt_env.h | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Gerd Hoffmann June 6, 2013, 2:51 p.m. UTC | #1
On 06/06/13 16:39, Hans de Goede wrote:
> We override libfdt_env.h with our own copy, and the latest libfdt expects
> libfdt_env.h to define fdt##_t types.

Looks sane to me, but I'll leave that to the fdt experts ...

cheers,
  Gerd
Peter Crosthwaite June 11, 2013, 2:13 a.m. UTC | #2
Hi Hans,

On Fri, Jun 7, 2013 at 12:39 AM, Hans de Goede <hdegoede@redhat.com> wrote:
> We override libfdt_env.h with our own copy, and the latest libfdt expects
> libfdt_env.h to define fdt##_t types.
>

This discussion is open on list, and AFAICT the consensus is to drop
qemus libfdt_env.h altogether. QEMU should not be trying to override
libfdt_env.h because it does not have a good reason to.

[PATCH v2 1/1] configure: dtc: Probe for libfdt_env.h

CCing the crowd.

Regards,
Peter

> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
>  include/libfdt_env.h | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/include/libfdt_env.h b/include/libfdt_env.h
> index 3667d4c..1cd8766 100644
> --- a/include/libfdt_env.h
> +++ b/include/libfdt_env.h
> @@ -19,8 +19,14 @@
>  #ifndef _LIBFDT_ENV_H
>  #define _LIBFDT_ENV_H
>
> +#include <stdint.h>
> +
>  #include "qemu/bswap.h"
>
> +typedef uint16_t fdt16_t;
> +typedef uint32_t fdt32_t;
> +typedef uint64_t fdt64_t;
> +
>  #ifdef HOST_WORDS_BIGENDIAN
>  #define fdt32_to_cpu(x)  (x)
>  #define cpu_to_fdt32(x)  (x)
> --
> 1.8.2.1
>
>
Paolo Bonzini June 12, 2013, 1:55 p.m. UTC | #3
Il 10/06/2013 22:13, Peter Crosthwaite ha scritto:
> Hi Hans,
> 
> On Fri, Jun 7, 2013 at 12:39 AM, Hans de Goede <hdegoede@redhat.com> wrote:
>> We override libfdt_env.h with our own copy, and the latest libfdt expects
>> libfdt_env.h to define fdt##_t types.
>>
> 
> This discussion is open on list, and AFAICT the consensus is to drop
> qemus libfdt_env.h altogether. QEMU should not be trying to override
> libfdt_env.h because it does not have a good reason to.
> 
> [PATCH v2 1/1] configure: dtc: Probe for libfdt_env.h
> 
> CCing the crowd.

F19, F20 and EPEL6 will all distribute libfdt_env.h by the time 1.6 is
out.  If this patch is not qemu-stable material, you have my ack too.
Thanks!

Paolo
Peter Maydell June 12, 2013, 2:01 p.m. UTC | #4
On 12 June 2013 14:55, Paolo Bonzini <pbonzini@redhat.com> wrote:
> Il 10/06/2013 22:13, Peter Crosthwaite ha scritto:
>> Hi Hans,
>>
>> On Fri, Jun 7, 2013 at 12:39 AM, Hans de Goede <hdegoede@redhat.com> wrote:
>>> We override libfdt_env.h with our own copy, and the latest libfdt expects
>>> libfdt_env.h to define fdt##_t types.
>>>
>>
>> This discussion is open on list, and AFAICT the consensus is to drop
>> qemus libfdt_env.h altogether. QEMU should not be trying to override
>> libfdt_env.h because it does not have a good reason to.
>>
>> [PATCH v2 1/1] configure: dtc: Probe for libfdt_env.h
>>
>> CCing the crowd.
>
> F19, F20 and EPEL6 will all distribute libfdt_env.h by the time 1.6 is
> out.  If this patch is not qemu-stable material, you have my ack too.

For clarity, by "this patch" do you mean the one that started
this email thread (from Hans) or the one from Peter that he
quotes the Subject of here?

thanks
-- PMM
Paolo Bonzini June 12, 2013, 2:03 p.m. UTC | #5
Il 12/06/2013 10:01, Peter Maydell ha scritto:
>>> >> [PATCH v2 1/1] configure: dtc: Probe for libfdt_env.h
>>> >>
>>> >> CCing the crowd.
>> >
>> > F19, F20 and EPEL6 will all distribute libfdt_env.h by the time 1.6 is
>> > out.  If this patch is not qemu-stable material, you have my ack too.
> For clarity, by "this patch" do you mean the one that started
> this email thread (from Hans) or the one from Peter that he
> quotes the Subject of here?

The one that requires libfdt_env.h to be installed under /usr/include.

Paolo
diff mbox

Patch

diff --git a/include/libfdt_env.h b/include/libfdt_env.h
index 3667d4c..1cd8766 100644
--- a/include/libfdt_env.h
+++ b/include/libfdt_env.h
@@ -19,8 +19,14 @@ 
 #ifndef _LIBFDT_ENV_H
 #define _LIBFDT_ENV_H
 
+#include <stdint.h>
+
 #include "qemu/bswap.h"
 
+typedef uint16_t fdt16_t;
+typedef uint32_t fdt32_t;
+typedef uint64_t fdt64_t;
+
 #ifdef HOST_WORDS_BIGENDIAN
 #define fdt32_to_cpu(x)  (x)
 #define cpu_to_fdt32(x)  (x)