[PATCH 4/5] configure: check for SLOF submodule before building pc-bios/s390-ccw

Paolo Bonzini posted 5 patches 2 years, 8 months ago
Maintainers: "Alex Bennée" <alex.bennee@linaro.org>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Thomas Huth <thuth@redhat.com>, Wainer dos Santos Moschetta <wainersm@redhat.com>, Beraldo Leal <bleal@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>, Elena Ufimtseva <elena.ufimtseva@oracle.com>, Jagannathan Raman <jag.raman@oracle.com>, John G Johnson <john.g.johnson@oracle.com>, Aurelien Jarno <aurelien@aurel32.net>, Peter Maydell <peter.maydell@linaro.org>
There is a newer version of this series
[PATCH 4/5] configure: check for SLOF submodule before building pc-bios/s390-ccw
Posted by Paolo Bonzini 2 years, 8 months ago
SLOF is required for building the s390-ccw firmware on s390x,
since it is using the libnet code from SLOF for network booting.

If SLOF is absent and submodules are not updated, pc-bios/s390-ccw
cannot be built.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 configure | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/configure b/configure
index 1d1b8736c0eb..c92a3b30b9a4 100755
--- a/configure
+++ b/configure
@@ -1662,7 +1662,8 @@ fi
 
 # Only build s390-ccw bios if the compiler has -march=z900 or -march=z10
 # (which is the lowest architecture level that Clang supports)
-if have_target s390x-softmmu && probe_target_compiler s390x-softmmu; then
+if have_target s390x-softmmu && probe_target_compiler s390x-softmmu && \
+    ( test "$git_submodules_action" != ignore || test -f roms/SLOF/VERSION ); then
   write_c_skeleton
   do_compiler "$target_cc" $target_cc_cflags -march=z900 -o $TMPO -c $TMPC
   has_z900=$?
-- 
2.40.1
Re: [PATCH 4/5] configure: check for SLOF submodule before building pc-bios/s390-ccw
Posted by Thomas Huth 2 years, 8 months ago
On 27/05/2023 11.28, Paolo Bonzini wrote:
> SLOF is required for building the s390-ccw firmware on s390x,
> since it is using the libnet code from SLOF for network booting.
> 
> If SLOF is absent and submodules are not updated, pc-bios/s390-ccw
> cannot be built.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>   configure | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/configure b/configure
> index 1d1b8736c0eb..c92a3b30b9a4 100755
> --- a/configure
> +++ b/configure
> @@ -1662,7 +1662,8 @@ fi
>   
>   # Only build s390-ccw bios if the compiler has -march=z900 or -march=z10
>   # (which is the lowest architecture level that Clang supports)
> -if have_target s390x-softmmu && probe_target_compiler s390x-softmmu; then
> +if have_target s390x-softmmu && probe_target_compiler s390x-softmmu && \
> +    ( test "$git_submodules_action" != ignore || test -f roms/SLOF/VERSION ); then
>     write_c_skeleton
>     do_compiler "$target_cc" $target_cc_cflags -march=z900 -o $TMPO -c $TMPC
>     has_z900=$?

Not sure if we really need this. Only the networking part of the s390-ccw 
bios cannot be build without SLOF, but the main binary still builds fine 
also without it.

  Thomas
Re: [PATCH 4/5] configure: check for SLOF submodule before building pc-bios/s390-ccw
Posted by Paolo Bonzini 2 years, 8 months ago
On Tue, May 30, 2023 at 2:04 PM Thomas Huth <thuth@redhat.com> wrote:
> On 27/05/2023 11.28, Paolo Bonzini wrote:
> > SLOF is required for building the s390-ccw firmware on s390x,
> > since it is using the libnet code from SLOF for network booting.
> >
> > If SLOF is absent and submodules are not updated, pc-bios/s390-ccw
> > cannot be built.
> >
> > Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> > ---
> >   configure | 3 ++-
> >   1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/configure b/configure
> > index 1d1b8736c0eb..c92a3b30b9a4 100755
> > --- a/configure
> > +++ b/configure
> > @@ -1662,7 +1662,8 @@ fi
> >
> >   # Only build s390-ccw bios if the compiler has -march=z900 or -march=z10
> >   # (which is the lowest architecture level that Clang supports)
> > -if have_target s390x-softmmu && probe_target_compiler s390x-softmmu; then
> > +if have_target s390x-softmmu && probe_target_compiler s390x-softmmu && \
> > +    ( test "$git_submodules_action" != ignore || test -f roms/SLOF/VERSION ); then
> >     write_c_skeleton
> >     do_compiler "$target_cc" $target_cc_cflags -march=z900 -o $TMPO -c $TMPC
> >     has_z900=$?
>
> Not sure if we really need this. Only the networking part of the s390-ccw
> bios cannot be build without SLOF, but the main binary still builds fine
> also without it.

Thinking more about it---considering we have prebuilt s390-ccw
binaries, why would someone want to rebuild only one of the ROMs and
risk breaking the other? Should we keep this patch, and also include
$(SRC_PATH)/netboot.mak unconditionally from
pc-bios/s390-ccw/Makefile?

Paolo
Re: [PATCH 4/5] configure: check for SLOF submodule before building pc-bios/s390-ccw
Posted by Thomas Huth 2 years, 8 months ago
On 30/05/2023 14.53, Paolo Bonzini wrote:
> On Tue, May 30, 2023 at 2:04 PM Thomas Huth <thuth@redhat.com> wrote:
>> On 27/05/2023 11.28, Paolo Bonzini wrote:
>>> SLOF is required for building the s390-ccw firmware on s390x,
>>> since it is using the libnet code from SLOF for network booting.
>>>
>>> If SLOF is absent and submodules are not updated, pc-bios/s390-ccw
>>> cannot be built.
>>>
>>> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>>> ---
>>>    configure | 3 ++-
>>>    1 file changed, 2 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/configure b/configure
>>> index 1d1b8736c0eb..c92a3b30b9a4 100755
>>> --- a/configure
>>> +++ b/configure
>>> @@ -1662,7 +1662,8 @@ fi
>>>
>>>    # Only build s390-ccw bios if the compiler has -march=z900 or -march=z10
>>>    # (which is the lowest architecture level that Clang supports)
>>> -if have_target s390x-softmmu && probe_target_compiler s390x-softmmu; then
>>> +if have_target s390x-softmmu && probe_target_compiler s390x-softmmu && \
>>> +    ( test "$git_submodules_action" != ignore || test -f roms/SLOF/VERSION ); then
>>>      write_c_skeleton
>>>      do_compiler "$target_cc" $target_cc_cflags -march=z900 -o $TMPO -c $TMPC
>>>      has_z900=$?
>>
>> Not sure if we really need this. Only the networking part of the s390-ccw
>> bios cannot be build without SLOF, but the main binary still builds fine
>> also without it.
> 
> Thinking more about it---considering we have prebuilt s390-ccw
> binaries, why would someone want to rebuild only one of the ROMs and
> risk breaking the other? Should we keep this patch, and also include
> $(SRC_PATH)/netboot.mak unconditionally from
> pc-bios/s390-ccw/Makefile?

Yes, I think it makes sense nowadays. In the beginning, the network 
bootloader was considered experimental and thus optional, but I think it is 
well established nowadays, so it makes sense to always build it together 
with the other part of the s390-ccw bios.

  Thomas