src/: Replace GPL boilerplate with SPDX headers
[coreboot.git] / src / mainboard / google / foster / bct / cfg2inc.sh
blob30e24c0060b66ac7bf57bcef177f3a69aede149a
1 #!/bin/sh
3 # This file is part of the coreboot project.
6 # SPDX-License-Identifier: GPL-2.0-only
8 bct_cfg2inc() {
9 local in_file="$1"
10 local out_file="$2"
11 echo "{ /* generated from ${in_file}; do not edit. */" >"${out_file}"
12 # Note currently we can only handle DDR3 type memory, even in C
13 # implementation.
14 sed "/^#.*$/d; s/^SDRAM.0./ /; s/\r$//; s/;$/,/;" \
15 "${in_file}" >> "${out_file}"
16 echo "}," >>"${out_file}"
19 for file in $@; do
20 echo "Generating $file => ${file%cfg}inc..."
21 bct_cfg2inc "${file}" "${file%cfg}inc"
22 done