Post by Michael TokarevDebian has much stricter policy wrt blobs (DFSG),
and debian builds for more architectures (the firmware,
if it is part of qemu-system-s390 package, needs to be
built on all architectures where this binary package
builts, or it needs to be a separate arch-all package).
Note that the arch:all autobuilders are amd64. gcc-*-s390x-linux-gnu
exists in Debian, although only on i386 and amd64. I don't think there's
a policy today that precludes you from forcing users to build arch:all
on amd64 for technical reasons.
Well, depwait state is valid, no? E.g. i'm sure we have many arch:all
packages that cannot be built on some architectures if e.g. arch:all
source package has an arch:all build dependency that is not
installable on some architectures.
As long as arch:all is buildable on a few common architectures, that's
good enough, no?
Indeed that's one option to build it, that's for example the solution
chosen to build slof using gcc-powerpc64-linux-gnu. So far nobody
complained it's buildable only on amd64, i386, ppc64el and x32.
Note there are now two s390 firmwares in qemu: ccw and netboot. The
netboot one needs SLOF sources.
The other alternative is to build a cross-compiler using binutils-source
and gcc-source (that requires that the none or elf os is supported for
this architecture). This has the advantage of ignoring all the flags
that debhelper tries to push that make a firmware to not build or break.
That's the solution chosen for example for openbios.
Would the attached patch be acceptable for debian?
* It drops stripping roms/SLOF
* Adds Build-Depends-Indep: crossbuild-essential-s390x
(such that it is needed only on the arch:all debian builder, or when
building with -A, meaning it is not needed when doing arch builds,
tested that arch-only build doesn't require this)
(maybe we can add a build profile <!no-firmware> or like <!no-cross>
for this too, to exclude this step, and thus enable people to manually
build arch-all & arch-any packages, without the crosstoolchainy bits)
* Adds code to compile s390 firmwares and install them into
qemu-s390-firmware arch:all package
(package name is arbitrary - it did not feel right to call it bios...
any better name suggestions are welcome)
Given that roms/SLOF code is needed by two firmwares, maybe we can
explore collapsing src:qemu-slof into src:qemu too, using strategy
similar to the above one.
Installing s390x cross toolchain, and compiling s390 firmware adds
trivial amount of extra build-time, given how long/big the full
src:qemu build already is.
--
Regards,
Dimitri.