December 5, 2016

Intel Galileo - Xinu on the Gen 2 - booting from an SD card

If you really intend to work with Xinu (which means fetching the sources, rebuilding it, and fiddling with it), you will almost certainly want to get set up for network booting (as described in another document).

If you just want to quickly be running Xinu on the Galileo, the process described here is the fast path. Fetch the following tar archive:

If you untar this on your host system, be sure and do that in an empty directory. But you may not want to do that at all, unless you are curious.

Find a microSD cad. I used a fresh new SanDisk 8G microSD card and put it into a USB card reader. It needs to have a FAT-32 format (which most do right out of the box). Plug the reader into your linux computer (if you aren't running linux, you will have to figure out how to play this game on windows) and do something like this:

mount
/dev/sdc1 on /run/media/tom/3134-6330 type vfat 
cd /run/media/tom/3034-6330
tar xvf /path/sdcard.tgz 
sync
eject /dev/sdc1
If you look at the contents of the card, you should see:
pwd
/run/media/tom/3134-6330
ls -l
drwxr-xr-x 3 tom tom  32768 Jan 20  2015 boot
-rw-r--r-- 1 tom tom 380928 Jan 20  2015 bootia32.efi
-rw-r--r-- 1 tom tom 142016 Nov 28 13:06 xinu.elf
Connect a console serial cable to your Galileo and run your favorite terminal program (I use picocom at 115200 baud). You should also connect a network cable (and have a DHCP server running somewhere). Without the network, the boot will take a very long time, perhaps forever, trying to do DHCP.

Insert the SD card in the Galileo, apply power, and after a while you should see something like this:

Xinu for galileo -- version #2  (tom)  Mon Nov 28 12:54:45 MST 2016

Ethernet Link is Up
MAC address is 98:4f:ee:05:85:71
 250093088 bytes of free memory.  Free list:
           [0x001581E0 to 0x0EFD8FFF]
           [0x0FDEF000 to 0x0FDEFFFF]
    102285 bytes of Xinu code.
           [0x00100000 to 0x00118F8C]
    132872 bytes of data.
           [0x0011BBA0 to 0x0013C2A7]

Obtained IP address  192.168.0.30   (0xc0a8001e)


------------------------------------------
   __    __   _____    _   _    _    _    
   \ \  / /  |__ __|  | \ | |  | |  | |   
    \ \/ /     | |    |  \| |  | |  | |   
    / /\ \    _| |_   | \   |  | |  | |   
   / /  \ \  |     |  | | \ |  \  --  /   
   --    --   -----    -   -     ----     
------------------------------------------


Welcome to Xinu!


xsh $ 

Feedback? Questions? Drop me a line!

Tom's Computer Info / [email protected]