1. Create a combined project: kernel, kernel modules and rootfs
2. Configure the kernel and roots (see docu). AFAIK gpio.ko can only built as a loadable module.
3. Build the project
4. Add script in BUILD_ROOT/etc/init.rc to load gpio.ko at initialization time and create needed device files in BUILD_ROOT/dev/gpio/x where x = gpio_num (0..3, 5..7, 9, 12, 13)
5. Install the project -- you have now images of kernel and rootfs (and a nfs mount for testing)