qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH for 2.10 0/4] check dtc submodule is outdated


From: Philippe Mathieu-Daudé
Subject: [Qemu-devel] [PATCH for 2.10 0/4] check dtc submodule is outdated
Date: Wed, 26 Jul 2017 18:40:06 -0300

On http://lists.nongnu.org/archive/html/qemu-devel/2017-07/msg07987.html John
hit the following error:

hw/core/loader-fit.c:105:41: error: expected expression
        *addr = fdt32_to_cpu(*(fdt32_t *)prop);
                                        ^
having his ./configure --target-list=mips64el-softmmu on OSX returning:
fdt support       yes

It seems his dtc submodule was out of date but the ./configure did not emit
warning. I could reproduce checking out dtc tag v1.4.1.

patch 1: if you are out of the source directory "git submodule" fails, try to
improve the warning remembering the user to run this command in source/.

patch 2: a check exists to warn --disable-fdt --target-list=mips64el-softmmu
is invalid. move the warning to also warn AFTER checking if libfdt is
available and sane.

patch 3: fdt_first_subnode() is available since v1.4.0 while we are requiring
v1.4.2, better check a v1.4.2 function such as:
fdt_setprop_inplace_namelen_partial()

patch 4: if no system libdtc and submodule present, compile the dtc submodule
and verify it is at least v1.4.2. Prefixed RFC because I'm not sure about
these 3 lines:

+    make -C dtc 1>/dev/null

yes, we need to build the libdtc to be able to run the compile_prog link step

+    fdt_cflags="-I${source_path}/dtc/libfdt"

$source_path seems ok...

+    fdt_libs="-L$(pwd)/dtc/libfdt $fdt_libs"

maybe there is a better option than `pwd`

how to reproduce:

((v2.10.0-rc0))$ (cd dtc && git checkout v1.3.0)
((v2.10.0-rc0))$ ./configure --target-list=mips64el-softmmu 
--extra-cflags=-fmax-errors=1 | fgrep fdt
fdt support       yes
((v2.10.0-rc0))$ make hw/core/loader-fit.o
hw/core/loader-fit.c: In function ‘fit_image_addr’:
hw/core/loader-fit.c:105:32: error: ‘fdt32_t’ undeclared (first use in this 
function)
         *addr = fdt32_to_cpu(*(fdt32_t *)prop);
                                ^~~~~~~
compilation terminated due to -fmax-errors=1.
rules.mak:66: recipe for target 'hw/core/loader-fit.o' failed

(dtc-fix)$ mkdir test && cd test
(dtc-fix)$ ../configure --target-list=mips64el-softmmu 
--extra-cflags=-fmax-errors=1
ERROR: Your DTC submodule is outdated. Your options:
         (1) Preferred: Install the DTC (libfdt) devel package
         (2) Update the DTC submodule, using: (in /home/phil/source/qemu)
             git submodule update --init dtc

Regards,

Phil.

Philippe Mathieu-Daudé (4):
  configure: remember the user to run 'git submodule' command in source dir
  fdt: check fdt_required condition can be satisfied _after_ testing libfdt
  fdt: probe for v1.4.2 using fdt_setprop_inplace_namelen_partial()
  fdt: compile dtc submodule to check it is up-to-date

 configure | 52 +++++++++++++++++++++++++++++++++++-----------------
 1 file changed, 35 insertions(+), 17 deletions(-)

-- 
2.13.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]