On Mon, Jan 10, 2022 at 8:16 PM Liviu Ionescu <i...@livius.net> wrote: > > I successfully built two QEMU 6.2 binary packages, one with Arm and one with > RISC-V, each with standalone variants for Linux Intel, Linux Arm, Windows > Intel, macOS Intel and macOS Arm. > > Each package includes only the relevant executables (qemu-system-arm/aarch64 > and respectively qemu-system-riscv32/riscv64). > > However I noticed that the `make install` also creates a `.../shared/qemu` > folder with more than 200 MB of binaries. > > > Given that my binary packages are intended to be installed as dependencies > during tests, I think it would be a waste of bandwidth to include all those > binaries in all distributions. > > > However I don't know if any of those binaries are internally referred by > various configuration options, and I'm concerned that simply removing the > binaries will result in failures to start the emulation. For bare-metal > emulation I expect none, but for Linux emulation there might be some > (unfortunately my experience with emulating Linux is poor, and I cannot tell). > > > If there are such cases, could you suggest which binaries are mandatory for > inclusion in the QEMU Arm package and which in the QEMU RISC-V package, if > any? > > Also, is there a configuration option to disable the inclusion of those > binaries? > > > Thank you, > > Liviu > > > ------------------------------------------------------------------ > > p.s. For completeness, I added the list of files generated by my build of > qemu-system-arm/aarch64 6.2.0: > > > ilg@wks qemu-arm % du -s -m share/qemu > 221 share/qemu > > ilg@wks qemu-arm % ls -l share/qemu > total 448560 > -rw-r--r-- 1 ilg staff 850 Jan 7 14:50 QEMU,cgthree.bin > -rw-r--r-- 1 ilg staff 1402 Jan 7 14:50 QEMU,tcx.bin > -rw-r--r-- 1 ilg staff 3211 Jan 7 14:50 bamboo.dtb > -rw-r--r-- 1 ilg staff 262144 Jan 7 14:50 bios-256k.bin > -rw-r--r-- 1 ilg staff 131072 Jan 7 14:50 bios-microvm.bin > -rw-r--r-- 1 ilg staff 131072 Jan 7 14:50 bios.bin > -rw-r--r-- 1 ilg staff 9779 Jan 7 14:50 canyonlands.dtb > -rw-r--r-- 1 ilg staff 67108864 Jan 7 14:52 edk2-aarch64-code.fd > -rw-r--r-- 1 ilg staff 67108864 Jan 7 14:52 edk2-arm-code.fd > -rw-r--r-- 1 ilg staff 67108864 Jan 7 14:52 edk2-arm-vars.fd > -rw-r--r-- 1 ilg staff 3653632 Jan 7 14:52 edk2-i386-code.fd > -rw-r--r-- 1 ilg staff 3653632 Jan 7 14:52 edk2-i386-secure-code.fd > -rw-r--r-- 1 ilg staff 540672 Jan 7 14:52 edk2-i386-vars.fd > -rw-r--r-- 1 ilg staff 42903 Jan 7 14:50 edk2-licenses.txt > -rw-r--r-- 1 ilg staff 3653632 Jan 7 14:52 edk2-x86_64-code.fd > -rw-r--r-- 1 ilg staff 3653632 Jan 7 14:52 edk2-x86_64-secure-code.fd > -rw-r--r-- 1 ilg staff 159232 Jan 7 14:50 efi-e1000.rom > -rw-r--r-- 1 ilg staff 159232 Jan 7 14:50 efi-e1000e.rom > -rw-r--r-- 1 ilg staff 159232 Jan 7 14:50 efi-eepro100.rom > -rw-r--r-- 1 ilg staff 157696 Jan 7 14:50 efi-ne2k_pci.rom > -rw-r--r-- 1 ilg staff 157696 Jan 7 14:50 efi-pcnet.rom > -rw-r--r-- 1 ilg staff 160768 Jan 7 14:50 efi-rtl8139.rom > -rw-r--r-- 1 ilg staff 160768 Jan 7 14:50 efi-virtio.rom > -rw-r--r-- 1 ilg staff 156672 Jan 7 14:50 efi-vmxnet3.rom > drwxr-xr-x 8 ilg staff 256 Jan 7 14:53 firmware > -rw-r--r-- 1 ilg staff 757144 Jan 7 14:50 hppa-firmware.img > drwxr-xr-x 36 ilg staff 1152 Jan 7 14:53 keymaps > -rw-r--r-- 1 ilg staff 9216 Jan 7 14:50 kvmvapic.bin > -rw-r--r-- 1 ilg staff 1024 Jan 7 14:50 linuxboot.bin > -rw-r--r-- 1 ilg staff 1536 Jan 7 14:50 linuxboot_dma.bin > -rw-r--r-- 1 ilg staff 1024 Jan 7 14:50 multiboot.bin > -rw-r--r-- 1 ilg staff 1024 Jan 7 14:50 multiboot_dma.bin > -rw-r--r-- 1 ilg staff 768 Jan 7 14:50 npcm7xx_bootrom.bin > -rw-r--r-- 1 ilg staff 696912 Jan 7 14:50 openbios-ppc > -rw-r--r-- 1 ilg staff 382048 Jan 7 14:50 openbios-sparc32 > -rw-r--r-- 1 ilg staff 1593408 Jan 7 14:50 openbios-sparc64
Most of these seem to be for other architectures besides ARM/RISC-V. My guess would be keep *arm*/*aarch64*, keymaps, npcm7xx_bootrom.bin, efi-* and linuxboot*/multiboot*. That should ensure that everything works for you, but I'm just guessing here. > -rw-r--r-- 1 ilg staff 78680 Jan 7 14:50 > opensbi-riscv32-generic-fw_dynamic.bin > -rw-r--r-- 1 ilg staff 727464 Jan 7 14:50 > opensbi-riscv32-generic-fw_dynamic.elf > -rw-r--r-- 1 ilg staff 75096 Jan 7 14:50 > opensbi-riscv64-generic-fw_dynamic.bin > -rw-r--r-- 1 ilg staff 781264 Jan 7 14:50 > opensbi-riscv64-generic-fw_dynamic.elf If you want to boot Linux on RISC-V QEMU you will need OpenSBI. You can either use these or build and supply your own binaries. > -rw-r--r-- 1 ilg staff 153728 Jan 7 14:50 palcode-clipper > -rw-r--r-- 1 ilg staff 9882 Jan 7 14:50 petalogix-ml605.dtb > -rw-r--r-- 1 ilg staff 8161 Jan 7 14:50 petalogix-s3adsp1800.dtb > -rw-r--r-- 1 ilg staff 1536 Jan 7 14:50 pvh.bin > -rw-r--r-- 1 ilg staff 67072 Jan 7 14:50 pxe-e1000.rom > -rw-r--r-- 1 ilg staff 61440 Jan 7 14:50 pxe-eepro100.rom > -rw-r--r-- 1 ilg staff 61440 Jan 7 14:50 pxe-ne2k_pci.rom > -rw-r--r-- 1 ilg staff 61440 Jan 7 14:50 pxe-pcnet.rom > -rw-r--r-- 1 ilg staff 61440 Jan 7 14:50 pxe-rtl8139.rom > -rw-r--r-- 1 ilg staff 60416 Jan 7 14:50 pxe-virtio.rom > -rw-r--r-- 1 ilg staff 65536 Jan 7 14:50 qboot.rom > -rw-r--r-- 1 ilg staff 154542 Jan 7 14:50 qemu-nsis.bmp > -rw-r--r-- 1 ilg staff 18752 Jan 7 14:50 qemu_vga.ndrv > -rw-r--r-- 1 ilg staff 50936 Jan 7 14:50 s390-ccw.img > -rw-r--r-- 1 ilg staff 79688 Jan 7 14:50 s390-netboot.img > -rw-r--r-- 1 ilg staff 4096 Jan 7 14:50 sgabios.bin > -rw-r--r-- 1 ilg staff 2528128 Jan 7 14:50 skiboot.lid > -rw-r--r-- 1 ilg staff 991744 Jan 7 14:50 slof.bin > -rw-r--r-- 1 ilg staff 401308 Jan 7 14:51 trace-events-all > -rw-r--r-- 1 ilg staff 524288 Jan 7 14:50 u-boot-sam460-20100605.bin > -rw-r--r-- 1 ilg staff 421720 Jan 7 14:50 u-boot.e500 > -rw-r--r-- 1 ilg staff 39424 Jan 7 14:50 vgabios-ati.bin > -rw-r--r-- 1 ilg staff 28672 Jan 7 14:50 vgabios-bochs-display.bin > -rw-r--r-- 1 ilg staff 39424 Jan 7 14:50 vgabios-cirrus.bin > -rw-r--r-- 1 ilg staff 39424 Jan 7 14:50 vgabios-qxl.bin > -rw-r--r-- 1 ilg staff 28672 Jan 7 14:50 vgabios-ramfb.bin > -rw-r--r-- 1 ilg staff 39424 Jan 7 14:50 vgabios-stdvga.bin > -rw-r--r-- 1 ilg staff 39424 Jan 7 14:50 vgabios-virtio.bin > -rw-r--r-- 1 ilg staff 39424 Jan 7 14:50 vgabios-vmware.bin > -rw-r--r-- 1 ilg staff 38912 Jan 7 14:50 vgabios.bin Not sure about these, you probably don't need them though (again, just a guess) Alistair > > >