Skip to contentSkip to conversation

riscv: requires libfdt

PATCH In review KONRAD Frederic 6 participants 8 messages Apr 19, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 riscv: requires libfdt

When compiling on a machine without libfdt installed the configure script should try to get libfdt from the git or should die because otherwise CONFIG_LIBFDT is not set and the build process end in an error in the link phase.. eg:

hw/riscv/virt.o: In function `riscv_virt_board_init':
qemu/src/hw/riscv/virt.c:317: undefined reference to qemu_fdt_setprop_cell' qemu/src/hw/riscv/virt.c:319: undefined reference to qemu_fdt_setprop_cell' qemu/src/hw/riscv/virt.c:345: undefined reference to `qemu_fdt_dumpdtb'
collect2: error: ld returned 1 exit status
make[1]: *** [qemu-system-riscv64] Error 1
make: *** [subdir-riscv64-softmmu] Error 2

---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
configure +1 -1
index 0a19b03..1587f08 100755
@@ -3732,7 +3732,7 @@ fi
 fdt_required=no
 for target in $target_list; do
   case $target in
-    aarch64*-softmmu|arm*-softmmu|ppc*-softmmu|microblaze*-softmmu|mips64el-softmmu)
+    aarch64*-softmmu|arm*-softmmu|ppc*-softmmu|microblaze*-softmmu|mips64el-softmmu|riscv64-softmmu)
       fdt_required=yes
     ;;
   esac
Signature · 1 line
1.8.3.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 13 lines · KONRAD Frederic

When compiling on a machine without libfdt installed the configure script should try to get libfdt from the git or should die because otherwise CONFIG_LIBFDT is not set and the build process end in an error in the link phase.. eg:

hw/riscv/virt.o: In function `riscv_virt_board_init':
qemu/src/hw/riscv/virt.c:317: undefined reference to qemu_fdt_setprop_cell' qemu/src/hw/riscv/virt.c:319: undefined reference to qemu_fdt_setprop_cell' qemu/src/hw/riscv/virt.c:345: undefined reference to `qemu_fdt_dumpdtb'
collect2: error: ld returned 1 exit status
make[1]: *** [qemu-system-riscv64] Error 1
make: *** [subdir-riscv64-softmmu] Error 2

Quoted 2 lines

---

Cheers,
Bastian

#2 lore raw
In reply to KONRAD Frederic
Quoted 24 lines · KONRAD Frederic

When compiling on a machine without libfdt installed the configure script should try to get libfdt from the git or should die because otherwise CONFIG_LIBFDT is not set and the build process end in an error in the link phase.. eg:

hw/riscv/virt.o: In function `riscv_virt_board_init':
qemu/src/hw/riscv/virt.c:317: undefined reference to qemu_fdt_setprop_cell' qemu/src/hw/riscv/virt.c:319: undefined reference to qemu_fdt_setprop_cell' qemu/src/hw/riscv/virt.c:345: undefined reference to `qemu_fdt_dumpdtb'
collect2: error: ld returned 1 exit status
make[1]: *** [qemu-system-riscv64] Error 1
make: *** [subdir-riscv64-softmmu] Error 2

---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
configure +0 -0
index 0a19b03..1587f08 100755

configure fi · line 3738

Quoted 8 lines
configure +1 -1
@@ -3732,7 +3732,7 @@ fi
 fdt_required=no
 for target in $target_list; do
   case $target in
-    aarch64*-softmmu|arm*-softmmu|ppc*-softmmu|microblaze*-softmmu|mips64el-softmmu)
+    aarch64*-softmmu|arm*-softmmu|ppc*-softmmu|microblaze*-softmmu|mips64el-softmmu|riscv64-softmmu)
       fdt_required=yes
     ;;
   esac

Maybe good for 2.12, even though it would make the final rc and final release different?

Thanks,

Paolo

#3 lore raw
Quoted 37 lines · Paolo Bonzini
Quoted 24 lines · KONRAD Frederic

