Add simple hook support as a start.
Created by: Magicloud
Hooking helps customizing stage 1 behavior without hack vanilla image. Decoupling things from source level means less trouble handling upstream (Alpinelinux) upgrading.
Three hooks are added.
- After parsing kernel parameters. So hooks can have them all, and unset some to control following process.
- Before switch_root when root is specified.
- Before switch_root when root is not specified.