Regarding GPIO, many of the optional things you can do at runtime in “/sys” have some relation to the device tree. This in turn is loaded via the “.dtb” device tree file named in “/boot/extlinux/extlinux.conf”. You can look at some example GPIO setup there by reverse compiling to source form (".dts"). This could of course be an edit in kernel source and then go through the steps of generating from a kernel build, but it’s simpler to just reverse compile to find what you want. You can edit the “.dts” source version, then recompile back to “.dtb” binary version.
dtc -I dtb -O dts -o /tmp/extracted.dts /boot/the_firmware_in_extlinux.dtb
# ...browse and edit extracted.dts...
dtc -I dts -O dtb -o /tmp/modified.dtb /tmp/extracted.dts
Be sure to not lose your original dtb in any testing, you may want it back.
Serial console is set to ttyS0, so console output goes there. This was intended for system debug info. You could remove that function (but lose any ability to rescue via serial console). However, U-Boot itself sends some output there too, before Linux ever loads. Disabling console in Linux is easy, disable in U-Boot is a modification and recompile. If you wish to remove serial console in Linux just remove the options in the kernel command line of extlinux.conf: