I've got pretty solid Linux experience, but little in the embedded/small system area, and this one has me baffled.
I've agreed to help a friend work on a project using a tiny little x86-compatible SBC. It's supposed to be a data logger and display for a monitoring application, using a bunch of sensors and USB ADCs. It needs an extremely quick boot, so we're playing around with various boot optimizations, disabling services, etc.
The end result he needs is a machine that can boot very quickly into runlevel 2 (no networking, console only, skips all services but what's required for the data logging and display), or boot into runlevel 3 with SSH, etc. and network services including DHCP, to allow remote access and a script to copy the logged data via SCP to another host.
Unfortunately, since this will end up being an embedded system, I need to come up with some way of using an analog hardware input - a switch or button or something - that tells the bootloader/kernel to either boot to runlevel 2 or 3.
Has anyone ever heard of this? Aside from patching either GRUB or the kernel itself to poll some sort of IO (I guess serial, parallel, or some sort of GPIO), any suggestions/ideas?
Thanks, Jason