Edward O'Callaghan (eocallaghan(a)alterapraxis.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/8036
-gerrit
commit 6ad9a666f6be87c9b131cc205999df3ac8bfa4ae
Author: Edward O'Callaghan <eocallaghan(a)alterapraxis.com>
Date: Sat Jan 3 01:55:22 2015 +1100
Provide coreboot coding style formalisation file for clang-format
The Clang project has a powerful code rewrite engine in the form
of LibFormat. A auxiliary tool is provided called `clang-format'
that can take a coding style formalisation file and rewrite your
code to conform to this style. Further, a wrapper script called
`git-clang-format' is also provided that can hook pre-commits
potentially replacing our slow and poor coverage regexp scripts
on pre-commits.
Herein we provide essentially the Linux Style Guide formalism.
Change-Id: Ica2207fdb8a4702793fa73eba6293b7b36ea9050
Signed-off-by: Edward O'Callaghan <eocallaghan(a)alterapraxis.com>
---
.clang-format | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/.clang-format b/.clang-format
new file mode 100644
index 0000000..a3ef233
--- /dev/null
+++ b/.clang-format
@@ -0,0 +1,6 @@
+BasedOnStyle: LLVM
+IndentWidth: 8
+UseTab: Always
+BreakBeforeBraces: Linux
+AllowShortIfStatementsOnASingleLine: false
+IndentCaseLabels: false
Edward O'Callaghan (eocallaghan(a)alterapraxis.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/8037
-gerrit
commit 71d32c35a6099b37122db4987602ea5b9fe5de05
Author: Edward O'Callaghan <eocallaghan(a)alterapraxis.com>
Date: Sat Jan 3 02:08:33 2015 +1100
util/gitconfig/pre-commit: Use clang-format to sanitise commits
Use the `git-format' tool to sanitise coreboot commits such that
they conform to coreboot's coding style.
This fancy piece of machinary allows one to have LibFormat from
Clang to automatically check your commit conforms to coreboot's
coding style, fix any issues automatically and provides you a
diff you may review and apply at your convenience.
N.B. When the `clang-format' binary is not found we issue a warning
that the test was skipped and carry on as usual. Hence, this is
strictly non-enforcing at this current time. You may use it at your
leisure.
Change-Id: If49017ea82f0707efd47cae5978a286a9af8f3b7
Signed-off-by: Edward O'Callaghan <eocallaghan(a)alterapraxis.com>
---
Makefile.inc | 8 ++-
util/gitconfig/pre-commit | 2 +-
util/lint/check-style | 143 ++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 151 insertions(+), 2 deletions(-)
diff --git a/Makefile.inc b/Makefile.inc
index b0289c0..4cbbbb3 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -61,7 +61,7 @@ coreboot: build-dirs $(obj)/coreboot.rom $(obj)/cbfstool $(obj)/rmodtool
#######################################################################
# our phony targets
-PHONY+= clean-abuild coreboot lint lint-stable build-dirs
+PHONY+= clean-abuild coreboot check-style lint lint-stable build-dirs
#######################################################################
# root source directories of coreboot
@@ -406,6 +406,12 @@ printcrt0s:
update:
dongle.py -c /dev/term/1 $(obj)/coreboot.rom EOF
+check-style:
+ @grep "^# DESCR:" util/lint/check-style | sed "s,.*DESCR: *,,"
+ @echo "========"
+ @util/lint/check-style
+ @echo "========"
+
lint lint-stable:
FAILED=0; LINTLOG=`mktemp .tmpconfig.lintXXXXX`; \
for script in util/lint/$@-*; do \
diff --git a/util/gitconfig/pre-commit b/util/gitconfig/pre-commit
index 8ab3e56..0a2dd4f 100755
--- a/util/gitconfig/pre-commit
+++ b/util/gitconfig/pre-commit
@@ -1,2 +1,2 @@
#!/bin/sh
-exec make lint-stable
+exec make check-style lint-stable
diff --git a/util/lint/check-style b/util/lint/check-style
new file mode 100755
index 0000000..77594c3
--- /dev/null
+++ b/util/lint/check-style
@@ -0,0 +1,143 @@
+#!/bin/sh
+# git pre-commit hook that runs an clang-format stylecheck.
+# Features:
+# - abort commit when commit does not comply with the style guidelines
+# - create a patch of the proposed style changes
+#
+# modifications for clang-format by rene.milk(a)wwu.de
+# This file is part of a set of unofficial pre-commit hooks available
+# at github.
+# Link: https://github.com/githubbrowser/Pre-commit-hooks
+# Contact: David Martin, david.martin.mailbox(a)googlemail.com
+
+# DESCR: Checking that VCS 'staged' source conforms to coding style
+
+##################################################################
+# SETTINGS
+# set path to clang-format binary
+CLANG_FORMAT="/usr/bin/clang-format"
+
+# remove any older patches from previous commits. Set to true or false.
+# DELETE_OLD_PATCHES=false
+DELETE_OLD_PATCHES=false
+
+# only parse files with the extensions in FILE_EXTS. Set to true or false.
+# if false every changed file in the commit will be parsed with clang-format.
+# if true only files matching one of the extensions are parsed with clang-format.
+# PARSE_EXTS=true
+PARSE_EXTS=true
+
+# file types to parse. Only effective when PARSE_EXTS is true.
+# FILE_EXTS=".c .h .cpp .hpp"
+FILE_EXTS=".c .h .cpp .hpp .cc .hh .cxx"
+
+##################################################################
+# There should be no need to change anything below this line.
+
+# Reference: http://stackoverflow.com/questions/1055671/how-can-i-get-the-behavior-of-gn…
+canonicalize_filename () {
+ local target_file=$1
+ local physical_directory=""
+ local result=""
+
+ # Need to restore the working directory after work.
+ pushd `pwd` > /dev/null
+
+ cd "$(dirname "$target_file")"
+ target_file=`basename $target_file`
+
+ # Iterate down a (possible) chain of symlinks
+ while [ -L "$target_file" ]
+ do
+ target_file=$(readlink "$target_file")
+ cd "$(dirname "$target_file")"
+ target_file=$(basename "$target_file")
+ done
+
+ # Compute the canonicalized name by finding the physical path
+ # for the directory we're in and appending the target file.
+ physical_directory=`pwd -P`
+ result="$physical_directory"/"$target_file"
+
+ # restore the working directory after work.
+ popd > /dev/null
+
+ echo "$result"
+}
+
+# exit on error
+set -e
+
+# check whether the given file matches any of the set extensions
+matches_extension() {
+ local filename=$(basename "$1")
+ local extension=".${filename##*.}"
+ local ext
+
+ for ext in $FILE_EXTS; do [[ "$ext" == "$extension" ]] && return 0; done
+
+ return 1
+}
+
+# necessary check for initial commit
+if git rev-parse --verify HEAD >/dev/null 2>&1 ; then
+ against=HEAD
+else
+ # Initial commit: diff against an empty tree object
+ against=4b825dc642cb6eb9a060e54bf8d69288fbee4904
+fi
+
+if [ ! -x "$CLANG_FORMAT" ] ; then
+ printf "Warning: clang-format executable not found.\n"
+ printf "Set the correct path in $(canonicalize_filename "$0").\n"
+ printf "Skipping clang-format style check test.\n"
+# exit 1
+ exit 0
+fi
+
+# create a random filename to store our generated patch
+prefix="pre-commit-clang-format"
+suffix="$(date +%s)"
+patch="/tmp/$prefix-$suffix.patch"
+
+# clean up any older clang-format patches
+$DELETE_OLD_PATCHES && rm -f /tmp/$prefix*.patch
+
+# create one patch containing all changes to the files
+git diff-index --cached --diff-filter=ACMR --name-only $against -- | while read file;
+do
+ # ignore file if we do check for file extensions and the file
+ # does not match any of the extensions specified in $FILE_EXTS
+ if $PARSE_EXTS && ! matches_extension "$file"; then
+ continue;
+ fi
+
+ # clang-format our sourcefile, create a patch with diff and append it to our $patch
+ # The sed call is necessary to transform the patch from
+ # --- $file timestamp
+ # +++ - timestamp
+ # to both lines working on the same file and having a a/ and b/ prefix.
+ # Else it can not be applied with 'git apply'.
+ "$CLANG_FORMAT" -style=file "$file" | \
+ diff -u "$file" - | \
+ sed -e "1s|--- |--- a/|" -e "2s|+++ -|+++ b/$file|" >> "$patch"
+done
+
+# if no patch has been generated all is ok, clean up the file stub and exit
+if [ ! -s "$patch" ] ; then
+ printf "Files in this commit comply with the clang-format rules.\n"
+ rm -f "$patch"
+ exit 0
+fi
+
+# a patch has been created, notify the user and exit
+printf "\nThe following differences were found between the code to commit "
+printf "and the clang-format rules:\n\n"
+cat "$patch"
+
+printf "\nYou can apply these changes with:\n git apply $patch\n"
+printf "(may need to be called from the root directory of your repository)\n"
+printf "Aborting commit. Apply changes and commit again or skip checking with"
+printf " --no-verify (not recommended).\n"
+
+exit 1
Edward O'Callaghan (eocallaghan(a)alterapraxis.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/8037
-gerrit
commit 3e2a252bd8655b1290c784cfaf9c0794d99fd8e3
Author: Edward O'Callaghan <eocallaghan(a)alterapraxis.com>
Date: Sat Jan 3 02:08:33 2015 +1100
util/gitconfig/pre-commit: Use clang-format to sanitise commits
Use the `git-format' tool to sanitise coreboot commits such that
they conform to coreboot's coding style.
This fancy piece of machinary allows one to have LibFormat from
Clang to automatically check your commit conforms to coreboot's
coding style, fix any issues automatically and provides you a
diff you may review and apply at your convenience.
N.B. When the `clang-format' binary is not found we issue a warning
that the test was skipped and carry on as usual. Hence, this is
strictly non-enforcing at this current time. You may use it at your
leisure.
Change-Id: If49017ea82f0707efd47cae5978a286a9af8f3b7
Signed-off-by: Edward O'Callaghan <eocallaghan(a)alterapraxis.com>
---
Makefile.inc | 8 ++-
util/gitconfig/pre-commit | 2 +-
util/lint/check-style | 143 ++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 151 insertions(+), 2 deletions(-)
diff --git a/Makefile.inc b/Makefile.inc
index b0289c0..4cbbbb3 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -61,7 +61,7 @@ coreboot: build-dirs $(obj)/coreboot.rom $(obj)/cbfstool $(obj)/rmodtool
#######################################################################
# our phony targets
-PHONY+= clean-abuild coreboot lint lint-stable build-dirs
+PHONY+= clean-abuild coreboot check-style lint lint-stable build-dirs
#######################################################################
# root source directories of coreboot
@@ -406,6 +406,12 @@ printcrt0s:
update:
dongle.py -c /dev/term/1 $(obj)/coreboot.rom EOF
+check-style:
+ @grep "^# DESCR:" util/lint/check-style | sed "s,.*DESCR: *,,"
+ @echo "========"
+ @util/lint/check-style
+ @echo "========"
+
lint lint-stable:
FAILED=0; LINTLOG=`mktemp .tmpconfig.lintXXXXX`; \
for script in util/lint/$@-*; do \
diff --git a/util/gitconfig/pre-commit b/util/gitconfig/pre-commit
index 8ab3e56..0a2dd4f 100755
--- a/util/gitconfig/pre-commit
+++ b/util/gitconfig/pre-commit
@@ -1,2 +1,2 @@
#!/bin/sh
-exec make lint-stable
+exec make check-style lint-stable
diff --git a/util/lint/check-style b/util/lint/check-style
new file mode 100755
index 0000000..139a8e5
--- /dev/null
+++ b/util/lint/check-style
@@ -0,0 +1,143 @@
+#!/bin/sh
+# git pre-commit hook that runs an clang-format stylecheck.
+# Features:
+# - abort commit when commit does not comply with the style guidelines
+# - create a patch of the proposed style changes
+#
+# modifications for clang-format by rene.milk(a)wwu.de
+# This file is part of a set of unofficial pre-commit hooks available
+# at github.
+# Link: https://github.com/githubbrowser/Pre-commit-hooks
+# Contact: David Martin, david.martin.mailbox(a)googlemail.com
+
+# DESCR: Checking that VCS 'staged' source conforms to coding style
+
+##################################################################
+# SETTINGS
+# set path to clang-format binary
+CLANG_FORMAT="/usr/bin/clang-format"
+
+# remove any older patches from previous commits. Set to true or false.
+# DELETE_OLD_PATCHES=false
+DELETE_OLD_PATCHES=false
+
+# only parse files with the extensions in FILE_EXTS. Set to true or false.
+# if false every changed file in the commit will be parsed with clang-format.
+# if true only files matching one of the extensions are parsed with clang-format.
+# PARSE_EXTS=true
+PARSE_EXTS=true
+
+# file types to parse. Only effective when PARSE_EXTS is true.
+# FILE_EXTS=".c .h .cpp .hpp"
+FILE_EXTS=".c .h .cpp .hpp .cc .hh .cxx"
+
+##################################################################
+# There should be no need to change anything below this line.
+
+# Reference: http://stackoverflow.com/questions/1055671/how-can-i-get-the-behavior-of-gn…
+canonicalize_filename () {
+ local target_file=$1
+ local physical_directory=""
+ local result=""
+
+ # Need to restore the working directory after work.
+ pushd `pwd` > /dev/null
+
+ cd "$(dirname "$target_file")"
+ target_file=`basename $target_file`
+
+ # Iterate down a (possible) chain of symlinks
+ while [ -L "$target_file" ]
+ do
+ target_file=$(readlink "$target_file")
+ cd "$(dirname "$target_file")"
+ target_file=$(basename "$target_file")
+ done
+
+ # Compute the canonicalized name by finding the physical path
+ # for the directory we're in and appending the target file.
+ physical_directory=`pwd -P`
+ result="$physical_directory"/"$target_file"
+
+ # restore the working directory after work.
+ popd > /dev/null
+
+ echo "$result"
+}
+
+# exit on error
+set -e
+
+# check whether the given file matches any of the set extensions
+matches_extension() {
+ local filename=$(basename "$1")
+ local extension=".${filename##*.}"
+ local ext
+
+ for ext in $FILE_EXTS; do [[ "$ext" == "$extension" ]] && return 0; done
+
+ return 1
+}
+
+# necessary check for initial commit
+if git rev-parse --verify HEAD >/dev/null 2>&1 ; then
+ against=HEAD
+else
+ # Initial commit: diff against an empty tree object
+ against=4b825dc642cb6eb9a060e54bf8d69288fbee4904
+fi
+
+if [ ! -x "$CLANG_FORMAT" ] ; then
+ printf "Warning: clang-format executable not found.\n"
+ printf "Set the correct path in $(canonicalize_filename "$0").\n"
+ printf "Skipping clang-format style check test.\n"
+# exit 1
+ exit 0
+fi
+
+# create a random filename to store our generated patch
+prefix="pre-commit-clang-format"
+suffix="$(date +%s)"
+patch="/tmp/$prefix-$suffix.patch"
+
+# clean up any older clang-format patches
+$DELETE_OLD_PATCHES && rm -f /tmp/$prefix*.patch
+
+# create one patch containing all changes to the files
+git diff-index --cached --diff-filter=ACMR --name-only $against -- | while read file;
+do
+ # ignore file if we do check for file extensions and the file
+ # does not match any of the extensions specified in $FILE_EXTS
+ if $PARSE_EXTS && ! matches_extension "$file"; then
+ continue;
+ fi
+
+ # clang-format our sourcefile, create a patch with diff and append it to our $patch
+ # The sed call is necessary to transform the patch from
+ # --- $file timestamp
+ # +++ - timestamp
+ # to both lines working on the same file and having a a/ and b/ prefix.
+ # Else it can not be applied with 'git apply'.
+ "$CLANG_FORMAT" -style=file -assume-filename=util/lint/clang-format "$file" | \
+ diff -u "$file" - | \
+ sed -e "1s|--- |--- a/|" -e "2s|+++ -|+++ b/$file|" >> "$patch"
+done
+
+# if no patch has been generated all is ok, clean up the file stub and exit
+if [ ! -s "$patch" ] ; then
+ printf "Files in this commit comply with the clang-format rules.\n"
+ rm -f "$patch"
+ exit 0
+fi
+
+# a patch has been created, notify the user and exit
+printf "\nThe following differences were found between the code to commit "
+printf "and the clang-format rules:\n\n"
+cat "$patch"
+
+printf "\nYou can apply these changes with:\n git apply $patch\n"
+printf "(may need to be called from the root directory of your repository)\n"
+printf "Aborting commit. Apply changes and commit again or skip checking with"
+printf " --no-verify (not recommended).\n"
+
+exit 1
Kyösti Mälkki (kyosti.malkki(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/8041
-gerrit
commit 57a80f4bfa91a230c3e9dbd47132240c952115cb
Author: Furquan Shaikh <furquan(a)google.com>
Date: Mon Apr 28 16:44:21 2014 -0700
coreboot rush: Add support for rush board
Add basic support for rush board
BUG=None
BRANCH=None
TEST=Compiles successfully with soc tegra132 and armv8 arch selected for
romstage and ramstage
Change-Id: Ica57c68d230e4e0e9916729752395843de188733
Signed-off-by: Furquan Shaikh <furquan(a)google.com>
Reviewed-on: https://chromium-review.googlesource.com/197399
Reviewed-by: Aaron Durbin <adurbin(a)chromium.org>
Commit-Queue: Furquan Shaikh <furquan(a)chromium.org>
Tested-by: Furquan Shaikh <furquan(a)chromium.org>
(cherry picked from commit 06a040dc320d7b04ec0f7e51c1b3987c8f6d80f3)
Signed-off-by: Marc Jones <marc.jones(a)se-eng.com>
---
src/mainboard/google/Kconfig | 3 +++
src/mainboard/google/rush/Kconfig | 40 +++++++++++++++++++++++++++++++++
src/mainboard/google/rush/Makefile.inc | 22 ++++++++++++++++++
src/mainboard/google/rush/devicetree.cb | 22 ++++++++++++++++++
src/mainboard/google/rush/mainboard.c | 35 +++++++++++++++++++++++++++++
src/mainboard/google/rush/romstage.c | 30 +++++++++++++++++++++++++
6 files changed, 152 insertions(+)
diff --git a/src/mainboard/google/Kconfig b/src/mainboard/google/Kconfig
index e84cd7c..dd77bf3 100644
--- a/src/mainboard/google/Kconfig
+++ b/src/mainboard/google/Kconfig
@@ -47,6 +47,8 @@ config BOARD_GOOGLE_PEPPY
bool "Peppy"
config BOARD_GOOGLE_RAMBI
bool "Rambi"
+config BOARD_GOOGLE_RUSH
+ bool "Rush"
config BOARD_GOOGLE_SAMUS
bool "Samus"
config BOARD_GOOGLE_SLIPPY
@@ -71,6 +73,7 @@ source "src/mainboard/google/parrot/Kconfig"
source "src/mainboard/google/peach_pit/Kconfig"
source "src/mainboard/google/peppy/Kconfig"
source "src/mainboard/google/rambi/Kconfig"
+source "src/mainboard/google/rush/Kconfig"
source "src/mainboard/google/samus/Kconfig"
source "src/mainboard/google/slippy/Kconfig"
source "src/mainboard/google/storm/Kconfig"
diff --git a/src/mainboard/google/rush/Kconfig b/src/mainboard/google/rush/Kconfig
new file mode 100644
index 0000000..bda3b02
--- /dev/null
+++ b/src/mainboard/google/rush/Kconfig
@@ -0,0 +1,40 @@
+##
+## This file is part of the coreboot project.
+##
+## Copyright 2014 Google Inc.
+##
+## 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.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+if BOARD_GOOGLE_RUSH
+
+config BOARD_SPECIFIC_OPTIONS # dummy
+ def_bool y
+ select SOC_NVIDIA_TEGRA132
+ select BOARD_ROMSIZE_KB_4096
+
+
+config MAINBOARD_DIR
+ string
+ default google/rush
+
+config MAINBOARD_PART_NUMBER
+ string
+ default "Rush"
+
+config DRAM_SIZE_MB
+ int
+ default 2048
+
+endif # BOARD_GOOGLE_RUSH
diff --git a/src/mainboard/google/rush/Makefile.inc b/src/mainboard/google/rush/Makefile.inc
new file mode 100644
index 0000000..94a0e28
--- /dev/null
+++ b/src/mainboard/google/rush/Makefile.inc
@@ -0,0 +1,22 @@
+##
+## This file is part of the coreboot project.
+##
+## Copyright 2014 Google Inc.
+##
+## 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.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+romstage-y += romstage.c
+
+ramstage-y += mainboard.c
\ No newline at end of file
diff --git a/src/mainboard/google/rush/devicetree.cb b/src/mainboard/google/rush/devicetree.cb
new file mode 100644
index 0000000..73836a4
--- /dev/null
+++ b/src/mainboard/google/rush/devicetree.cb
@@ -0,0 +1,22 @@
+##
+## This file is part of the coreboot project.
+##
+## Copyright 2014 Google Inc.
+##
+## 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.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+chip soc/nvidia/tegra132
+ device cpu_cluster 0 on end
+end
diff --git a/src/mainboard/google/rush/mainboard.c b/src/mainboard/google/rush/mainboard.c
new file mode 100644
index 0000000..9b8e354
--- /dev/null
+++ b/src/mainboard/google/rush/mainboard.c
@@ -0,0 +1,35 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2014 Google Inc.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <device/device.h>
+#include <boot/coreboot_tables.h>
+
+static void mainboard_init(device_t dev)
+{
+}
+
+static void mainboard_enable(device_t dev)
+{
+ dev->ops->init = &mainboard_init;
+}
+
+struct chip_operations mainboard_ops = {
+ .name = "rush",
+ .enable_dev = mainboard_enable,
+};
diff --git a/src/mainboard/google/rush/romstage.c b/src/mainboard/google/rush/romstage.c
new file mode 100644
index 0000000..e2b75f6
--- /dev/null
+++ b/src/mainboard/google/rush/romstage.c
@@ -0,0 +1,30 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2014 Google Inc.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <arch/stages.h>
+#include <cbfs.h>
+#include <console/console.h>
+
+void main(void)
+{
+ void *entry;
+
+ entry = cbfs_load_stage(CBFS_DEFAULT_MEDIA, "fallback/ramstage");
+ stage_exit(entry);
+}
the following patch was just integrated into master:
commit 3ae558f5a1f00aba39621c5d0f042436c5f71789
Author: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Date: Mon Nov 10 15:08:47 2014 +0200
ARM64: Always has DYNAMIC_CBMEM
The static allocator only worked for x86 anyway.
Change-Id: Ibe4e172bb654f6414949bd11787c9407d091a858
Signed-off-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Reviewed-on: http://review.coreboot.org/8028
Tested-by: build bot (Jenkins)
Reviewed-by: Marc Jones <marc.jones(a)se-eng.com>
See http://review.coreboot.org/8028 for details.
-gerrit