kboot: Create routines to read Linux tiny files
Most of the files in /sys/ and /proc/ are small with one value. Create
two routines to help us read the file and decode that value.
Sponsored by: Netflix
(cherry picked from commit 7e1a2e46aa9a2f834c33b5c50de0437ac19d7b41)