Thanks for the quick response. Here is more detail.
I am running on an Ubuntu 18.04 system.
I did the following for build:
cd heads
make BOARD=qemu-linuxboot
I get the linuxboot.rom in build/qemu-linuxboot
Then I downloaded a cirros-0.4.0-x86_64-disk.img file from the web.
If I just do qemu:
qemu-system-x86_64 -hda cirros-0.4.0-x86_64-disk.img --serial /dev/tty
I get the linux boot up text messages coming up both in the qemu client terminal window as well as the launch terminal and the OS boots.
But when I use linuxboot.rom with qemu command line:
sudo qemu-system-x86_64 -machine q35,smm=on -global ICH9-LPC.disable_s3=1 -global driver=cfi.pflash01,property=secure,value=on -drive if=pflash,format=raw,unit=0,file=./linuxboot.rom --serial /dev/tty -device virtio-blk-pci,drive=hdd -drive id=hdd,if=none,file=cirros-0.4.0-x86_64-disk.img,format=qcow2,boot=on,cache=writeback
I choose default boot at the boot menu.
This says
mount: mounting /dev/sda1 on /boot failed: No such file or directory
!!!!! Unable to mount /boot
!!!!! Starting recovery shell
lspci shows up a new device with
00:03.0 Class 0100: Device 1af4:1001
lsmod or the contents of /lib/modules has no *scsi* files in it. It looks like there is no driver attaching to this pci device?
If I attach the img file as a USB as per the qemu command line below:
sudo qemu-system-x86_64 -machine q35,smm=on -global ICH9-LPC.disable_s3=1 -global driver=cfi.pflash01,property=secure,value=on -drive if=pflash,format=raw,unit=0,file=./linuxboot.rom --serial /dev/tty -usb -drive id=usbflash,format=qcow2,unit=1,file=cirros-0.4.0-x86_64-disk.img,if=none,boot=on,cache=writeback -device usb-storage,drive=usbflash
Then I choose "USB boot" at the boot menu and I get
[ 17.551752] sda: sda1 sda15
[ 17.580926] sd 0:0:0:0: [sda] Attached SCSI disk
+++ Select your USB disk:
1. /dev/sda1
2. /dev/sda15
Choose your USB disk [1-2, a to abort]: 1
[ 34.328841] EXT4-fs (sda1): mounting ext3 file system using the ext4 subsystem
[ 34.414034] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
!!! Could not find any ISO, trying bootable USB
+++ Scanning for unsigned boot options
Failed to parse any boot options
!!!!! Something failed during USB boot
!!!!! Starting recovery shell
lspci shows the following new devices
00:1d.0 Class 0c03: Device 8086:2934 (rev 03)
00:1d.1 Class 0c03: Device 8086:2935 (rev 03)
00:1d.2 Class 0c03: Device 8086:2936 (rev 03)
00:1d.7 Class 0c03: Device 8086:293a (rev 03)
Note the serial tty, in this case the terminal used to launch qemu, shows us "Choose disk..." but the qemu display window is blank. This is a little better than trying to attach the image file as a hdd, but still has problems booting through to the OS.
Thanks,
Madhan.