summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/Machine.hs
blob: b6785bdbbaa3bfc047ce3d93bc91a128f6b744c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
-- | 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 machine, if there's a property
-- in here for your machine, you can simply use it.
--
-- Sometime non-free firmware is needed to use a board. If the board won't
-- be functional at all without it, its property will include the non-free
-- firmware, but if the non-free firmware is only needed for non-critical
-- functionality, it won't be included.

module Propellor.Property.Machine (
	-- * ARM boards
	cubietech_Cubietruck,
	olimex_A10_OLinuXino_LIME
) where

import Propellor.Base
import qualified Propellor.Property.Apt as Apt
import qualified Propellor.Property.FlashKernel as FlashKernel
import qualified Propellor.Property.Uboot as Uboot

-- | Cubietech Cubietruck
-- 
-- Wifi needs non-free firmware-brcm80211, whicn is not installed by
-- this property. Also, see https://bugs.debian.org/844056
cubietech_Cubietruck :: Property (HasInfo + DebianLike)
cubietech_Cubietruck = FlashKernel.installed "Cubietech Cubietruck"
	`requires` sunixi "Cubietruck"
	`requires` lpae

-- | Olimex A10-OLinuXino-LIME
olimex_A10_OLinuXino_LIME :: Property (HasInfo + DebianLike)
olimex_A10_OLinuXino_LIME = FlashKernel.installed "Olimex A10-OLinuXino-LIME"
	`requires` sunixi "A10-OLinuXino-Lime"
	`requires` armmp

sunixi :: Uboot.BoardName -> Property (HasInfo + DebianLike)
sunixi boardname = Uboot.sunxi boardname
	`requires` Apt.installed
		[ "firmware-linux-free"
		, "sunxi-tools"
		]

armmp :: Property DebianLike
armmp = Apt.installed ["linux-image-armmp"]

lpae :: Property DebianLike
lpae = Apt.installed ["linux-image-armmp-lpae"]