Haskell: build setup for arm-hyp (arm-tk1 = ARM_HYP + TK1)
This commit is contained in:
parent
0a31fa7fe4
commit
49bf6be16a
|
@ -12,6 +12,7 @@
|
|||
BOOT_MODULES = Kernel/CSpace Kernel/Thread Kernel/FaultHandler \
|
||||
Kernel/VSpace Kernel/Init Model/PSpace Object/TCB Object/CNode \
|
||||
Object/ObjectType Object/Endpoint Object/Interrupt
|
||||
# FIXME ^ VCPUs go above?
|
||||
|
||||
BOOT_FILES=$(BOOT_MODULES:%=src/SEL4/%.lhs-boot)
|
||||
|
||||
|
@ -22,12 +23,24 @@ BOOT_FILES=$(BOOT_MODULES:%=src/SEL4/%.lhs-boot)
|
|||
# GHC_PACKAGE_PATH first.
|
||||
CABAL=stack exec -- ./stack-path cabal
|
||||
|
||||
all: build pdf
|
||||
#all: build pdf FIXME original
|
||||
all: build-arm-hyp
|
||||
|
||||
build: .stack-work $(BOOT_FILES)
|
||||
$(CABAL) sandbox init
|
||||
$(CABAL) install --dependencies-only
|
||||
$(CABAL) configure --configure-option="arm-kzm"
|
||||
$(CABAL) configure --configure-option="arm-kzm" \
|
||||
--flags="ArchArm"
|
||||
$(CABAL) build
|
||||
|
||||
# FIXME XXX these warnings are useless during large Haskell updates
|
||||
GHC_FIXME_OPTS=--ghc-options="-fno-warn-unused-matches -fno-warn-unused-imports"
|
||||
|
||||
build-arm-hyp: .stack_work $(BOOT_FILES)
|
||||
$(CABAL) sandbox init
|
||||
$(CABAL) install --dependencies-only
|
||||
$(CABAL) configure --configure-option="arm-tk1" \
|
||||
--flags="ArchArmHyp -FFI" $(GHC_FIXME_OPTS)
|
||||
$(CABAL) build
|
||||
|
||||
pdf:
|
||||
|
|
|
@ -22,8 +22,12 @@ Flag FFI
|
|||
default: True
|
||||
|
||||
Flag ArchArm
|
||||
description: Include ARM modules and platforms (else x64)
|
||||
default: True
|
||||
description: Include ARM modules and platforms
|
||||
default: False
|
||||
|
||||
Flag ArchArmHyp
|
||||
description: Include ARM (with Hypervisor Extensions) modules and platforms
|
||||
default: False
|
||||
|
||||
Library
|
||||
exposed-modules: SEL4
|
||||
|
@ -110,27 +114,27 @@ Library
|
|||
SEL4.Machine.RegisterSet.ARM
|
||||
SEL4.Machine.Hardware.ARM
|
||||
|
||||
else
|
||||
-- FIXME: should be a flag also, or some other way to conditionally compile
|
||||
-- Setup.hs hooks can handle this, but do we want to do that?
|
||||
-- FIXME ideally ARMHYP will share code with the main ARM development,
|
||||
-- but when doing an architecture port we want to make sure we are doing a
|
||||
-- full pass over the Haskell kernel, touching all files
|
||||
-- TODO consolidate later
|
||||
if flag(ArchArmHyp)
|
||||
other-modules:
|
||||
SEL4.Machine.Hardware.ARM.TK1
|
||||
|
||||
SEL4.API.Types.X64
|
||||
SEL4.API.InvocationLabels.X64
|
||||
SEL4.API.Invocation.X64
|
||||
SEL4.Kernel.VSpace.X64
|
||||
SEL4.Kernel.Thread.X64
|
||||
SEL4.Object.ObjectType.X64
|
||||
SEL4.Object.Structures.X64
|
||||
SEL4.Object.Interrupt.X64
|
||||
SEL4.Object.Instances.X64
|
||||
SEL4.Object.IOPort.X64
|
||||
SEL4.Object.TCB.X64
|
||||
SEL4.Model.StateData.X64
|
||||
SEL4.Machine.RegisterSet.X64
|
||||
SEL4.Machine.Hardware.X64
|
||||
|
||||
SEL4.Machine.Hardware.X64.PC99
|
||||
SEL4.API.Types.ARM_HYP
|
||||
SEL4.API.InvocationLabels.ARM_HYP
|
||||
SEL4.API.Invocation.ARM_HYP
|
||||
SEL4.Kernel.VSpace.ARM_HYP
|
||||
SEL4.Kernel.Thread.ARM_HYP
|
||||
SEL4.Object.ObjectType.ARM_HYP
|
||||
SEL4.Object.Structures.ARM_HYP
|
||||
SEL4.Object.Interrupt.ARM_HYP
|
||||
SEL4.Object.Instances.ARM_HYP
|
||||
SEL4.Object.TCB.ARM_HYP
|
||||
SEL4.Model.StateData.ARM_HYP
|
||||
SEL4.Machine.RegisterSet.ARM_HYP
|
||||
SEL4.Machine.Hardware.ARM_HYP
|
||||
|
||||
hs-source-dirs: src
|
||||
ghc-prof-options: -auto-all -prof -fprof-auto
|
||||
|
|
|
@ -39,6 +39,7 @@ targets =
|
|||
, ("arm-kzm", ("ARM", "KZM"))
|
||||
, ("arm-sabre", ("ARM", "Sabre"))
|
||||
, ("x64-pc99", ("X64", "PC99"))
|
||||
, ("arm-tk1", ("ARM_HYP", "TK1"))
|
||||
]
|
||||
|
||||
getPlatform targetName = do
|
||||
|
|
Loading…
Reference in New Issue