diff options
author | Che-Liang Chiou <clchiou@chromium.org> | 2011-06-15 09:08:21 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2011-08-29 10:39:26 -0700 |
commit | ac78029b3a9fe2875d06c03badeb4f0858c0b923 (patch) | |
tree | 0478b8897fe1fbc7cc131126bb66cad1a04ef9bc /board/nvidia/chromeos | |
parent | 5a4e8697a6abfd08f5b842fb3c5b15a48fc6b759 (diff) |
CHROMIUM: [1/7] fix to merely compilable; delete obsolete files
The compiler warnings and errors due to cherry-picking verified boot
integration library into new u-boot codebase are fixed here.
This and the following six commits only give you a compilable
repository, and do not give you a working verified boot; neither onestop
nor the old four-variants style of verified boot are supposed to be
functioning.
Changes in this commit:
* delete obsolete files:
- cpu_state.c
- eeprom_driver.c
* delete unused firmware storage device:
- firmware_storage_{nand,ram}.c
BUG=chromium-os:16508
TEST=manual
After all seven commits are checked in, you should be able to run:
make ARCH=arm \
CROSS_COMPILE=armv7a-cros-linux-gnueabi- \
USE_PRIVATE_LIBGCC=yes \
VBOOT=/build/tegra2_seaboard/usr \
chromeos_seaboard_onestop_config
make ARCH=arm \
CROSS_COMPILE=armv7a-cros-linux-gnueabi- \
USE_PRIVATE_LIBGCC=yes \
VBOOT=/build/tegra2_seaboard/usr \
all
Change-Id: I8a73e5536277a7c22dad3f95c1a33da90689a6f3
Reviewed-on: http://gerrit.chromium.org/gerrit/2676
Tested-by: Che-Liang Chiou <clchiou@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'board/nvidia/chromeos')
-rw-r--r-- | board/nvidia/chromeos/cpu_state.c | 41 | ||||
-rw-r--r-- | board/nvidia/chromeos/eeprom_driver.c | 123 |
2 files changed, 0 insertions, 164 deletions
diff --git a/board/nvidia/chromeos/cpu_state.c b/board/nvidia/chromeos/cpu_state.c deleted file mode 100644 index bb1bb01bd8d..00000000000 --- a/board/nvidia/chromeos/cpu_state.c +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2011 The Chromium OS Authors. All rights reserved. - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * Alternatively, this software may be distributed under the terms of the - * GNU General Public License ("GPL") version 2 as published by the Free - * Software Foundation. - */ - -#include <common.h> - -#include <chromeos/hardware_interface.h> - -int is_s3_resume(void) { return 0; } diff --git a/board/nvidia/chromeos/eeprom_driver.c b/board/nvidia/chromeos/eeprom_driver.c deleted file mode 100644 index ef3f6200325..00000000000 --- a/board/nvidia/chromeos/eeprom_driver.c +++ /dev/null @@ -1,123 +0,0 @@ -/* - * Copyright (c) 2011 The Chromium OS Authors. All rights reserved. - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * Alternatively, this software may be distributed under the terms of the - * GNU General Public License ("GPL") version 2 as published by the Free - * Software Foundation. - */ - -/* Implementation of per-board EEPROM driver functions */ - -#include <common.h> -#include <malloc.h> -#include <chromeos/firmware_storage.h> - -/* TODO Replace mem_seek/read with spi_seek/read when moving firmware storage - * from NAND to SPI Flash */ - -struct context_t { - void *begin, *cur, *end; -}; - -static off_t mem_seek(void *context, off_t offset, enum whence_t whence) -{ - void *begin, *cur, *end; - - begin = ((struct context_t *) context)->begin; - cur = ((struct context_t *) context)->cur; - end = ((struct context_t *) context)->end; - - if (whence == SEEK_SET) - cur = begin + offset; - else if (whence == SEEK_CUR) - cur = cur + offset; - else if (whence == SEEK_END) - cur = end + offset; - else { - debug("mem_seek: unknown whence value: %d\n", whence); - return -1; - } - - if (cur < begin) { - debug("mem_seek: offset underflow: %p < %p\n", cur, begin); - return -1; - } - - if (cur >= end) { - debug("mem_seek: offset exceeds size: %p >= %p\n", cur, end); - return -1; - } - - ((struct context_t *) context)->cur = cur; - return cur - begin; -} - -static ssize_t mem_read(void *context, void *buf, size_t count) -{ - void *begin, *cur, *end; - - if (count == 0) - return 0; - - begin = ((struct context_t *) context)->begin; - cur = ((struct context_t *) context)->cur; - end = ((struct context_t *) context)->end; - - if (count > end - cur) - count = end - cur; - - memcpy(buf, cur, count); - ((struct context_t *) context)->cur += count; - - return count; -} - -int init_firmware_storage(firmware_storage_t *f) -{ - struct context_t *context; - - context = (struct context_t *) malloc(sizeof(struct context_t)); - context->begin = (void *) TEXT_BASE; - context->cur = (void *) TEXT_BASE; - context->end = (void *) TEXT_BASE + CONFIG_FIRMWARE_SIZE; - - f->seek = mem_seek; - f->read = mem_read; - f->context = (void *) context; - - return 0; -} - -int release_firmware_storage(firmware_storage_t *f) -{ - free(f->context); - return 0; -} |