Open pgawlowicz opened 1 year ago
Hi
Thanks for your interest in this project!
It's been a while since I ran this project. As far as I remember I used tftpboot
command in the u-boot shell to boot it up.
I used Linux Debian 11 to run this project so I installed this package u-boot-qemu to have this file /usr/lib/u-boot/qemu_arm/u-boot.bin
in my system as well as an FTP server and configured it to point to the directory with images with anonymous access ( the root dir).
Then I ran qemu like this
qemu-system-arm -M virt -m 2g -cpu cortex-a15 -bios /usr/lib/u-boot/qemu_arm/u-boot.bin -monitor telnet:127.0.0.1:6299,server,nowait -serial mon:stdio
and inside the u-boot shell
setenv serverip 192.168.0.5 && tftpboot 0x40400000 arm_qnx.ifs && go 0x40400000
where 192.168.0.5
is the address of your network adapter and I use ifs
image so the whole filesystem is in the memory at the beginning of the boot process.
If I understand correctly, the error you get is related to the support of the MMC memory which I'm not sure about.
Let me know if you have succeeded with these instructions so I'll add them to the Readme file.
Hi, Thank you for your quick response! I followed your instructions and it works! Thanks! See the output below:
Bytes transferred = 208822316 (c72602c hex)
## Starting application at 0x40400000 ...
VFPv3: fpsid=410430f0
coproc_attach(10): attach fe079bb8 (fe07a4e0)
coproc_attach(11): attach fe079bb8 (fe07a4e0)
**********************************
Welcome to QNX Neutrino 6.6.0
**********************************
Starting Serial Port driver...
Starting PCI Server...
Starting Ethernet driver...
Unable to init devn-rtl.so: Unknown error
sh: No controlling tty (open /dev/tty: No such device or address)
sh: warning: won't have full job control
root# ls
bin dev etc lib proc tmp usr
One more question, do you think it would be possible to share files between the qnx and host? I managed to compile the IFS with required files, but this solution is not very quick.
It seems that the Ethernet driver do not start, so copying over network is not possible. Maybe some shared directory? but i read that QNX does not support it neither.
Best, Piotr
Hi,
I worked a bit on adapting the RTL ethernet driver from QNX to work with the RTL device in QEMU but I was stuck because of the PCI server. PCI server sources are not open and it looks like it's a proprietary paid feature.
At this time it needs some further investigation to make the ethernet device work. The problem here is that during the boot process, the QNX loader must fill all the necessary PCI information into a specific memory region so the PCI server can use it later and it's not clear how to do it (what data the PCI server expects).
Probably with QEMU you could create some virtual volume so QNX could mount it and the host could access it at the same time but it also requires the investigation of what virtual storage devices QNX supports and if there is any match with QEMU devices.
Best Regards, Ruslan
Hi Ruslan,
Thank you for your reply. I have played a bit trying to share a virtual storage device between QNX running in QEMU and host. However, without any success. Probably, I do not have enough experience with QNX...
Specifically, I create a virtual volume and pass it to QEMU with the following command:
qemu-system-arm -M virt -m 2g -cpu cortex-a15 -bios /usr/lib/u-boot/qemu_arm/u-boot.bin -monitor telnet:127.0.0.1:6299,server,nowait -serial mon:stdio -nographic -drive if=none,id=usbstick,format=raw,file=./armdisk.img -usb -device usb-ehci,id=ehci -device usb-storage,bus=ehci.0,drive=usbstick
Then in uboot, I get the following output on execution of the usb info
and usb storage
commands:
=> usb info
1: Hub, USB Revision 2.0
- u-boot EHCI Host Controller
- Class: Hub
- PacketSize: 64 Configurations: 1
- Vendor: 0x0000 Product 0x0000 Version 1.0
Configuration: 1
- Interfaces: 1 Self Powered 0mA
Interface: 0
- Alternate Setting 0, Endpoints: 1
- Class Hub
- Endpoint 1 In Interrupt MaxPacket 8 Interval 255ms
2: Mass Storage, USB Revision 2.0
- QEMU QEMU USB HARDDRIVE 1-0000:00:02.0-1
- Class: (from Interface) Mass Storage
- PacketSize: 64 Configurations: 1
- Vendor: 0x46f4 Product 0x0001 Version 0.0
Configuration: 1
- Interfaces: 1 Self Powered 0mA
- String: "High speed config (usb 2.0)"
Interface: 0
- Alternate Setting 0, Endpoints: 2
- Class Mass Storage, Transp. SCSI, Bulk only
- Endpoint 1 In Bulk MaxPacket 512
- Endpoint 2 Out Bulk MaxPacket 512
=> usb storage
Device 0: Vendor: QEMU Rev: 2.5+ Prod: QEMU HARDDISK
Type: Hard Disk
Capacity: 1024.0 MB = 1.0 GB (2097152 x 512)
So I guess, so fat the virtual USB stick is emulated correctly.
Then I boot QNX and execute the following commands to start its USB controller:
io-usb -vvvv -dehci
waitfor /dev/io-usb/io-usb
sleep 1
The usb -v
command gives the following output:
USB 0 (EHCI) v1.10, v1.01 DDK, v1.01 HCD
Control, Interrupt, Bulk(SG), Isoch(Stream), High speed
Finally, I start storage driver devb-umass
but it does not work correctly:
root# devb-umass &
[1] 28683
root# xpt_configure: No umass interfaces found
[1] + Done devb-umass
Do you maybe have more experience with QNX and could point me towards the correct direction?
Best Regards, Piotr
Hi Piotr,
I didn't play with storage devices on QNX much. I see your device has Isoch(Stream)
protocol and HCD
type but according to this doc it's not supported. You could try to find some QEMU devices whose types are supported by devb-umass
driver.
Best Regards, Ruslan
Hi,
First of all, thank you for this project. This is something that I need for testing qnx and I almost got it running but there are some issues and I hope you could help me.
Specifically, I managed to compile the project with qnx660 (it required to change the bootstrup in the build file). Then I tried to start the generate images following the approach described here : https://github.com/xabrs/bsp-qemu-arm i.e. i copied the
u-boot.bin
file and use the following commands:Then inside qemu:
Unfortunately, I get the following output:
Note that I added a print just before the main() function (in main.c) returns, so it seems that it is executed (correctly?) till the end.
Also I have changed
procnto
toprocnto-smp
but get a similar output:Did you maybe encounter similar issues? Best, Piotr