In order to save an Arduino sketch and make it running once the board is powered on, you have to use the SD Image. This means, you have to boot the Galileo from the SD card. I recommend you to check the following guide about how to flash the Yocto Image in the SD card: Intel® Galileo Boards and Kits — SD Card Setup and Sketch Persistent
DiegoV thank you for you help. I appreciate it much.