I have a question regarding the GPIO status during the boot process. As a bit of background, I'm currently building an automated sprinkler setup using a raspberry pi and an 8-relay board. The board wiring is pretty simple, you supply and input with ground, and the relay activates and is indicated with an LED. Pretty straightforward to wire up. However, I noticed the GPIO pins are not exactly 0 when booting the device, they are not 1 either, because I can see the relay LED's blink faintly while booting the pi. Once the device has booted, it works as expected and when a pin is pulled to ground the LED lights up brightly and the relay clicks. I'm not sure what is going on here, I have tested with another pi, but the result is the same. The relay board is powered externally, all the pi has to do is give pulse to the board. Anybody any ideas? Is there some settings I can adjust in order to keep pins where they are while booting? I realise this is not a huge problem because the boot time is not too long, but still.
The Pi (in common with most computers) starts with all pins as input.
The SoC sets pins 0-7 with pullup all others with pull down. (GPIO 2,3 have physical pullup resistors.) This is well documented.
If you want to override this you can use physical pull resistors which will override the weak default 50k pull.
You can set the state of pins in config.sys although there is a small delay before this applies.