When compiling on a machine without libfdt installed the configure script should try to get libfdt from the git or should die because otherwise CONFIG_LIBFDT is not set and the build process end in an error in the link phase.. eg:

hw/riscv/virt.o: In function `riscv_virt_board_init':
qemu/src/hw/riscv/virt.c:317: undefined reference to qemu_fdt_setprop_cell' qemu/src/hw/riscv/virt.c:319: undefined reference to qemu_fdt_setprop_cell' qemu/src/hw/riscv/virt.c:345: undefined reference to `qemu_fdt_dumpdtb'
collect2: error: ld returned 1 exit status
make[1]: *** [qemu-system-riscv64] Error 1
make: *** [subdir-riscv64-softmmu] Error 2

---
  configure | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
configure +0 -0
index 0a19b03..1587f08 100755

configure fi · line 3738

Quoted 8 lines
configure +1 -1
@@ -3732,7 +3732,7 @@ fi
  fdt_required=no
  for target in $target_list; do
    case $target in
-    aarch64*-softmmu|arm*-softmmu|ppc*-softmmu|microblaze*-softmmu|mips64el-softmmu)
+    aarch64*-softmmu|arm*-softmmu|ppc*-softmmu|microblaze*-softmmu|mips64el-softmmu|riscv64-softmmu)
        fdt_required=yes
      ;;
    esac

Maybe good for 2.12, even though it would make the final rc and final release different?

Quoted 4 lines

Thanks,

Paolo

On my side it doesn't matter much if it is 2.12 or 2.13, up to you guys.

Thanks,
Fred

#4 lore raw
In reply to Paolo Bonzini
Quoted 16 lines · Paolo Bonzini

configure fi · line 3738

Quoted 12 lines · KONRAD Frederic
configure +1 -1
@@ -3732,7 +3732,7 @@ fi
 fdt_required=no
 for target in $target_list; do
   case $target in
-    aarch64*-softmmu|arm*-softmmu|ppc*-softmmu|microblaze*-softmmu|mips64el-softmmu)
+    aarch64*-softmmu|arm*-softmmu|ppc*-softmmu|microblaze*-softmmu|mips64el-softmmu|riscv64-softmmu)
       fdt_required=yes
     ;;
   esac

Maybe good for 2.12, even though it would make the final rc and final release different?

I strongly prefer not to have changes between final rc and actual release, and I don't think this rises to the level of justifying another rc, since there is an easy user workaround for it (pass --enable-fdt to configure).

thanks
-- PMM

#5 lore raw
In reply to KONRAD Frederic
Quoted 23 lines · KONRAD Frederic

When compiling on a machine without libfdt installed the configure script should try to get libfdt from the git or should die because otherwise CONFIG_LIBFDT is not set and the build process end in an error in the link phase.. eg:

hw/riscv/virt.o: In function `riscv_virt_board_init':
qemu/src/hw/riscv/virt.c:317: undefined reference to qemu_fdt_setprop_cell' qemu/src/hw/riscv/virt.c:319: undefined reference to qemu_fdt_setprop_cell' qemu/src/hw/riscv/virt.c:345: undefined reference to `qemu_fdt_dumpdtb'
collect2: error: ld returned 1 exit status
make[1]: *** [qemu-system-riscv64] Error 1
make: *** [subdir-riscv64-softmmu] Error 2

---
  configure | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
configure +0 -0
index 0a19b03..1587f08 100755

configure fi · line 3735

Quoted 5 lines
configure +1 -1
@@ -3732,7 +3732,7 @@ fi
  fdt_required=no
  for target in $target_list; do
    case $target in
-    aarch64*-softmmu|arm*-softmmu|ppc*-softmmu|microblaze*-softmmu|mips64el-softmmu)
+    aarch64*-softmmu|arm*-softmmu|ppc*-softmmu|microblaze*-softmmu|mips64el-softmmu|riscv64-softmmu)

I just realized that riscv32 use it too so I'll correct with riscv*-softmmu.

Cheers,
Fred

