Dear coreboot folks,
I am failing to run KolibriOS [1] in QEMU with coreboot.
``` $ wget -4 --quiet https://builds.kolibrios.org/eng/latest-img.7z --2021-03-03 15:38:28-- https://builds.kolibrios.org/eng/latest-img.7z Auflösen des Hostnamens builds.kolibrios.org (builds.kolibrios.org)… 46.4.23.4 Verbindungsaufbau zu builds.kolibrios.org (builds.kolibrios.org)|46.4.23.4|:443 … verbunden. HTTP-Anforderung gesendet, auf Antwort wird gewartet … 200 OK Länge: 1314127 (1,3M) [application/octet-stream] Wird in »latest-img.7z« gespeichert.
latest-img.7z 100%[================================>] 1,25M 3,78MB/s in 0,3s
2021-03-03 15:38:28 (3,78 MB/s) - »latest-img.7z« gespeichert [1314127/1314127] $ 7z e latest-img.7z
7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21 p7zip Version 16.02 (locale=de_DE.UTF-8,Utf16=on,HugeFiles=on,64 bits,4 CPUs Intel(R) Core(TM) i7-5600U CPU @ 2.60GHz (306D4),ASM,AES-NI)
Scanning the drive for archives: 1 file, 1314127 bytes (1284 KiB)
Extracting archive: latest-img.7z -- Path = latest-img.7z Type = 7z Physical Size = 1314127 Headers Size = 130 Method = LZMA2:1536k Solid = - Blocks = 1
Everything is Ok
Size: 1474560 Compressed: 1314127 $ md5sum kolibri.img ac33f21d7c8ba576fa33558f9e98d899 kolibri.img ```
It works with QEMU:
qemu-system-i386 -enable-kvm -smp cpus=2 -m 512M -fda kolibri.img -nic none
But with QEMU/i440fx (increase image size to 2 MB) it works neither without nor with compression.
``` $ git log --oneline -1 b77cf2299c (HEAD -> master, origin/master) soc/intel/common/block/smbus: Add config to use ACPI $ more .config CONFIG_ANY_TOOLCHAIN=y CONFIG_NO_POST=y CONFIG_COREBOOT_ROMSIZE_KB_2048=y $ make olddefconfig $ make -j$(nproc) $ build/cbfstool build/coreboot.rom add -n img/kolibrios.lzma -f kolibri.img -t raw -c none ```
``` $ qemu-system-i386 -bios build/coreboot.rom -L /dev/shm -enable-kvm -smp cpus=2 -m 512M -serial stdio -nic none
coreboot-4.13-2450-gb77cf2299c Wed Mar 3 09:36:07 UTC 2021 bootblock starting (log level: 7)... […] SeaBIOS (version rel-1.14.0-0-g155821a) […] Select boot device:
1. DVD/CD [ata1-0: QEMU DVD-ROM ATAPI-4 DVD/CD] 2. Payload [kolibrios.img]
Searching bootorder for: HALT Space available for UMB: ca000-ed000, f5c00-f62a0 Returned 262144 bytes of ZoneHigh e820 map has 6 items: 0: 0000000000000000 - 000000000009fc00 = 1 RAM 1: 000000000009fc00 - 00000000000a0000 = 2 RESERVED 2: 00000000000f0000 - 0000000000100000 = 2 RESERVED 3: 0000000000100000 - 000000001ff7b000 = 1 RAM 4: 000000001ff7b000 - 0000000020000000 = 2 RESERVED 5: 00000000ff800000 - 0000000100000000 = 2 RESERVED enter handle_19: NULL Booting from CBFS... Run img/kolibrios.img No support for compression type 42494c4f enter handle_18: NULL Booting from DVD/CD... Device reports MEDIUM NOT PRESENT Boot failed: Could not read from CDROM (code 0003) […] ```
The full log is attached at ticket #296 [2].
Is this a SeaBIOS issue?
No support for compression type 42494c4f
Kind regards,
Paul
[1]: https://www.kolibrios.org/ [2]: https://ticket.coreboot.org/issues/296
Hi Paul, as for me I could successfully run KolibriOS in QEMU/i440fx 4MB with coreboot and SeaBIOS. Here's my sequence of actions:
git clone https://review.coreboot.org/coreboot/ cd ./coreboot/ make crossgcc-i386 run a csb_patcher script from https://review.coreboot.org/c/coreboot/+/33509 , mainly for the SeaBIOS multiple floppies patch and to auto-download the floppy collection make menuconfig , then choose QEMU/i440fx and 4 MB (0x00400000 CBFS size) make ./csb_patcher.sh flop add all the floppies that you'd like, then run a command qemu-system-x86_64 -L . -m 256 -vga vmware -net nic,model=rtl8139 -net user -soundhw ac97 -usb -usbdevice tablet -bios ./build/coreflop.rom -serial stdio
As you see I'm not using KVM - that's because I don't have this kernel module installed on a PC I'm at the moment. I believe your problem is related to the QEMU flags - please start with my set of flags which is more-or-less guaranteed to work, and slowly change one-by-one to your liking. For your testing purposes,
Here's my coreflop image - https://www.sendspace.com/file/j4idzp , sha256 sums 68bfb64a68e37df0e8939391ee70aef41c7cd03d8de624b2a6d836d7e1ac8d55 ./coreflop.tar.gz dec8577a76bf190c72f69a4b7fe4f8ef53d53af19ac6890485311da7dd6eb2d5 ./coreflop.rom coreboot revision - b77cf2299c516a7f5a9a4eccad2b21157278a283
You may also play with the other floppies inside if you'd like - it's fun!
Dear Mike,
Thank you for your answer.
Am 04.03.21 um 18:15 schrieb Mike Banon:
Hi Paul, as for me I could successfully run KolibriOS in QEMU/i440fx 4MB with coreboot and SeaBIOS. Here's my sequence of actions:
git clone https://review.coreboot.org/coreboot/ cd ./coreboot/ make crossgcc-i386 run a csb_patcher script from https://review.coreboot.org/c/coreboot/+/33509 , mainly for the SeaBIOS multiple floppies patch and to auto-download the floppy collection make menuconfig , then choose QEMU/i440fx and 4 MB (0x00400000 CBFS size) make ./csb_patcher.sh flop add all the floppies that you'd like, then run a command qemu-system-x86_64 -L . -m 256 -vga vmware -net nic,model=rtl8139 -net user -soundhw ac97 -usb -usbdevice tablet -bios ./build/coreflop.rom -serial stdio
As you see I'm not using KVM - that's because I don't have this kernel module installed on a PC I'm at the moment. I believe your problem is related to the QEMU flags - please start with my set of flags which is more-or-less guaranteed to work, and slowly change one-by-one to your liking. For your testing purposes,
Here's my coreflop image - https://www.sendspace.com/file/j4idzp , sha256 sums 68bfb64a68e37df0e8939391ee70aef41c7cd03d8de624b2a6d836d7e1ac8d55 ./coreflop.tar.gz dec8577a76bf190c72f69a4b7fe4f8ef53d53af19ac6890485311da7dd6eb2d5 ./coreflop.rom coreboot revision - b77cf2299c516a7f5a9a4eccad2b21157278a283
I can successfully run your image with my QEMU command line.
qemu-system-i386 -bios coreflop.rom -L /dev/shm -enable-kvm -smp cpus=2 -m 512M -serial stdio -nic none
After several hours of testing old versions, I read your script again and the SeaBIOS documentation, and then my error became clear.
As a floppy image the KolibriOS file has to be added with the prefix `floppyimg/` in CBFS instead of `img/`.
build/cbfstool build/coreboot.rom add -n floppyimg/kolibrios.lzma -f kolibri.img -t raw -c lzma
You may also play with the other floppies inside if you'd like - it's fun!
It indeed was fun, and it’s great to see what’s possible to accomplish with such small programs.
Kind regards,
Paul