aboutsummaryrefslogtreecommitdiff
path: root/util/autoport/main.go
diff options
context:
space:
mode:
authorAngel Pons <th3fanbus@gmail.com>2020-01-08 15:05:56 +0100
committerNico Huber <nico.h@gmx.de>2020-01-08 14:25:23 +0000
commit6779d2352cd33f98ad03e800c0de472fd3d3dfcc (patch)
tree7e790f02058cb158af44be8827b8b63470f2010d /util/autoport/main.go
parent38a4f2a9740c0a61b1c89525950bc8bd4febb22c (diff)
util/autoport: correct build errors of produced files
Change-Id: I8d1a6af6f1d70268f17692bee130c08502082c97 Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/37730 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'util/autoport/main.go')
-rw-r--r--util/autoport/main.go18
1 files changed, 12 insertions, 6 deletions
diff --git a/util/autoport/main.go b/util/autoport/main.go
index 03523a2c39..dbd8913723 100644
--- a/util/autoport/main.go
+++ b/util/autoport/main.go
@@ -77,6 +77,7 @@ type SouthBridger interface {
}
var SouthBridge SouthBridger
+var BootBlockFiles map[string]string = map[string]string{}
var ROMStageFiles map[string]string = map[string]string{}
var RAMStageFiles map[string]string = map[string]string{}
var SMMFiles map[string]string = map[string]string{}
@@ -154,6 +155,10 @@ func sanitize(inp string) string {
return result
}
+func AddBootBlockFile(Name string, Condition string) {
+ BootBlockFiles[Name] = Condition
+}
+
func AddROMStageFile(Name string, Condition string) {
ROMStageFiles[Name] = Condition
}
@@ -190,8 +195,7 @@ func writeMF(mf *os.File, files map[string]string, category string) {
if condition == "" {
fmt.Fprintf(mf, "%s-y += %s\n", category, file)
} else {
- fmt.Fprintf(mf, "%s-$(%s) += %s\n", category,
- condition, file)
+ fmt.Fprintf(mf, "%s-$(%s) += %s\n", category, condition, file)
}
}
}
@@ -757,9 +761,10 @@ func main() {
AddRAMStageFile("gma-mainboard.ads", "CONFIG_MAINBOARD_USE_LIBGFXINIT")
}
- if len(ROMStageFiles) > 0 || len(RAMStageFiles) > 0 || len(SMMFiles) > 0 {
+ if len(BootBlockFiles) > 0 || len(ROMStageFiles) > 0 || len(RAMStageFiles) > 0 || len(SMMFiles) > 0 {
mf := Create(ctx, "Makefile.inc")
defer mf.Close()
+ writeMF(mf, BootBlockFiles, "bootblock")
writeMF(mf, ROMStageFiles, "romstage")
writeMF(mf, RAMStageFiles, "ramstage")
writeMF(mf, SMMFiles, "smm")
@@ -854,17 +859,18 @@ func main() {
dsdt.WriteString(
`
+
#include <arch/acpi.h>
+
DefinitionBlock(
"dsdt.aml",
"DSDT",
- 0x02, // DSDT revision: ACPI 2.0 and up
+ 0x02, /* DSDT revision: ACPI 2.0 and up */
OEM_ID,
ACPI_TABLE_CREATOR,
- 0x20141018 // OEM revision
+ 0x20141018 /* OEM revision */
)
{
- /* Some generic macros */
#include "acpi/platform.asl"
`)