real-xinu / xinu-galileo

Other
17 stars 6 forks source link

Fails to boot on Galileo Gen 2 #8

Open codernavi18 opened 4 years ago

codernavi18 commented 4 years ago

By default Galileo's default GRUB gets loaded from SPI flash (firmware). Hence, I need to go to EFI shell and then hit "fs0:" to manually select the bootia32.efi of Xinu. However, this is not the issue. The real problem follows ahead :

============= SDCard

  1. I put the contents on SDCard as mentioned here : https://xinu.cs.purdue.edu/files/xinu-galileo-sdcard.tar.gz
  2. I cloned this repo, did make and copied the xinu.elf on SDCard.
  3. Now go to EFI shell, hit "fs0:", then bootia32.efi.

Xinu does not load, but I land in GRUB shell, before the following messages are thrown :

error: "prefix: is not set".
error: couldn't open file.

============ USB Pen drive

  1. I copied the same contents as in SDCard.
  2. Now go to EFI shell, hit "fs0:", then bootia32.efi.

GRUB throws the following message :

 error: "prefix" is not set.
WARNING: no console will be available to OSerror: no suitable mode found

Xinu proceeds little ahead, but then gets stuck as shown in the following picture : xinu

jalembke commented 4 years ago

There is a grub built into the galileo board, but it is an older version (grub legacy) that does not support the multiboot protocol which Xinu requires. The grub.conf file provided in the tar.gz should chainload the bootia32.efi image which is actually an image of grub2 which supports multiboot. This version of grub can then load Xinu.

From the screenshots your sent, it looks like this is happening just fine. The error messages: error: "prefix" is not set. WARNING: no console will be available to OSerror: no suitable mode found are not anything to be concerned about. The fact that you got Xinu to load (and print a memory map) indicates a success.

What is the contents of your main routine in your Xinu image? After Xinu runs initializes the system it creates a process to run the "main" function. Can you verify that your main function does work?

Kikou1998 commented 3 years ago

Similar issue here on Galileo gen2, Did the exact same boot from sdcard set up as described in Xinu on Intel Galileo User Manual https://xinu.cs.purdue.edu/files/Xinu_Galileo_Manual_v2.pdf my sd card content is: drwxr-xr-x 3 xuqihang xuqihang 16384 Jan 21 2015 boot -rw-r--r-- 1 xuqihang xuqihang 380928 Jan 21 2015 bootia32.efi -rw-r--r-- 1 xuqihang xuqihang 159928 Jun 6 15:10 xinu.elf

After rebooting the board for countless times, the message is always:

file path: /File(\bootia32.efi)/EndEntire Welcome to GRUB!

error: "prefix" is not set.

WARNING: no console will be available to OSerror: no suitable mode found.

and unlike @codernavi18 's issue, mine galileo gen 2 won't even display any Xinu related info.

I've tried connecting to the board in both mac OS and ubuntu 20.04 in vmware fusion in my OS X , the results are the same. The boot files and xinu files are also unzipped or compiled per the instruction from the manual. (p.s. The board is not connected to Internet, no ethernet cable plugged in)

doolinius commented 2 years ago

I'm having the same issue. Exact same output as Kikou1998, and no Xinu output at all. I've updated the firmware to 1.1.1. I've tried picocom, screen, cu, and minicom, from Linux, FreeBSD and macOS.

I have also connected it to the network, thinking that perhaps it was taking forever to boot because it couldn't pull DHCP.

I have reformatted the SD card, just in case, but to no avail. I have a couple of new SD cards on the way, and I hope maybe like old Raspberry Pis, a different SD card will work. but somehow I doubt it.

doolinius commented 2 years ago

[UPDATE]

Using a different SD card worked. I got new SanDisk microSDHC 8GB cards, copied the same files to one of them, and Xinu begins to boot. However, to complete the boot process, it should be connected to a network, or it seems it will keep trying to pull DHCP. I waited 15 minutes before restarting with it connected to a network. It then booted just fine.