Quoted 4 lines
configure +0 -0
        fdt_required=yes
      ;;
    esac
#6 lore raw
Quoted 33 lines · KONRAD Frederic
Quoted 32 lines

When compiling on a machine without libfdt installed the configure script should try to get libfdt from the git or should die because otherwise CONFIG_LIBFDT is not set and the build process end in an error in the link
phase.. eg:

hw/riscv/virt.o: In function `riscv_virt_board_init':
qemu/src/hw/riscv/virt.c:317: undefined reference to `qemu_fdt_setprop_cell'
qemu/src/hw/riscv/virt.c:319: undefined reference to `qemu_fdt_setprop_cell'
qemu/src/hw/riscv/virt.c:345: undefined reference to `qemu_fdt_dumpdtb'
collect2: error: ld returned 1 exit status
make[1]: *** [qemu-system-riscv64] Error 1
make: *** [subdir-riscv64-softmmu] Error 2

---
  configure | 2 +-

  1 file changed, 1 insertion(+), 1 deletion(-)
configure +0 -0
index 0a19b03..1587f08 100755
@@ -3732,7 +3732,7 @@ fi

  fdt_required=no
  for target in $target_list; do
    case $target in
- aarch64*-softmmu|arm*-softmmu|ppc*-softmmu|microblaze*-softmmu|mips64el-softmmu)

Quoted 6 lines
Quoted 3 lines

+ aarch64*-softmmu|arm*-softmmu|ppc*-softmmu|microblaze*-softmmu|mips64el-softmmu|riscv64-softmmu)

I just realized that riscv32 use it too so I'll correct with riscv*-softmmu.

Using "riscv*-softmmu":

Quoted 5 lines
Quoted 4 lines

        fdt_required=yes
      ;;
    esac

Reviewed-by Philippe Mathieu-Daudé Reviewed-by
#7 lore raw
Quoted 37 lines · Philippe Mathieu-Daudé
Quoted 2 lines · KONRAD Frederic
Quoted 1 line

When compiling on a machine without libfdt installed the configure

script

Quoted 20 lines
Quoted 20 lines

should try to get libfdt from the git or should die because otherwise CONFIG_LIBFDT is not set and the build process end in an error in the link
phase.. eg:

hw/riscv/virt.o: In function `riscv_virt_board_init':
qemu/src/hw/riscv/virt.c:317: undefined reference to `qemu_fdt_setprop_cell'
qemu/src/hw/riscv/virt.c:319: undefined reference to `qemu_fdt_setprop_cell'
qemu/src/hw/riscv/virt.c:345: undefined reference to `qemu_fdt_dumpdtb'
collect2: error: ld returned 1 exit status
make[1]: *** [qemu-system-riscv64] Error 1
make: *** [subdir-riscv64-softmmu] Error 2

---
  configure | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 10 lines
Quoted 10 lines
configure +0 -1
index 0a19b03..1587f08 100755
@@ -3732,7 +3732,7 @@ fi
  fdt_required=no
  for target in $target_list; do
    case $target in
-

aarch64*-softmmu|arm*-softmmu|ppc*-softmmu|microblaze*-

softmmu|mips64el-softmmu)

Quoted 3 lines
Quoted 3 lines

+ aarch64*-softmmu|arm*-softmmu|ppc*-softmmu|microblaze*-

Quoted 8 lines

softmmu|mips64el-softmmu|riscv64-softmmu)

Quoted 4 lines
Quoted 1 line

I just realized that riscv32 use it too so I'll correct with riscv*-softmmu.

Using "riscv*-softmmu":

Indeed.

We had this fix in our tree before one of the rebases against upstream:

https://github.com/riscv/riscv-qemu/commit/90cdfb86e81c54c1df42412b10b86fd83a6dee82

It must have somehow got dropped when we forward ported to QEMU master in December 2017. My apologies.

Quoted 1 line
Quoted 6 lines
Quoted 5 lines

fdt_required=yes

Quoted 3 lines
      ;;
    esac