util/autoport: Always output quoted Kconfig string
Change-Id: I2076af9c70b626673a83af9abf464d376cda711b Signed-off-by: Iru Cai <mytbk920423@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/45463 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
parent
5a401ae262
commit
8c6d1610d1
|
@ -104,7 +104,6 @@ var IOAPICIRQs map[PCIAddr]IOAPICIRQ = map[PCIAddr]IOAPICIRQ{}
|
||||||
var KconfigBool map[string]bool = map[string]bool{}
|
var KconfigBool map[string]bool = map[string]bool{}
|
||||||
var KconfigComment map[string]string = map[string]string{}
|
var KconfigComment map[string]string = map[string]string{}
|
||||||
var KconfigString map[string]string = map[string]string{}
|
var KconfigString map[string]string = map[string]string{}
|
||||||
var KconfigStringUnquoted map[string]string = map[string]string{}
|
|
||||||
var KconfigHex map[string]uint32 = map[string]uint32{}
|
var KconfigHex map[string]uint32 = map[string]uint32{}
|
||||||
var KconfigInt map[string]int = map[string]int{}
|
var KconfigInt map[string]int = map[string]int{}
|
||||||
var ROMSizeKB = 0
|
var ROMSizeKB = 0
|
||||||
|
@ -570,21 +569,6 @@ config %s%s
|
||||||
`, name, makeComment(name))
|
`, name, makeComment(name))
|
||||||
}
|
}
|
||||||
|
|
||||||
keys = nil
|
|
||||||
for name, _ := range KconfigStringUnquoted {
|
|
||||||
keys = append(keys, name)
|
|
||||||
}
|
|
||||||
|
|
||||||
sort.Strings(keys)
|
|
||||||
|
|
||||||
for _, name := range keys {
|
|
||||||
fmt.Fprintf(kc, `
|
|
||||||
config %s%s
|
|
||||||
string
|
|
||||||
default %s
|
|
||||||
`, name, makeComment(name), KconfigStringUnquoted[name])
|
|
||||||
}
|
|
||||||
|
|
||||||
keys = nil
|
keys = nil
|
||||||
for name, _ := range KconfigString {
|
for name, _ := range KconfigString {
|
||||||
keys = append(keys, name)
|
keys = append(keys, name)
|
||||||
|
@ -730,7 +714,7 @@ func main() {
|
||||||
ctx.MoboID = ctx.SaneVendor + "/" + sanitize(ctx.Model)
|
ctx.MoboID = ctx.SaneVendor + "/" + sanitize(ctx.Model)
|
||||||
ctx.KconfigName = "BOARD_" + strings.ToUpper(ctx.SaneVendor+"_"+sanitize(ctx.Model))
|
ctx.KconfigName = "BOARD_" + strings.ToUpper(ctx.SaneVendor+"_"+sanitize(ctx.Model))
|
||||||
ctx.BaseDirectory = *FlagOutDir + MoboDir + ctx.MoboID
|
ctx.BaseDirectory = *FlagOutDir + MoboDir + ctx.MoboID
|
||||||
KconfigStringUnquoted["MAINBOARD_DIR"] = ctx.MoboID
|
KconfigString["MAINBOARD_DIR"] = ctx.MoboID
|
||||||
KconfigString["MAINBOARD_PART_NUMBER"] = ctx.Model
|
KconfigString["MAINBOARD_PART_NUMBER"] = ctx.Model
|
||||||
|
|
||||||
os.MkdirAll(ctx.BaseDirectory, 0700)
|
os.MkdirAll(ctx.BaseDirectory, 0700)
|
||||||
|
|
Loading…
Reference in New Issue