How can I get the source of Arudino IDE for galileo?

Hi guys.

I wana ask how can I get the source of Arudino IDE for galileo board?

And What should I do to build the Arduino IDE source for x86-linux or arm-linux?

Any help will be appreciated.

Thanks a lot