From 6779d2352cd33f98ad03e800c0de472fd3d3dfcc Mon Sep 17 00:00:00 2001 From: Angel Pons Date: Wed, 8 Jan 2020 15:05:56 +0100 Subject: util/autoport: correct build errors of produced files Change-Id: I8d1a6af6f1d70268f17692bee130c08502082c97 Signed-off-by: Angel Pons Reviewed-on: https://review.coreboot.org/c/coreboot/+/37730 Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber --- util/autoport/main.go | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'util/autoport/main.go') 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 + 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" `) -- cgit v1.2.3