summaryrefslogtreecommitdiff
path: root/src/Propellor/Types/Bootloader.hs
diff options
context:
space:
mode:
authorJoey Hess2017-11-16 17:54:47 -0400
committerJoey Hess2017-11-16 17:54:47 -0400
commitcff178de9c0d229574ab884fcca08a41f434e119 (patch)
tree6208a18ba662ea907eb51db6196ff54c0577b543 /src/Propellor/Types/Bootloader.hs
parent19feb8451b75ae669b45add9e9d9851a542fd981 (diff)
Uboot: New module.
Installing u-boot to the boot sector is not needed by some boards (my CubieTruck boots without it), but may be by others. Tricky part was making u-boot be written to a disk image when building one. This commit was sponsored by Jake Vosloo on Patreon.
Diffstat (limited to 'src/Propellor/Types/Bootloader.hs')
-rw-r--r--src/Propellor/Types/Bootloader.hs9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/Propellor/Types/Bootloader.hs b/src/Propellor/Types/Bootloader.hs
index 9822d520..fd929d7e 100644
--- a/src/Propellor/Types/Bootloader.hs
+++ b/src/Propellor/Types/Bootloader.hs
@@ -2,13 +2,20 @@
module Propellor.Types.Bootloader where
+import Propellor.Types
import Propellor.Types.Info
-- | Boot loader installed on a host.
data BootloaderInstalled
= GrubInstalled
| FlashKernelInstalled
- deriving (Typeable, Show)
+ | UbootInstalled (FilePath -> FilePath -> Property Linux)
+ deriving (Typeable)
+
+instance Show BootloaderInstalled where
+ show GrubInstalled = "GrubInstalled"
+ show FlashKernelInstalled = "FlashKernelInstalled"
+ show (UbootInstalled _) = "UbootInstalled"
instance IsInfo [BootloaderInstalled] where
propagateInfo _ = PropagateInfo False