autoport: Add GPL boilerplate header to not empty .c files
The idea behind this not to enforce a license on autogenerated code but is simply out of convenience in the case one wants to make the result public (in which case it needs to have these license headers). Change-Id: I1d6b48762b1249bb0becb178a30e1396bf6978fc Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/19510 Reviewed-by: Patrick Rudolph <siro@das-labor.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
This commit is contained in:
parent
128205fd08
commit
5930285206
|
@ -12,6 +12,7 @@ func (i azalia) Scan(ctx Context, addr PCIDevData) {
|
||||||
az := Create(ctx, "hda_verb.c")
|
az := Create(ctx, "hda_verb.c")
|
||||||
defer az.Close()
|
defer az.Close()
|
||||||
|
|
||||||
|
Add_gpl(az)
|
||||||
az.WriteString(
|
az.WriteString(
|
||||||
`#include <device/azalia_device.h>
|
`#include <device/azalia_device.h>
|
||||||
|
|
||||||
|
|
|
@ -43,6 +43,7 @@ func (b bd82x6x) GPIO(ctx Context, inteltool InteltoolData) {
|
||||||
|
|
||||||
AddROMStageFile("gpio.c", "")
|
AddROMStageFile("gpio.c", "")
|
||||||
|
|
||||||
|
Add_gpl(gpio)
|
||||||
gpio.WriteString("#include <southbridge/intel/common/gpio.h>\n\n")
|
gpio.WriteString("#include <southbridge/intel/common/gpio.h>\n\n")
|
||||||
|
|
||||||
addresses := [3][6]int{
|
addresses := [3][6]int{
|
||||||
|
@ -305,6 +306,7 @@ func (b bd82x6x) Scan(ctx Context, addr PCIDevData) {
|
||||||
sb := Create(ctx, "early_southbridge.c")
|
sb := Create(ctx, "early_southbridge.c")
|
||||||
defer sb.Close()
|
defer sb.Close()
|
||||||
AddROMStageFile("early_southbridge.c", "")
|
AddROMStageFile("early_southbridge.c", "")
|
||||||
|
Add_gpl(sb)
|
||||||
sb.WriteString(`#include <stdint.h>
|
sb.WriteString(`#include <stdint.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <lib.h>
|
#include <lib.h>
|
||||||
|
@ -401,6 +403,7 @@ void mainboard_get_spd(spd_raw_data *spd, bool id_only)
|
||||||
gnvs := Create(ctx, "gnvs.c")
|
gnvs := Create(ctx, "gnvs.c")
|
||||||
defer gnvs.Close()
|
defer gnvs.Close()
|
||||||
|
|
||||||
|
Add_gpl(gnvs)
|
||||||
gnvs.WriteString(`#include <southbridge/intel/bd82x6x/nvs.h>
|
gnvs.WriteString(`#include <southbridge/intel/bd82x6x/nvs.h>
|
||||||
|
|
||||||
/* FIXME: check this function. */
|
/* FIXME: check this function. */
|
||||||
|
|
|
@ -79,25 +79,9 @@ void h8_mainboard_init_dock (void)
|
||||||
|
|
||||||
AddSMMFile("smihandler.c", "")
|
AddSMMFile("smihandler.c", "")
|
||||||
|
|
||||||
|
Add_gpl(smi)
|
||||||
smi.WriteString(
|
smi.WriteString(
|
||||||
`/*
|
`#include <arch/io.h>
|
||||||
* This file is part of the coreboot project.
|
|
||||||
*
|
|
||||||
* Copyright (C) 2008-2009 coresystems GmbH
|
|
||||||
* Copyright (C) 2014 Vladimir Serbinenko
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU General Public License as
|
|
||||||
* published by the Free Software Foundation; version 2 of
|
|
||||||
* the License.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <arch/io.h>
|
|
||||||
#include <console/console.h>
|
#include <console/console.h>
|
||||||
#include <cpu/x86/smm.h>
|
#include <cpu/x86/smm.h>
|
||||||
#include <ec/acpi/ec.h>
|
#include <ec/acpi/ec.h>
|
||||||
|
|
|
@ -207,6 +207,27 @@ func Create(ctx Context, name string) *os.File {
|
||||||
return mf
|
return mf
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func Add_gpl(fp *os.File) {
|
||||||
|
fp.WriteString(`/*
|
||||||
|
* This file is part of the coreboot project.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2008-2009 coresystems GmbH
|
||||||
|
* Copyright (C) 2014 Vladimir Serbinenko
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License as
|
||||||
|
* published by the Free Software Foundation; version 2 of
|
||||||
|
* the License.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
`)
|
||||||
|
}
|
||||||
|
|
||||||
func RestorePCI16Simple(f *os.File, pcidev PCIDevData, addr uint16) {
|
func RestorePCI16Simple(f *os.File, pcidev PCIDevData, addr uint16) {
|
||||||
fmt.Fprintf(f, " pci_write_config16(PCI_DEV(%d, 0x%02x, %d), 0x%02x, 0x%02x%02x);\n",
|
fmt.Fprintf(f, " pci_write_config16(PCI_DEV(%d, 0x%02x, %d), 0x%02x, 0x%02x%02x);\n",
|
||||||
pcidev.Bus, pcidev.Dev, pcidev.Func, addr,
|
pcidev.Bus, pcidev.Dev, pcidev.Func, addr,
|
||||||
|
|
Loading…
Reference in New Issue