I believe what you are asking can’t be done. The GPIOs of the galileo board are already set to pins internally. Take a look at EmutexLabs table 4.3, there you’ll find the pin configuration for the Gen 2 board. How many GPIOs do you need for your project?
In my understanding it is possible to create a shield with I2C-to-pin expanders with a quantity you need (for example, for 800 pins).
For example, see a link http://www.ti.com/lit/ds/symlink/pcf8574.pdf or http://www.nxp.com/documents/data_sheet/PCA9564.pdf
Same idea has already implemented on your Intel Galileo board
If you will use several solenoids, 4x ultrasonic distance measurements, servos, 3x temp probes with I2C/SPI control buses, you just need to connect them to Galileo board with wires (and may be add a few additional pins).
That’s interesting! Yes, you can try using xbolshe’s approach. A said in the previous post you will need to connect additional wires to your board but it can be done if using I2C as described in the datasheets. Give it a try and let us know your results.
if you want to expand the number of GPIO on the Galileo, an important criteria is the speed you expect to achieve. The PCF8574 are an excellent solution, but they are rather limited in terms of speed because they work only on 100kHz I2C. Do not forget that every exchange on I2C on Galileo passes by a kernel driver, and it takes time to switch from your code to the driver and back (around 200us). A single read/write with the PCF8574 takes 190 microseconds, so the highest speed you can expect is 2500 read/write cycles per second for one byte. Note however that this is the "best case", the real speed is lower than that.
The good thing with the PCF8574 is that you can have up to 8 of them on the same I2C, thus 64 I/O channels. Back to previous parameters, the maximum refresh speed you can achieve in this configuration is around 300 I/O cycles per second.
If you need very high speed, then look for SPI coupled expanders, like the one made by BEB (available from their website : http://imodular-synth.com). This board is a little less flexible than the PCF8574 based solution (selection between inputs and outputs is done statically and can not be changed from your code), but the speed is much, much higher since the board supports up to 16MHz SPI clock (160 times faster than I2C). These boards are used for time critical MIDI and RTP-MIDI applications (like keyboard scanning).
Based on your project description, I think that the PCF8574 are however the best solution, I do not see real requirements for high speed.