summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog4
-rw-r--r--propellor.cabal1
-rw-r--r--src/Propellor/Property/Machine.hs37
3 files changed, 41 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog
index 97beb619..d6be2ca7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -10,8 +10,10 @@ propellor (4.9.1) UNRELEASED; urgency=medium
* Debootstrap.built now supports bootstrapping chroots for foreign
OS's, using qemu-user-static.
* Qemu: New module.
- * FlashKernel: New module, can be used to create disk images for arm
+ * FlashKernel: New module, can be used to create disk images for ARM
boards using flash-kernel.
+ * Machine: New module, machine-specific properties for ARM boards are
+ being collected here.
-- Joey Hess <id@joeyh.name> Thu, 02 Nov 2017 10:28:44 -0400
diff --git a/propellor.cabal b/propellor.cabal
index b08c81c9..51640658 100644
--- a/propellor.cabal
+++ b/propellor.cabal
@@ -129,6 +129,7 @@ Library
Propellor.Property.Locale
Propellor.Property.Logcheck
Propellor.Property.Lvm
+ Propellor.Property.Machine
Propellor.Property.Mount
Propellor.Property.Network
Propellor.Property.Nginx
diff --git a/src/Propellor/Property/Machine.hs b/src/Propellor/Property/Machine.hs
new file mode 100644
index 00000000..61a77492
--- /dev/null
+++ b/src/Propellor/Property/Machine.hs
@@ -0,0 +1,37 @@
+-- | Machine-specific properties.
+--
+-- Many embedded computers have their own special configuration needed
+-- to use them. Rather than needing to hunt down documentation about the
+-- kernel, bootloader, etc needed by a given board, if there's a property
+-- in here for your board, you can simply use it.
+
+module Propellor.Property.Machine (
+ -- * ARM boards
+ Olimex_A10_OLinuXino_LIME,
+ Cubietech Cubietruck
+)
+
+-- | Olimex A10-OLinuXino-LIME
+Olimex_A10_OLinuXino_LIME :: Property (HasInfo + DebianLike)
+Olimex_A10_OLinuXino_LIME = FlashKernel.installed "Olimex A10-OLinuXino-LIME"
+ `requires` sunixi
+ `requires` armmp
+
+-- | Cubietech Cubietruck
+Cubietech_Cubietruck :: Property (HasInfo + DebianLike)
+Cubietech_Cubietruck = FlashKernel.installed "Cubietech Cubietruck"
+ `requires` sunixi
+ `requires` lpae
+
+sunixi :: Property DebianLike
+sunixi = Apt.installed
+ [ "firmware-linux-free"
+ , "u-boot"
+ , "sunxi-tools"
+ ]
+
+armmp :: Property DebianLike
+armmp = Apt.installed ["linux-image-armmp"]
+
+lpae :: Property DebianLike
+lpae = Apt.installed ["linux-image-armmp-lpae"]