Hello community,
here is the log from the commit of package coreboot-utils
checked in at Thu Oct 16 01:18:59 CEST 2008.
--------
--- arch/i386/coreboot-utils/coreboot-utils.changes 2008-08-13 18:11:47.000000000 +0200
+++ /d/STABLE/coreboot-utils/coreboot-utils.changes 2008-10-15 21:01:56.000000000 +0200
@@ -1,0 +2,6 @@
+Wed Oct 15 20:58:16 CEST 2008 - bwalle@suse.de
+
+- update nvramtool to svn release r3613
+- update flashrom to svn release r3659
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
flashrom-svn-r3153.tar.bz2
nvramtool-svn-r3124.tar.bz2
New:
----
flashrom-svn-r3659.tar.bz2
nvramtool-svn-r3613.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ coreboot-utils.spec ++++++
--- /var/tmp/diff_new_pack.dc4554/_old 2008-10-16 01:17:58.000000000 +0200
+++ /var/tmp/diff_new_pack.dc4554/_new 2008-10-16 01:17:58.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package coreboot-utils (Version r3153)
+# spec file for package coreboot-utils (Version r3659)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -21,9 +21,9 @@
Name: coreboot-utils
Url: http://linuxbios.org/
Summary: A universal flash programming utility
-Version: r3153
-Release: 29
-%define nvramtool_version r3124
+Version: r3659
+Release: 1
+%define nvramtool_version r3613
License: GPL v2 only; GPL v2 or later
Group: Development/Tools/Other
Source0: flashrom-svn-%{version}.tar.bz2
@@ -59,6 +59,7 @@
make %{?jobs:-j%jobs} \
CFLAGS="$RPM_OPT_FLAGS -Os -Wall -DDISABLE_DOC " \
LDFLAGS="-lpci -lz"
+gzip nvramtool.1
%install
mkdir -p %{buildroot}%{_bindir}
@@ -91,6 +92,9 @@
%{_mandir}/man8/flashrom.8.gz
%changelog
+* Wed Oct 15 2008 bwalle@suse.de
+- update nvramtool to svn release r3613
+- update flashrom to svn release r3659
* Wed Aug 13 2008 ro@suse.de
- add ExclusiveArch
* Mon Mar 17 2008 bwalle@suse.de
++++++ flashrom-svn-r3153.tar.bz2 -> flashrom-svn-r3659.tar.bz2 ++++++
++++ 5134 lines of diff (skipped)
++++++ nvramtool-svn-r3124.tar.bz2 -> nvramtool-svn-r3613.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nvramtool-svn-r3124/ChangeLog new/nvramtool-svn-r3613/ChangeLog
--- old/nvramtool-svn-r3124/ChangeLog 2008-01-25 16:08:37.000000000 +0100
+++ new/nvramtool-svn-r3613/ChangeLog 2008-09-27 12:08:28.000000000 +0200
@@ -1,3 +1,11 @@
+Tue Sep 23 19:14:27 CEST 2008 Stefan Reinauer (stepan@coresystems.de)
+
+ Version 2.1
+
+ * Fix a number of off by one errors when accessing arrays
+
+ * Add support for reading/writing strings from/to CMOS.
+
Mon Jan 23 16:00:00 PST 2006 David S. Peterson (dsp@llnl.gov)
Version 2.0.1
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nvramtool-svn-r3124/cmos_lowlevel.c new/nvramtool-svn-r3613/cmos_lowlevel.c
--- old/nvramtool-svn-r3124/cmos_lowlevel.c 2008-03-01 20:06:32.000000000 +0100
+++ new/nvramtool-svn-r3613/cmos_lowlevel.c 2008-09-27 12:08:28.000000000 +0200
@@ -1,6 +1,5 @@
/*****************************************************************************\
* cmos_lowlevel.c
- * $Id: cmos_lowlevel.c 3122 2008-03-01 19:06:32Z uwe $
*****************************************************************************
* Copyright (C) 2002-2005 The Regents of the University of California.
* Produced at the Lawrence Livermore National Laboratory.
@@ -70,7 +69,7 @@
****************************************************************************/
static inline void put_bits (unsigned char value, unsigned bit,
unsigned nr_bits, unsigned long long *result)
- { *result += (value & ((unsigned char) ((1 << nr_bits) - 1))) << bit; }
+ { *result += ((unsigned long long)(value & ((unsigned char) ((1 << nr_bits) - 1)))) << bit; }
/****************************************************************************
* cmos_read
@@ -79,21 +78,39 @@
* and return this value. The I/O privilege level of the currently executing
* process must be set appropriately.
****************************************************************************/
-unsigned long long cmos_read (unsigned bit, unsigned length)
+unsigned long long cmos_read (const cmos_entry_t *e)
{ cmos_bit_op_location_t where;
+ unsigned bit = e->bit, length=e->length;
unsigned next_bit, bits_left, nr_bits;
- unsigned long long result;
+ unsigned long long result = 0;
unsigned char value;
- assert(!verify_cmos_op(bit, length));
+ assert(!verify_cmos_op(bit, length, e->config));
result = 0;
- for (next_bit = 0, bits_left = length;
- bits_left;
- next_bit += nr_bits, bits_left -= nr_bits)
- { nr_bits = cmos_bit_op_strategy(bit + next_bit, bits_left, &where);
- value = cmos_read_bits(&where, nr_bits);
- put_bits(value, next_bit, nr_bits, &result);
+ if (e->config == CMOS_ENTRY_STRING)
+ { char *newstring = malloc((length+7)/8);
+ unsigned usize = (8 * sizeof(unsigned long long));
+
+ if(!newstring) { out_of_memory(); }
+
+ for (next_bit = 0, bits_left = length;
+ bits_left;
+ next_bit += nr_bits, bits_left -= nr_bits)
+ { nr_bits = cmos_bit_op_strategy(bit + next_bit, bits_left>usize?usize:bits_left, &where);
+ value = cmos_read_bits(&where, nr_bits);
+ put_bits(value, next_bit % usize, nr_bits, &((unsigned long long *)newstring)[next_bit/usize]);
+ result = (unsigned long)newstring;
+ }
+ }
+ else
+ { for (next_bit = 0, bits_left = length;
+ bits_left;
+ next_bit += nr_bits, bits_left -= nr_bits)
+ { nr_bits = cmos_bit_op_strategy(bit + next_bit, bits_left, &where);
+ value = cmos_read_bits(&where, nr_bits);
+ put_bits(value, next_bit, nr_bits, &result);
+ }
}
return result;
@@ -106,17 +123,32 @@
* The I/O privilege level of the currently executing process must be set
* appropriately.
****************************************************************************/
-void cmos_write (unsigned bit, unsigned length, unsigned long long value)
+void cmos_write (const cmos_entry_t *e, unsigned long long value)
{ cmos_bit_op_location_t where;
+ unsigned bit = e->bit, length=e->length;
unsigned next_bit, bits_left, nr_bits;
- assert(!verify_cmos_op(bit, length));
+ assert(!verify_cmos_op(bit, length, e->config));
- for (next_bit = 0, bits_left = length;
- bits_left;
- next_bit += nr_bits, bits_left -= nr_bits)
- { nr_bits = cmos_bit_op_strategy(bit + next_bit, bits_left, &where);
- cmos_write_bits(&where, nr_bits, get_bits(value, next_bit, nr_bits));
+ if (e->config == CMOS_ENTRY_STRING)
+ { unsigned long long *data = (unsigned long long *)(unsigned long)value;
+ unsigned usize = (8 * sizeof(unsigned long long));
+
+ for (next_bit = 0, bits_left = length;
+ bits_left;
+ next_bit += nr_bits, bits_left -= nr_bits)
+ { nr_bits = cmos_bit_op_strategy(bit + next_bit, bits_left>usize?usize:bits_left, &where);
+ value = data[next_bit/usize];
+ cmos_write_bits(&where, nr_bits, get_bits(value, next_bit % usize, nr_bits));
+ }
+ }
+ else
+ { for (next_bit = 0, bits_left = length;
+ bits_left;
+ next_bit += nr_bits, bits_left -= nr_bits)
+ { nr_bits = cmos_bit_op_strategy(bit + next_bit, bits_left, &where);
+ cmos_write_bits(&where, nr_bits, get_bits(value, next_bit, nr_bits));
+ }
}
}
@@ -236,13 +268,16 @@
* wish to read or write. Perform sanity checking on 'bit' and 'length'. If
* no problems were encountered, return OK. Else return an error code.
****************************************************************************/
-int verify_cmos_op (unsigned bit, unsigned length)
+int verify_cmos_op (unsigned bit, unsigned length, cmos_entry_config_t config)
{ if ((bit >= (8 * CMOS_SIZE)) || ((bit + length) > (8 * CMOS_SIZE)))
return CMOS_AREA_OUT_OF_RANGE;
if (bit < (8 * CMOS_RTC_AREA_SIZE))
return CMOS_AREA_OVERLAPS_RTC;
+ if (config == CMOS_ENTRY_STRING)
+ return OK;
+
if (length > (8 * sizeof(unsigned long long)))
return CMOS_AREA_TOO_WIDE;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nvramtool-svn-r3124/cmos_lowlevel.h new/nvramtool-svn-r3613/cmos_lowlevel.h
--- old/nvramtool-svn-r3124/cmos_lowlevel.h 2008-03-01 20:06:32.000000000 +0100
+++ new/nvramtool-svn-r3613/cmos_lowlevel.h 2008-09-27 12:08:28.000000000 +0200
@@ -1,6 +1,5 @@
/*****************************************************************************\
* cmos_lowlevel.h
- * $Id: cmos_lowlevel.h 3122 2008-03-01 19:06:32Z uwe $
*****************************************************************************
* Copyright (C) 2002-2005 The Regents of the University of California.
* Produced at the Lawrence Livermore National Laboratory.
@@ -33,19 +32,20 @@
#define NVRAMTOOL_CMOS_LOWLEVEL_H
#include "common.h"
+#include "layout.h"
#define CMOS_AREA_OUT_OF_RANGE (CMOS_RESULT_START + 0)
#define CMOS_AREA_OVERLAPS_RTC (CMOS_RESULT_START + 1)
#define CMOS_AREA_TOO_WIDE (CMOS_RESULT_START + 2)
-unsigned long long cmos_read (unsigned bit, unsigned length);
-void cmos_write (unsigned bit, unsigned length, unsigned long long value);
+unsigned long long cmos_read (const cmos_entry_t *e);
+void cmos_write (const cmos_entry_t *e, unsigned long long value);
unsigned char cmos_read_byte (unsigned index);
void cmos_write_byte (unsigned index, unsigned char value);
void cmos_read_all (unsigned char data[]);
void cmos_write_all (unsigned char data[]);
void set_iopl (int level);
-int verify_cmos_op (unsigned bit, unsigned length);
+int verify_cmos_op (unsigned bit, unsigned length, cmos_entry_config_t config);
#define CMOS_SIZE 256 /* size of CMOS memory in bytes */
#define CMOS_RTC_AREA_SIZE 14 /* first 14 bytes control real time clock */
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nvramtool-svn-r3124/cmos_ops.c new/nvramtool-svn-r3613/cmos_ops.c
--- old/nvramtool-svn-r3124/cmos_ops.c 2008-03-01 20:06:32.000000000 +0100
+++ new/nvramtool-svn-r3613/cmos_ops.c 2008-09-27 12:08:28.000000000 +0200
@@ -1,6 +1,5 @@
/*****************************************************************************\
* cmos_ops.c
- * $Id: cmos_ops.c 3122 2008-03-01 19:06:32Z uwe $
*****************************************************************************
* Copyright (C) 2002-2005 The Regents of the University of California.
* Produced at the Lawrence Livermore National Laboratory.
@@ -47,7 +46,7 @@
/* Access to reserved parameters is not permitted. */
return CMOS_OP_RESERVED;
- if ((result = verify_cmos_op(e->bit, e->length)) != OK)
+ if ((result = verify_cmos_op(e->bit, e->length, e->config)) != OK)
return result;
assert(e->length > 0);
@@ -70,6 +69,7 @@
switch (e->config)
{ case CMOS_ENTRY_ENUM:
case CMOS_ENTRY_HEX:
+ case CMOS_ENTRY_STRING:
break;
default:
@@ -92,6 +92,7 @@
{ const cmos_enum_t *q;
unsigned long long out;
const char *p;
+ char *memory;
int negative, result, found_one;
if ((result = prepare_cmos_op_common(e)) != OK)
@@ -139,6 +140,15 @@
break;
+ case CMOS_ENTRY_STRING:
+ if (e->length < (8 * strlen(value_str)))
+ return CMOS_OP_VALUE_TOO_WIDE;
+ memory = malloc(e->length / 8);
+ memset(memory, 0, e->length / 8);
+ strcpy(memory, value_str);
+ out = (unsigned long)memory;
+ break;
+
default:
BUG();
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nvramtool-svn-r3124/cmos_ops.h new/nvramtool-svn-r3613/cmos_ops.h
--- old/nvramtool-svn-r3124/cmos_ops.h 2008-03-01 20:06:32.000000000 +0100
+++ new/nvramtool-svn-r3613/cmos_ops.h 2008-09-27 12:08:28.000000000 +0200
@@ -1,6 +1,5 @@
/*****************************************************************************\
* cmos_ops.h
- * $Id: cmos_ops.h 3122 2008-03-01 19:06:32Z uwe $
*****************************************************************************
* Copyright (C) 2002-2005 The Regents of the University of California.
* Produced at the Lawrence Livermore National Laboratory.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nvramtool-svn-r3124/common.c new/nvramtool-svn-r3613/common.c
--- old/nvramtool-svn-r3124/common.c 2008-03-01 20:06:32.000000000 +0100
+++ new/nvramtool-svn-r3613/common.c 2008-09-27 12:08:28.000000000 +0200
@@ -1,6 +1,5 @@
/*****************************************************************************\
* common.c
- * $Id: common.c 3122 2008-03-01 19:06:32Z uwe $
*****************************************************************************
* Copyright (C) 2002-2005 The Regents of the University of California.
* Produced at the Lawrence Livermore National Laboratory.
@@ -35,7 +34,7 @@
const char prog_name[] = "nvramtool";
/* version of this program */
-const char prog_version[] = "2.0.1";
+const char prog_version[] = "2.1";
/****************************************************************************
* get_line_from_file
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nvramtool-svn-r3124/common.h new/nvramtool-svn-r3613/common.h
--- old/nvramtool-svn-r3124/common.h 2008-03-01 20:06:32.000000000 +0100
+++ new/nvramtool-svn-r3613/common.h 2008-09-27 12:08:28.000000000 +0200
@@ -1,6 +1,5 @@
/*****************************************************************************\
* common.h
- * $Id: common.h 3122 2008-03-01 19:06:32Z uwe $
*****************************************************************************
* Copyright (C) 2002-2005 The Regents of the University of California.
* Produced at the Lawrence Livermore National Laboratory.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nvramtool-svn-r3124/compute_ip_checksum.c new/nvramtool-svn-r3613/compute_ip_checksum.c
--- old/nvramtool-svn-r3124/compute_ip_checksum.c 2008-01-25 16:08:37.000000000 +0100
+++ new/nvramtool-svn-r3613/compute_ip_checksum.c 2008-09-27 12:08:28.000000000 +0200
@@ -1,6 +1,5 @@
/*****************************************************************************\
* compute_ip_checksum.c
- * $Id: compute_ip_checksum.c 3075 2008-01-25 15:08:37Z uwe $
\*****************************************************************************/
#include
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nvramtool-svn-r3124/DISCLAIMER new/nvramtool-svn-r3613/DISCLAIMER
--- old/nvramtool-svn-r3124/DISCLAIMER 2008-03-01 20:06:32.000000000 +0100
+++ new/nvramtool-svn-r3613/DISCLAIMER 2008-09-27 12:08:28.000000000 +0200
@@ -1,8 +1,8 @@
####################################################################
-# $Id: DISCLAIMER 3122 2008-03-01 19:06:32Z uwe $
-####################################################################
Copyright (C) 2002 The Regents of the University of California.
+Copyright (C) 2008 coresystems GmbH
+
Produced at the Lawrence Livermore National Laboratory.
Written by David S. Peterson .
UCRL-CODE-2003-012
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nvramtool-svn-r3124/hexdump.c new/nvramtool-svn-r3613/hexdump.c
--- old/nvramtool-svn-r3124/hexdump.c 2008-01-25 16:08:37.000000000 +0100
+++ new/nvramtool-svn-r3613/hexdump.c 2008-09-27 12:08:28.000000000 +0200
@@ -1,6 +1,5 @@
/*****************************************************************************\
* hexdump.c
- * $Id: hexdump.c 3075 2008-01-25 15:08:37Z uwe $
\*****************************************************************************/
#include "hexdump.h"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nvramtool-svn-r3124/hexdump.h new/nvramtool-svn-r3613/hexdump.h
--- old/nvramtool-svn-r3124/hexdump.h 2008-01-25 16:08:37.000000000 +0100
+++ new/nvramtool-svn-r3613/hexdump.h 2008-09-27 12:08:28.000000000 +0200
@@ -1,6 +1,5 @@
/*****************************************************************************\
* hexdump.h
- * $Id: hexdump.h 3075 2008-01-25 15:08:37Z uwe $
\*****************************************************************************/
#ifndef _HEXDUMP_H
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nvramtool-svn-r3124/input_file.c new/nvramtool-svn-r3613/input_file.c
--- old/nvramtool-svn-r3124/input_file.c 2008-03-01 20:06:32.000000000 +0100
+++ new/nvramtool-svn-r3613/input_file.c 2008-09-27 12:08:28.000000000 +0200
@@ -1,6 +1,5 @@
/*****************************************************************************\
* input_file.c
- * $Id: input_file.c 3122 2008-03-01 19:06:32Z uwe $
*****************************************************************************
* Copyright (C) 2002-2005 The Regents of the University of California.
* Produced at the Lawrence Livermore National Laboratory.
@@ -137,6 +136,7 @@
item->bit = e->bit;
item->length = e->length;
+ item->config = e->config;
item->value = try_prepare_cmos_write(e, value);
/* Append write operation to pending write list. */
@@ -162,9 +162,13 @@
set_iopl(3);
while (list != NULL)
- { item = list;
+ { cmos_entry_t e;
+ item = list;
+ e.bit = item->bit;
+ e.length = item->length;
+ e.config = item->config;
list = item->next;
- cmos_write(item->bit, item->length, item->value);
+ cmos_write(&e, item->value);
free(item);
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nvramtool-svn-r3124/input_file.h new/nvramtool-svn-r3613/input_file.h
--- old/nvramtool-svn-r3124/input_file.h 2008-03-01 20:06:32.000000000 +0100
+++ new/nvramtool-svn-r3613/input_file.h 2008-09-27 12:08:28.000000000 +0200
@@ -1,6 +1,5 @@
/*****************************************************************************\
* input_file.h
- * $Id: input_file.h 3122 2008-03-01 19:06:32Z uwe $
*****************************************************************************
* Copyright (C) 2002-2005 The Regents of the University of California.
* Produced at the Lawrence Livermore National Laboratory.
@@ -33,6 +32,7 @@
#define INPUT_FILE_H
#include "common.h"
+#include "layout.h"
typedef struct cmos_write_t cmos_write_t;
@@ -44,6 +44,7 @@
struct cmos_write_t
{ unsigned bit;
unsigned length;
+ cmos_entry_config_t config;
unsigned long long value;
cmos_write_t *next;
};
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nvramtool-svn-r3124/ip_checksum.h new/nvramtool-svn-r3613/ip_checksum.h
--- old/nvramtool-svn-r3124/ip_checksum.h 2008-01-25 16:08:37.000000000 +0100
+++ new/nvramtool-svn-r3613/ip_checksum.h 2008-09-27 12:08:28.000000000 +0200
@@ -1,6 +1,5 @@
/*****************************************************************************\
* ip_checksum.h
- * $Id: ip_checksum.h 3075 2008-01-25 15:08:37Z uwe $
\*****************************************************************************/
#ifndef IP_CHECKSUM_H
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nvramtool-svn-r3124/layout.c new/nvramtool-svn-r3613/layout.c
--- old/nvramtool-svn-r3124/layout.c 2008-03-01 20:06:32.000000000 +0100
+++ new/nvramtool-svn-r3613/layout.c 2008-09-27 12:08:28.000000000 +0200
@@ -1,6 +1,5 @@
/*****************************************************************************\
* layout.c
- * $Id: layout.c 3122 2008-03-01 19:06:32Z uwe $
*****************************************************************************
* Copyright (C) 2002-2005 The Regents of the University of California.
* Produced at the Lawrence Livermore National Laboratory.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nvramtool-svn-r3124/layout_file.c new/nvramtool-svn-r3613/layout_file.c
--- old/nvramtool-svn-r3124/layout_file.c 2008-03-01 20:06:32.000000000 +0100
+++ new/nvramtool-svn-r3613/layout_file.c 2008-09-27 12:08:28.000000000 +0200
@@ -1,6 +1,5 @@
/*****************************************************************************\
* layout_file.c
- * $Id: layout_file.c 3122 2008-03-01 19:06:32Z uwe $
*****************************************************************************
* Copyright (C) 2002-2005 The Regents of the University of California.
* Produced at the Lawrence Livermore National Laboratory.
@@ -551,6 +550,10 @@
cmos_entry->config = CMOS_ENTRY_HEX;
break;
+ case 's':
+ cmos_entry->config = CMOS_ENTRY_STRING;
+ break;
+
case 'r':
cmos_entry->config = CMOS_ENTRY_RESERVED;
break;
@@ -758,6 +761,9 @@
case CMOS_ENTRY_RESERVED:
return 'r';
+ case CMOS_ENTRY_STRING:
+ return 's';
+
default:
BUG();
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nvramtool-svn-r3124/layout_file.h new/nvramtool-svn-r3613/layout_file.h
--- old/nvramtool-svn-r3124/layout_file.h 2008-03-01 20:06:32.000000000 +0100
+++ new/nvramtool-svn-r3613/layout_file.h 2008-09-27 12:08:28.000000000 +0200
@@ -1,6 +1,5 @@
/*****************************************************************************\
* layout_file.h
- * $Id: layout_file.h 3122 2008-03-01 19:06:32Z uwe $
*****************************************************************************
* Copyright (C) 2002-2005 The Regents of the University of California.
* Produced at the Lawrence Livermore National Laboratory.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nvramtool-svn-r3124/layout.h new/nvramtool-svn-r3613/layout.h
--- old/nvramtool-svn-r3124/layout.h 2008-03-01 20:06:32.000000000 +0100
+++ new/nvramtool-svn-r3613/layout.h 2008-09-27 12:08:28.000000000 +0200
@@ -1,6 +1,5 @@
/*****************************************************************************\
* layout.h
- * $Id: layout.h 3122 2008-03-01 19:06:32Z uwe $
*****************************************************************************
* Copyright (C) 2002-2005 The Regents of the University of California.
* Produced at the Lawrence Livermore National Laboratory.
@@ -49,6 +48,7 @@
typedef enum
{ CMOS_ENTRY_ENUM,
CMOS_ENTRY_HEX,
+ CMOS_ENTRY_STRING,
CMOS_ENTRY_RESERVED
}
cmos_entry_config_t;
@@ -59,7 +59,7 @@
unsigned length;
cmos_entry_config_t config;
unsigned config_id;
- char name[CMOS_MAX_NAME_LENGTH];
+ char name[CMOS_MAX_NAME_LENGTH + 1];
}
cmos_entry_t;
@@ -69,7 +69,7 @@
typedef struct
{ unsigned config_id;
unsigned long long value;
- char text[CMOS_MAX_TEXT_LENGTH];
+ char text[CMOS_MAX_TEXT_LENGTH + 1];
}
cmos_enum_t;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nvramtool-svn-r3124/lbtable.c new/nvramtool-svn-r3613/lbtable.c
--- old/nvramtool-svn-r3124/lbtable.c 2008-03-01 20:06:32.000000000 +0100
+++ new/nvramtool-svn-r3613/lbtable.c 2008-09-27 12:08:28.000000000 +0200
@@ -1,6 +1,5 @@
/*****************************************************************************\
* lbtable.c
- * $Id: lbtable.c 3122 2008-03-01 19:06:32Z uwe $
*****************************************************************************
* Copyright (C) 2002-2005 The Regents of the University of California.
* Produced at the Lawrence Livermore National Laboratory.
@@ -30,6 +29,7 @@
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
\*****************************************************************************/
+#include
#include
#include "common.h"
#include "coreboot_tables.h"
@@ -556,7 +556,7 @@
for (p = first_cmos_table_enum(); p != NULL; p = next_cmos_table_enum(p))
{ cmos_enum.config_id = p->config_id;
cmos_enum.value = p->value;
- strncpy(cmos_enum.text, p->text, CMOS_MAX_TEXT_LENGTH);
+ strncpy(cmos_enum.text, (char *)p->text, CMOS_MAX_TEXT_LENGTH);
cmos_enum.text[CMOS_MAX_TEXT_LENGTH] = '\0';
try_add_cmos_table_enum(&cmos_enum);
}
@@ -581,6 +581,10 @@
cmos_entry.config = CMOS_ENTRY_RESERVED;
break;
+ case 's':
+ cmos_entry.config = CMOS_ENTRY_STRING;
+ break;
+
default:
fprintf(stderr,
"%s: Entry in CMOS option table has unknown config "
@@ -589,7 +593,7 @@
}
cmos_entry.config_id = q->config_id;
- strncpy(cmos_entry.name, q->name, CMOS_MAX_NAME_LENGTH);
+ strncpy(cmos_entry.name, (char *)q->name, CMOS_MAX_NAME_LENGTH);
cmos_entry.name[CMOS_MAX_NAME_LENGTH] = '\0';
try_add_cmos_table_entry(&cmos_entry);
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nvramtool-svn-r3124/lbtable.h new/nvramtool-svn-r3613/lbtable.h
--- old/nvramtool-svn-r3124/lbtable.h 2008-03-01 20:06:32.000000000 +0100
+++ new/nvramtool-svn-r3613/lbtable.h 2008-09-27 12:08:28.000000000 +0200
@@ -1,6 +1,5 @@
/*****************************************************************************\
* lbtable.h
- * $Id: lbtable.h 3122 2008-03-01 19:06:32Z uwe $
*****************************************************************************
* Copyright (C) 2002-2005 The Regents of the University of California.
* Produced at the Lawrence Livermore National Laboratory.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nvramtool-svn-r3124/Makefile new/nvramtool-svn-r3613/Makefile
--- old/nvramtool-svn-r3124/Makefile 2008-03-01 20:06:32.000000000 +0100
+++ new/nvramtool-svn-r3613/Makefile 2008-09-27 12:08:28.000000000 +0200
@@ -1,28 +1,43 @@
-# $Id: Makefile 3122 2008-03-01 19:06:32Z uwe $
+#
+# Makefile for nvram utility
+#
+# (C) 2005-2008 coresystems GmbH
+# written by Stefan Reinauer
+#
+
+PROGRAM = nvramtool
+
+CC = gcc
+STRIP = strip
+INSTALL = /usr/bin/install
+PREFIX = /usr/local
+CFLAGS = -O2 -g -Wall -W
+#CFLAGS = -Os -Wall
+
+OBJS = cmos_lowlevel.o cmos_ops.o common.o compute_ip_checksum.o \
+ hexdump.o input_file.o layout.o layout_file.o lbtable.o \
+ nvramtool.o opts.o reg_expr.o
+
+all: dep $(PROGRAM)
+
+$(PROGRAM): $(OBJS)
+ $(CC) -o $(PROGRAM) $(OBJS) $(LDFLAGS)
+ $(STRIP) $(STRIP_ARGS) $(PROGRAM)
-PROJECT = nvramtool
-CC = gcc
-CFLAGS = -O2 -W -Wall
-LDFLAGS =
-OBJS = common.o compute_ip_checksum.o hexdump.o cmos_lowlevel.o \
- reg_expr.o layout.o layout_file.o lbtable.o cmos_ops.o input_file.o \
- opts.o nvramtool.o
-HEADERS = common.h ip_checksum.h coreboot_tables.h hexdump.h \
- cmos_lowlevel.h reg_expr.h layout.h layout_file.h lbtable.h \
- cmos_ops.h input_file.h opts.h
-
-all: nvramtool man
-
-nvramtool: $(OBJS)
- $(CC) $(LDFLAGS) -o $@ $(OBJS)
+clean:
+ rm -f $(PROGRAM) *.o
-man: nvramtool.1.gz
+distclean: clean
+ rm -f .dependencies
-$(OBJS): $(HEADERS)
+dep:
+ @$(CC) -MM *.c > .dependencies
-nvramtool.1.gz: nvramtool.1
- gzip -c --best nvramtool.1 > nvramtool.1.gz
+install: $(PROGRAM)
+ $(INSTALL) $(PROGRAM) $(PREFIX)/sbin
+ mkdir -p $(PREFIX)/share/man/man1
+ $(INSTALL) $(PROGRAM).1 $(PREFIX)/share/man/man1
-clean:
- rm -f *.o nvramtool nvramtool.1.gz
+.PHONY: all clean distclean dep
+-include .dependencies
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nvramtool-svn-r3124/nvramtool.1 new/nvramtool-svn-r3613/nvramtool.1
--- old/nvramtool-svn-r3124/nvramtool.1 2008-03-01 20:07:46.000000000 +0100
+++ new/nvramtool-svn-r3613/nvramtool.1 2008-09-27 12:08:28.000000000 +0200
@@ -1,6 +1,5 @@
.\"***************************************************************************\
.\" nvramtool.1
-.\" $Id: nvramtool.1 3123 2008-03-01 19:07:46Z uwe $
.\"***************************************************************************
.\" Copyright (C) 2002, 2003 The Regents of the University of California.
.\" Produced at the Lawrence Livermore National Laboratory.
@@ -28,7 +27,7 @@
.\" with this program; if not, write to the Free Software Foundation, Inc.,
.\" 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
.\"***************************************************************************/
-.TH NVRAMTOOL 1 "January 2008" Linux
+.TH NVRAMTOOL 1 "September 2008" Linux
.SH NAME
nvramtool \- read/write coreboot-related information
.SH SYNOPSIS
@@ -252,4 +251,4 @@
.SH AUTHORS
David S. Peterson
.br
-Stefan Reinauer
+Stefan Reinauer
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nvramtool-svn-r3124/nvramtool.c new/nvramtool-svn-r3613/nvramtool.c
--- old/nvramtool-svn-r3124/nvramtool.c 2008-03-01 20:07:46.000000000 +0100
+++ new/nvramtool-svn-r3613/nvramtool.c 2008-09-27 12:08:28.000000000 +0200
@@ -1,6 +1,5 @@
/*****************************************************************************\
* nvramtool.c
- * $Id: nvramtool.c 3123 2008-03-01 19:07:46Z uwe $
*****************************************************************************
* Copyright (C) 2002-2005 The Regents of the University of California.
* Produced at the Lawrence Livermore National Laboratory.
@@ -477,6 +476,11 @@
e->length);
break;
+ case CMOS_ENTRY_STRING:
+ printf("Parameter %s requires a %u-byte string.\n", name,
+ e->length / 8);
+ break;
+
case CMOS_ENTRY_RESERVED:
printf("Parameter %s is reserved.\n", name);
break;
@@ -570,7 +574,7 @@
/* write the value to nonvolatile RAM */
set_iopl(3);
- cmos_write(e->bit, e->length, n);
+ cmos_write(e, n);
cmos_checksum_write(cmos_checksum_compute());
set_iopl(0);
return;
@@ -674,7 +678,7 @@
/* read the value from CMOS */
set_iopl(3);
- value = cmos_read(e->bit, e->length);
+ value = cmos_read(e);
set_iopl(0);
/* display the value */
@@ -703,6 +707,16 @@
break;
+ case CMOS_ENTRY_STRING:
+ if (show_name)
+ printf("%s = %s\n", e->name, (char *)(unsigned long)value);
+ else
+ printf("%s\n", (char *)(unsigned long)value);
+
+ free((void *)(unsigned long)value);
+
+ break;
+
case CMOS_ENTRY_RESERVED:
default:
BUG();
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nvramtool-svn-r3124/nvramtool.spec new/nvramtool-svn-r3613/nvramtool.spec
--- old/nvramtool-svn-r3124/nvramtool.spec 2008-03-01 20:07:46.000000000 +0100
+++ new/nvramtool-svn-r3613/nvramtool.spec 2008-09-27 12:08:28.000000000 +0200
@@ -1,9 +1,7 @@
##
-# $Id: nvramtool.spec 3123 2008-03-01 19:07:46Z uwe $
-##
Name: nvramtool
-Version: 2.0.1
+Version: 2.1
Release: 0
Summary: coreboot utility program
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nvramtool-svn-r3124/opts.c new/nvramtool-svn-r3613/opts.c
--- old/nvramtool-svn-r3124/opts.c 2008-03-01 20:06:32.000000000 +0100
+++ new/nvramtool-svn-r3613/opts.c 2008-09-27 12:08:28.000000000 +0200
@@ -1,6 +1,5 @@
/*****************************************************************************\
* opts.c
- * $Id: opts.c 3122 2008-03-01 19:06:32Z uwe $
*****************************************************************************
* Copyright (C) 2002-2005 The Regents of the University of California.
* Produced at the Lawrence Livermore National Laboratory.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nvramtool-svn-r3124/opts.h new/nvramtool-svn-r3613/opts.h
--- old/nvramtool-svn-r3124/opts.h 2008-03-01 20:06:32.000000000 +0100
+++ new/nvramtool-svn-r3613/opts.h 2008-09-27 12:08:28.000000000 +0200
@@ -1,6 +1,5 @@
/*****************************************************************************\
* opts.h
- * $Id: opts.h 3122 2008-03-01 19:06:32Z uwe $
*****************************************************************************
* Copyright (C) 2002-2005 The Regents of the University of California.
* Produced at the Lawrence Livermore National Laboratory.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nvramtool-svn-r3124/README new/nvramtool-svn-r3613/README
--- old/nvramtool-svn-r3124/README 2008-03-01 20:06:32.000000000 +0100
+++ new/nvramtool-svn-r3613/README 2008-09-27 12:08:28.000000000 +0200
@@ -1,5 +1,3 @@
-$Id: README 3122 2008-03-01 19:06:32Z uwe $
-
Summary of Operation
--------------------
nvramtool is a utility for reading/writing coreboot parameters and
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nvramtool-svn-r3124/reg_expr.c new/nvramtool-svn-r3613/reg_expr.c
--- old/nvramtool-svn-r3124/reg_expr.c 2008-03-01 20:06:32.000000000 +0100
+++ new/nvramtool-svn-r3613/reg_expr.c 2008-09-27 12:08:28.000000000 +0200
@@ -1,6 +1,5 @@
/*****************************************************************************\
* reg_expr.c
- * $Id: reg_expr.c 3122 2008-03-01 19:06:32Z uwe $
*****************************************************************************
* Copyright (C) 2002-2005 The Regents of the University of California.
* Produced at the Lawrence Livermore National Laboratory.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nvramtool-svn-r3124/reg_expr.h new/nvramtool-svn-r3613/reg_expr.h
--- old/nvramtool-svn-r3124/reg_expr.h 2008-03-01 20:06:32.000000000 +0100
+++ new/nvramtool-svn-r3613/reg_expr.h 2008-09-27 12:08:28.000000000 +0200
@@ -1,6 +1,5 @@
/*****************************************************************************\
* reg_expr.h
- * $Id: reg_expr.h 3122 2008-03-01 19:06:32Z uwe $
*****************************************************************************
* Copyright (C) 2002-2005 The Regents of the University of California.
* Produced at the Lawrence Livermore National Laboratory.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org