On Thu, Aug 08, 2019 at 03:14:15PM +0100, Richard W.M. Jones wrote:
I'm trying to package OpenSBI RISC-V firmware for Fedora
(
https://github.com/riscv/opensbi). It's a similar situation to
SeaBIOS and other architecture firmware. We have to cross-compile a
binary on potentially any Koji architecture, and end up with a noarch
package, because the final firmware blob can be installed on any
architecture too.
Here's my initial attempt:
https://koji.fedoraproject.org/koji/taskinfo?taskID=36861731
http://oirase.annexia.org/reviews/opensbi/opensbi.spec
I needed to use %global _binaries_in_noarch_packages_terminate_build 0
to stop RPM complaining about:
error: Arch dependent binaries in noarch package
SeaBIOS uses the same workaround:
https://src.fedoraproject.org/rpms/seabios/blob/master/f/seabios.spec
But also it builds an empty seabios package and then builds the binary
into seabios-bin. Does anyone remember why that was needed?
Originally we were using the native compilers, which meant we could
only build it on an x86 host. Thus the main seabios package was
ExclusiveArch %{ix86} x86_64. QEMU's TCG emulators though needed
the resulting firmware available on every arch, so we added the
ROM to the seabios-bin sub-RPM which was Buildarch: noarch.
It thus forced koji to pick an x86 host, but still gave us a noarch
result.
No longer after this though, we switched to using cross compilers,
so I'm not seeing the obvious need to keep this split -bin anymore.
Regards,
Daniel
--
|:
https://berrange.com -o-
https://www.flickr.com/photos/dberrange :|
|:
https://libvirt.org -o-
https://fstop138.berrange.com :|
|:
https://entangle-photo.org -o-
https://www.instagram.com/dberrange :|