Author: stefanct
Date: Wed Aug 14 16:47:26 2013
New Revision: 1713
URL: http://flashrom.org/trac/flashrom/changeset/1713
Log:
Add getrevision.sh utility script.
This allows to retrieve various data from SCM systems (git and svn) and
use them in the build process to better indicate which source was used.
For now only use it for the upstream (i.e. svn) revision number, which
was previously implemented by an awful line in the Makefile.
Signed-Off-By: David Hendricks <dhendrix(a)google.com>
Acked-by: Stefan Tauner <stefan.tauner(a)student.tuwien.ac.at>
Added:
trunk/util/getrevision.sh (contents, props changed)
Modified:
trunk/Makefile
Modified: trunk/Makefile
==============================================================================
--- trunk/Makefile Wed Aug 14 16:41:29 2013 (r1712)
+++ trunk/Makefile Wed Aug 14 16:47:26 2013 (r1713)
@@ -326,7 +326,7 @@
# of the checked out flashrom files.
# Note to packagers: Any tree exported with "make export" or "make tarball"
# will not require subversion. The downloadable snapshots are already exported.
-SVNVERSION := $(shell LC_ALL=C svnversion -cn . 2>/dev/null | sed -e "s/.*://" -e "s/\([0-9]*\).*/\1/" | grep "[0-9]" || LC_ALL=C svn info . 2>/dev/null | awk '/^Revision:/ {print $$2 }' | grep "[0-9]" || LC_ALL=C git svn info . 2>/dev/null | awk '/^Revision:/ {print $$2 }' | grep "[0-9]" || echo unknown)
+SVNVERSION := $(shell ./util/getrevision.sh -u)
RELEASE := 0.9.7
VERSION := $(RELEASE)-r$(SVNVERSION)
Added: trunk/util/getrevision.sh
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/util/getrevision.sh Wed Aug 14 16:47:26 2013 (r1713)
@@ -0,0 +1,228 @@
+#!/bin/sh
+#
+# This file is part of the flashrom project.
+#
+# Copyright (C) 2005 coresystems GmbH <stepan(a)coresystems.de>
+# Copyright (C) 2009,2010 Carl-Daniel Hailfinger
+# Copyright (C) 2010 Chromium OS Authors
+#
+# 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; either version 2 of the License, or
+# (at your option) any later version.
+#
+# 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
+#
+
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+
+svn_revision() {
+ LC_ALL=C svnversion -cn . 2>/dev/null | \
+ sed -e "s/.*://" -e "s/\([0-9]*\).*/\1/" | \
+ grep "[0-9]" ||
+ LC_ALL=C svn info . 2>/dev/null | \
+ awk '/^Revision:/ {print $$2 }' | \
+ grep "[0-9]" ||
+ LC_ALL=C git svn info . 2>/dev/null | \
+ awk '/^Revision:/ {print $$2 }' | \
+ grep "[0-9]" ||
+ echo ''
+}
+
+svn_url() {
+ echo $(LC_ALL=C svn info 2>/dev/null |
+ grep URL: |
+ sed 's/.*URL:[[:blank:]]*//' |
+ grep ^.
+ )
+}
+
+svn_timestamp() {
+ local date_format="+%Y-%m-%d %H:%M:%S"
+ local timestamp
+
+ # are there local changes in the client?
+ if svn status | egrep '^ *[ADMR] *' > /dev/null ; then
+ timestamp=$(date "${date_format} +")
+ else
+ # No local changes, get date of the last log record.
+ local last_commit_date=$(svn info | grep '^Last Changed Date:' | \
+ awk '{print $4" "$5" "$6}')
+ timestamp=$(date --utc --date "${last_commit_date}" \
+ "${date_format} UTC")
+ fi
+
+ echo "${timestamp}"
+}
+
+git_revision() {
+ echo $(git log --oneline | head -1 | awk '{print $1}')
+}
+
+# Retrieve svn revision using git log data (for git mirrors)
+gitsvn_revision() {
+ local r
+
+ git log|
+ grep git-svn-id|
+ sed 's/.*git-svn-id:[[:blank:]]*\([^@]\+\)@[0-9]\+[[:blank:]]\+\([^[:blank:]]\+\)/\1 \2/'|
+ sort|
+ uniq|
+ read url uuid
+
+ r=$(git log --grep="git-svn-id.*$uuid"| grep git-svn-id | \
+ sed 's/.*@//;s/[[:blank:]].*//'| \
+ sort -n | \
+ tail -1)
+
+ echo "${r}"
+}
+
+git_timestamp() {
+ local date_format="+%b %d %Y %H:%M:%S"
+ local timestamp
+
+ # are there local changes in the client?
+ if git status | \
+ egrep '^# Change(s to be committed|d but not updated):$' > /dev/null
+ then
+ timestamp=$(date "${date_format} +")
+ else
+ # No local changes, get date of the last log record.
+ local last_commit_date=$(git log | head -3 | grep '^Date:' | \
+ awk '{print $3" "$4" "$6" "$5" "$7}')
+ timestamp=$(date --utc --date "${last_commit_date}" \
+ "${date_format} UTC")
+ fi
+
+ echo "${timestamp}"
+}
+
+git_url() {
+ # Only the first line of `git remote' is considered.
+ echo $(LC_ALL=C git remote show origin 2>/dev/null |
+ grep 'Fetch URL:' |
+ sed 's/.*URL:[[:blank:]]*//' |
+ grep ^.
+ )
+}
+
+scm_url() {
+ local url
+
+ if [ -d ".svn" ] ; then
+ url=$(svn_url)
+ elif [ -d ".git" ] ; then
+ url=$(git_url)
+ fi
+
+ echo "${url}"
+}
+
+# Retrieve timestamp since last modification. If the sources are pristine,
+# then the timestamp will match that of the SCM's more recent modification
+# date.
+timestamp() {
+ local t
+
+ if [ -d ".svn" ] ; then
+ t=$(svn_timestamp)
+ elif [ -d ".git" ] ; then
+ t=$(git_timestamp)
+ fi
+
+ echo ${t}
+}
+
+# Retrieve local SCM revision info. This is useful if we're working in
+# a even different SCM than upstream.
+#
+# If local copy is svn, then there is nothing to do here.
+# If local copy is git, then retrieve useful git revision info
+local_revision() {
+ local r
+
+ if [ -d ".git" ] ; then
+ r=$(git_revision)
+ fi
+
+ echo ${r}
+}
+
+# Get the upstream flashrom revision stored in SVN metadata.
+#
+# If the local copy is svn, then use svnversion
+# If the local copy is git, then scrape upstream revision from git logs
+upstream_revision() {
+ local r
+
+ if [ -d ".svn" ] ; then
+ r=$(svn_revision)
+ elif [ -d ".git" ] ; then
+ r=$(gitsvn_revision)
+ fi
+
+ echo "${r}"
+}
+
+show_help() {
+ echo "Usage:
+ ${0} <option>
+
+Options
+ -h or --help
+ Display this message.
+ -u or --upstream
+ upstream flashrom revision
+ -l or --local
+ local revision (if different from upstream)
+ -t or --timestamp
+ timestamp of most recent modification
+ -U or --url
+ url associated with local copy of flashrom
+ "
+ return
+}
+
+if [ ! -n "${1}" ]
+then
+ show_help;
+ echo "No options specified";
+ exit ${EXIT_SUCCESS}
+fi
+
+# The is the main loop
+while [[ ${1} = -* ]];
+do
+ case ${1} in
+ -h|--help)
+ show_help;
+ shift;;
+ -u|--upstream)
+ echo "$(upstream_revision)";
+ shift;;
+ -l|--local)
+ echo "$(local_revision)";
+ shift;;
+ -t|--timestamp)
+ echo "$(timestamp)";
+ shift;;
+ -U|--url)
+ echo "$(scm_url)";
+ shift;;
+ *)
+ show_help;
+ echo "invalid option: ${1}"
+ exit ${EXIT_FAILURE}
+ esac;
+done
+
+exit ${EXIT_SUCCESS}
Author: stefanct
Date: Wed Aug 14 16:41:29 2013
New Revision: 1712
URL: http://flashrom.org/trac/flashrom/changeset/1712
Log:
Create flashrom 0.9.7 stable branch.
For backporting important patches and tagging subsequent 0.9.7 service releases.
Signed-off-by: Stefan Tauner <stefan.tauner(a)student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner(a)student.tuwien.ac.at>
Added:
branches/0.9.7/
- copied from r1711, tags/flashrom-0.9.7/
With patch:
san@flashrom:~/flashrom/P4$ flashrom -V -w P4.rom
flashrom v0.9.6.1-r1704 on Linux 3.5.0-23-generic (i686)
flashrom is free software, get the source code at http://www.flashrom.org
flashrom was built with libpci 3.1.8, GCC 4.6.3, little endian
Command line (3 args): flashrom -V -w P4.rom
Please select a programmer with the --programmer parameter.
Previously this was not necessary because there was a default set.
To choose the mainboard of this computer use 'internal'. Valid choices are:
internal, dummy, nic3com, nicrealtek, gfxnvidia, drkaiser, satasii,
ft2232_spi,
serprog, buspirate_spi, rayer_spi, pony_spi, nicintel, nicintel_spi,
ogp_spi,
satamv, linux_spi, usbblaster_spi.
san@flashrom:~/flashrom/P4$ flashrom -V -w P4.rom --programmer internal
flashrom v0.9.6.1-r1704 on Linux 3.5.0-23-generic (i686)
flashrom is free software, get the source code at http://www.flashrom.org
flashrom was built with libpci 3.1.8, GCC 4.6.3, little endian
Command line (5 args): flashrom -V -w P4.rom --programmer internal
Calibrating delay loop... OS timer resolution is 13 usecs, 727M loops per
second, 10 myus = 19 us, 100 myus = 2518 us, 1000 myus = 1153 us, 10000
myus = 11277 us, 52 myus = 57 us, OK.
Initializing internal programmer
ERROR: Could not get I/O privileges (Operation not permitted).
You need to be root.
Error: Programmer initialization failed.
san@flashrom:~/flashrom/P4$ sudo flashrom -V -w P4.rom --programmer
internal
[sudo] password for san:
flashrom v0.9.6.1-r1704 on Linux 3.5.0-23-generic (i686)
flashrom is free software, get the source code at http://www.flashrom.org
flashrom was built with libpci 3.1.8, GCC 4.6.3, little endian
Command line (5 args): flashrom -V -w P4.rom --programmer internal
Calibrating delay loop... OS timer resolution is 12 usecs, 512M loops per
second, delay more than 10% too short (got 63% of expected delay),
recalculating... 713M loops per second, 10 myus = 19 us, 100 myus = 3282
us, 1000 myus = 835 us, 10000 myus = 22949 us, 48 myus = 53 us, OK.
Initializing internal programmer
No coreboot table found.
DMI string system-manufacturer: " "
DMI string system-product-name: " "
DMI string system-version: " "
DMI string baseboard-manufacturer: " "
DMI string baseboard-product-name: "i845E-PC87366"
DMI string baseboard-version: " "
DMI string chassis-type: "Desktop"
W836xx enter config mode worked or we were already in config mode. W836xx
leave config mode had no effect.
Active config mode, unknown reg 0x20 ID: e9.
Please send the output of "flashrom -V" to
flashrom(a)flashrom.org with W836xx: your board name: flashrom -V
as the subject to help us finish support for your Super I/O. Thanks.
Found chipset "Intel ICH4/ICH4-L" with PCI ID 8086:24c0. Enabling flash
write...
BIOS_CNTL = 0x01: BIOS Lock Enable: disabled, BIOS Write Enable: enabled
OK.
The following protocols are supported: FWH.
Probing for Atmel AT49LH002, 256 kB: probe_82802ab: id1 0x25, id2 0x82, id1
is normal flash content, id2 is normal flash content
Probing for Intel 82802AB, 512 kB: probe_82802ab: id1 0x25, id2 0x82, id1
is normal flash content, id2 is normal flash content
Probing for Intel 82802AC, 1024 kB: probe_82802ab: id1 0x25, id2 0x82, id1
is normal flash content, id2 is normal flash content
Probing for PMC Pm49FL002, 256 kB: probe_jedec_common: id1 0xbf, id2 0x57
Probing for PMC Pm49FL004, 512 kB: probe_jedec_common: id1 0xbf, id2 0x57
Probing for Sharp LHF00L04, 1024 kB: probe_82802ab: id1 0x25, id2 0x82, id1
is normal flash content, id2 is normal flash content
Probing for SST SST49LF002A/B, 256 kB: probe_jedec_common: id1 0xbf, id2
0x57
Found SST flash chip "SST49LF002A/B" (256 kB, FWH) at physical address
0xfffc0000.
Lock status for 0x000000 (size 0x004000) is 01, write locked
Lock status for 0x004000 (size 0x004000) is 00, full access
Lock status for 0x008000 (size 0x004000) is 01, write locked
Lock status for 0x00c000 (size 0x004000) is 00, full access
Lock status for 0x010000 (size 0x004000) is 01, write locked
Lock status for 0x014000 (size 0x004000) is 00, full access
Lock status for 0x018000 (size 0x004000) is 01, write locked
Lock status for 0x01c000 (size 0x004000) is 00, full access
Lock status for 0x020000 (size 0x004000) is 01, write locked
Lock status for 0x024000 (size 0x004000) is 00, full access
Lock status for 0x028000 (size 0x004000) is 01, write locked
Lock status for 0x02c000 (size 0x004000) is 00, full access
Lock status for 0x030000 (size 0x004000) is 01, write locked
Lock status for 0x034000 (size 0x004000) is 00, full access
Lock status for 0x038000 (size 0x004000) is 01, write locked
Lock status for 0x03c000 (size 0x004000) is 00, full access
Probing for SST SST49LF003A/B, 384 kB: probe_jedec_common: id1 0xbf, id2
0x57
Probing for SST SST49LF004A/B, 512 kB: probe_jedec_common: id1 0xbf, id2
0x57
Probing for SST SST49LF004C, 512 kB: probe_82802ab: id1 0x25, id2 0x82, id1
is normal flash content, id2 is normal flash content
Probing for SST SST49LF008A, 1024 kB: probe_jedec_common: id1 0xbf, id2 0x57
Probing for SST SST49LF008C, 1024 kB: probe_82802ab: id1 0x25, id2 0x82,
id1 is normal flash content, id2 is normal flash content
Probing for SST SST49LF016C, 2048 kB: probe_82802ab: id1 0xff, id2 0xff,
id1 parity violation, id1 is normal flash content, id2 is normal flash
content
Probing for ST M50FLW040A, 512 kB: probe_82802ab: id1 0x25, id2 0x82, id1
is normal flash content, id2 is normal flash content
Probing for ST M50FLW040B, 512 kB: probe_82802ab: id1 0x25, id2 0x82, id1
is normal flash content, id2 is normal flash content
Probing for ST M50FLW080A, 1024 kB: probe_82802ab: id1 0x25, id2 0x82, id1
is normal flash content, id2 is normal flash content
Probing for ST M50FLW080B, 1024 kB: probe_82802ab: id1 0x25, id2 0x82, id1
is normal flash content, id2 is normal flash content
Probing for ST M50FW002, 256 kB: probe_82802ab: id1 0x25, id2 0x82, id1 is
normal flash content, id2 is normal flash content
Probing for ST M50FW016, 2048 kB: probe_82802ab: id1 0xff, id2 0xff, id1
parity violation, id1 is normal flash content, id2 is normal flash content
Probing for ST M50FW040, 512 kB: probe_82802ab: id1 0x25, id2 0x82, id1 is
normal flash content, id2 is normal flash content
Probing for ST M50FW080, 1024 kB: probe_82802ab: id1 0x25, id2 0x82, id1 is
normal flash content, id2 is normal flash content
Probing for Winbond W39V040FA, 512 kB: probe_jedec_common: id1 0xbf, id2
0x57
Probing for Winbond W39V040FB, 512 kB: probe_jedec_common: id1 0xbf, id2
0x57
Probing for Winbond W39V040FC, 512 kB: probe_jedec_common: id1 0xbf, id2
0x57
Probing for Winbond W49V002FA, 256 kB: probe_jedec_common: id1 0xbf, id2
0x57
Probing for Winbond W39V080FA, 1024 kB: probe_jedec_common: id1 0xbf, id2
0x57
Probing for Winbond W39V080FA (dual mode), 512 kB: probe_jedec_common: id1
0xbf, id2 0x57
Found SST flash chip "SST49LF002A/B" (256 kB, FWH).
Lock status for 0x000000 (size 0x004000) is 01, write locked
Trying to clear lock for 0x000000... Lock status for 0x000000 (size
0x004000) is 00, full access
OK
Lock status for 0x004000 (size 0x004000) is 00, full access
Lock status for 0x008000 (size 0x004000) is 01, write locked
Trying to clear lock for 0x008000... Lock status for 0x008000 (size
0x004000) is 00, full access
OK
Lock status for 0x00c000 (size 0x004000) is 00, full access
Lock status for 0x010000 (size 0x004000) is 01, write locked
Trying to clear lock for 0x010000... Lock status for 0x010000 (size
0x004000) is 00, full access
OK
Lock status for 0x014000 (size 0x004000) is 00, full access
Lock status for 0x018000 (size 0x004000) is 01, write locked
Trying to clear lock for 0x018000... Lock status for 0x018000 (size
0x004000) is 00, full access
OK
Lock status for 0x01c000 (size 0x004000) is 00, full access
Lock status for 0x020000 (size 0x004000) is 01, write locked
Trying to clear lock for 0x020000... Lock status for 0x020000 (size
0x004000) is 00, full access
OK
Lock status for 0x024000 (size 0x004000) is 00, full access
Lock status for 0x028000 (size 0x004000) is 01, write locked
Trying to clear lock for 0x028000... Lock status for 0x028000 (size
0x004000) is 00, full access
OK
Lock status for 0x02c000 (size 0x004000) is 00, full access
Lock status for 0x030000 (size 0x004000) is 01, write locked
Trying to clear lock for 0x030000... Lock status for 0x030000 (size
0x004000) is 00, full access
OK
Lock status for 0x034000 (size 0x004000) is 00, full access
Lock status for 0x038000 (size 0x004000) is 01, write locked
Trying to clear lock for 0x038000... Lock status for 0x038000 (size
0x004000) is 00, full access
OK
Lock status for 0x03c000 (size 0x004000) is 00, full access
Flash image seems to be a legacy BIOS. Disabling coreboot-related checks.
Reading old flash chip contents... done.
Erasing and writing flash chip... Trying erase function 0...
0x000000-0x000fff:S, 0x001000-0x001fff:S, 0x002000-0x002fff:S,
0x003000-0x003fff:S, 0x004000-0x004fff:S, 0x005000-0x005fff:S,
0x006000-0x006fff:S, 0x007000-0x007fff:S, 0x008000-0x008fff:S,
0x009000-0x009fff:S, 0x00a000-0x00afff:S, 0x00b000-0x00bfff:S,
0x00c000-0x00cfff:S, 0x00d000-0x00dfff:S, 0x00e000-0x00efff:S,
0x00f000-0x00ffff:S, 0x010000-0x010fff:S, 0x011000-0x011fff:S,
0x012000-0x012fff:S, 0x013000-0x013fff:S, 0x014000-0x014fff:S,
0x015000-0x015fff:S, 0x016000-0x016fff:S, 0x017000-0x017fff:S,
0x018000-0x018fff:S, 0x019000-0x019fff:S, 0x01a000-0x01afff:S,
0x01b000-0x01bfff:S, 0x01c000-0x01cfff:S, 0x01d000-0x01dfff:S,
0x01e000-0x01efff:S, 0x01f000-0x01ffff:S, 0x020000-0x020fff:S,
0x021000-0x021fff:S, 0x022000-0x022fff:S, 0x023000-0x023fff:S,
0x024000-0x024fff:S, 0x025000-0x025fff:S, 0x026000-0x026fff:S,
0x027000-0x027fff:S, 0x028000-0x028fff:S, 0x029000-0x029fff:S,
0x02a000-0x02afff:S, 0x02b000-0x02bfff:S, 0x02c000-0x02cfff:S,
0x02d000-0x02dfff:S, 0x02e000-0x02efff:S, 0x02f000-0x02ffff:S,
0x030000-0x030fff:S, 0x031000-0x031fff:S, 0x032000-0x032fff:S,
0x033000-0x033fff:S, 0x034000-0x034fff:S, 0x035000-0x035fff:S,
0x036000-0x036fff:S, 0x037000-0x037fff:S, 0x038000-0x038fff:S,
0x039000-0x039fff:S, 0x03a000-0x03afff:S, 0x03b000-0x03bfff:S,
0x03c000-0x03cfff:S, 0x03d000-0x03dfff:S, 0x03e000-0x03efff:S,
0x03f000-0x03ffff:EFAILED at 0x0003f015! Expected=0xff, Found=0x20, failed
byte count from 0x0003f000-0x0003ffff: 0xfbc
ERASE FAILED!
Reading current flash chip contents... done. Looking for another erase
function.
Trying erase function 1... 0x000000-0x003fff:S, 0x004000-0x007fff:S,
0x008000-0x00bfff:S, 0x00c000-0x00ffff:S, 0x010000-0x013fff:S,
0x014000-0x017fff:S, 0x018000-0x01bfff:S, 0x01c000-0x01ffff:S,
0x020000-0x023fff:S, 0x024000-0x027fff:S, 0x028000-0x02bfff:S,
0x02c000-0x02ffff:S, 0x030000-0x033fff:S, 0x034000-0x037fff:S,
0x038000-0x03bfff:S, 0x03c000-0x03ffff:EFAILED at 0x0003c000!
Expected=0xff, Found=0xe8, failed byte count from 0x0003c000-0x0003ffff:
0x3e4b
ERASE FAILED!
Looking for another erase function.
No usable erase functions left.
FAILED!
Uh oh. Erase/write failed. Checking if anything changed.
Good. It seems nothing was changed.
Writing to the flash chip apparently didn't do anything.
This means we have to add special support for your board, programmer or
flash
chip. Please report this on IRC at chat.freenode.net (channel #flashrom) or
mail flashrom(a)flashrom.org, thanks!
-------------------------------------------------------------------------------
You may now reboot or simply leave the machine running.
Restoring PCI config space for 00:1f:0 reg 0x4e
2013/8/3 Maciej Pijanka <maciej.pijanka(a)agaran.kernel.pl>
> On Sat, 27 Jul 2013, san wrote:
>
> > nie bangla
>
> Bez logów i lspci nikt nie wrzuci tego patcha do flashroma na stałe nawet
> jako
> niesprawdzonego.
>
>
> >
> > 2013/7/26 san <san(a)plusnet.pl>
> >
> > > właśnie się tym zajmowałem ;)
> > >
> > >
> > > 2013/7/26 Maciej Pijanka <maciej.pijanka(a)agaran.kernel.pl>
> > >
> > >> On Fri, 26 Jul 2013, san wrote:
> > >>
> > >> > W następnym mailu napisał, ze to jednak nie zadziała.
> > >>
> > >> Imo można sprawdzić, jak nie zadziała, to nie zrobi nic zupełnie.
> > >>
> > >> > 26 lip 2013 13:21, "Maciej Pijanka" <
> maciej.pijanka(a)agaran.kernel.pl>
> > >> > napisał(a):
> > >> >
> > >> > > On Fri, 26 Jul 2013, san wrote:
> > >> > >
> > >> > > > Yeah, i tried to understand it about three times...
> > >> > > >
> > >> > > > I'll try again, tommorow. Only thing i found is
> > >> > > >
> > >> > >
> > >> > > Trzeba wziąść zródła z SVN, nałożyć łatkę która wysłał 2 maile
> temu
> > >> stefan
> > >> > > (w
> > >> > > załaczniku), skompilować, odpalić z -V zapis (czyli -V -w <plik>)
> > >> > > Plik powinien różnić się od zawartości romu czyli jakiś nowszy
> jest
> > >> > > potrzebny,
> > >> > > bo inaczej test zapisu jest niewiarygodny.
> > >> > >
> > >> > > ponadto potrzebny jest wynik lspci -nnv zeby poprawić łatkę tak by
> > >> działała
> > >> > > tylko dla jednej konkretnej płyty a nie losowych, czyli mogła
> zostać
> > >> > > wrzucona
> > >> > > do zródeł flashroma do repozytorium bo w takiej postaci jak w
> > >> załaczniku
> > >> > > nie
> > >> > > może zostać commitnięta.
> > >> > >
> > >> > > /Cut/
> > >> > >
> > >> > > >
> > >> > > > but have no idea how to use it...
> > >> > > > best regards.
> > >> > > >
> > >> > > >
> > >> > > > 2013/7/25 Stefan Tauner <stefan.tauner(a)student.tuwien.ac.at>
> > >> > > >
> > >> > > > > On Thu, 25 Jul 2013 21:31:01 +0200
> > >> > > > > Stefan Tauner <stefan.tauner(a)student.tuwien.ac.at> wrote:
> > >> > > > >
> > >> > > > > > You can also set this somehow with pciset as you know, I am
> > >> just not
> > >> > > > > > entirely sure about the exact commands.
> > >> > > > > > you would need to get the gpiobase first with
> > >> > > > > > setpci -s 00:1f.0 58.l
> > >> > > > > > (only bits 6-15 are the base address see datasheet)
> > >> > > > > > and then fetch the old value with
> > >> > > > > > setpci -s 0:1f.0 gpiobase+0x0c
> > >> > > > > > and set it with
> > >> > > > > > setpci -s 0:1f.0 gpiobase+0x0c=...
> > >> > > > >
> > >> > > > > Actually this can't work out (thanks to Kyösti for pointing
> that
> > >> out).
> > >> > > > > Because the gpiobase address is in the separated i/o address
> > >> space of
> > >> > > > > the cpu. "The control for the general purpose I/O signals is
> > >> handled
> > >> > > > > through a separate 64-byte I/O space."
> > >> > > > > I am not aware of any distributed binaries that work similar
> to
> > >> setpci
> > >> > > > > but in the i/o space, so you would need to program your own...
> > >> like the
> > >> > > > > one described here:
> > >> > > > > http://flashrom.org/Board_Enable
> > >> > > > >
> > >> > > > > --
> > >> > > > > Kind regards/Mit freundlichen Grüßen, Stefan Tauner
> > >> > > > >
> > >> > > >
> > >> > > >
> > >> > > >
> > >> > > > --
> > >> > > > [ e-San.info | San(a)plusnet.pl ]
> > >> > >
> > >> > > > _______________________________________________
> > >> > > > flashrom mailing list
> > >> > > > flashrom(a)flashrom.org
> > >> > > > http://www.flashrom.org/mailman/listinfo/flashrom
> > >> > >
> > >> > >
> > >> > > --
> > >> > > Maciej Pijanka
> > >> > > I don't fear computers, I fear lack of them -- Isaac Asimov
> > >> > >
> > >>
> > >> --
> > >> Maciej Pijanka
> > >> I don't fear computers, I fear lack of them -- Isaac Asimov
> > >>
> > >
> > >
> > >
> > > --
> > > [ e-San.info | San(a)plusnet.pl ]
> > >
> >
> >
> >
> > --
> > [ e-San.info | San(a)plusnet.pl ]
>
> --
> Maciej Pijanka
> I don't fear computers, I fear lack of them -- Isaac Asimov
>
--
[ e-San.info | San(a)plusnet.pl ]
An unused programmer parameter is a sign that the user wanted to either
do something not supported by the programmer or misspelled a parameter
which may be essential for the given programmer. Aborting is the only
safe choice.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006(a)gmx.net>
Index: flashrom-abort_unused_programmer_param/flashrom.c
===================================================================
--- flashrom-abort_unused_programmer_param/flashrom.c (Revision 1706)
+++ flashrom-abort_unused_programmer_param/flashrom.c (Arbeitskopie)
@@ -389,13 +389,14 @@
programmer_may_write = 1;
programmer_param = param;
- msg_pdbg("Initializing %s programmer\n",
- programmer_table[programmer].name);
+ msg_pdbg("Initializing %s programmer\n", programmer_table[programmer].name);
ret = programmer_table[programmer].init();
if (programmer_param && strlen(programmer_param)) {
- msg_perr("Unhandled programmer parameters: %s\n",
- programmer_param);
- /* Do not error out here, the init itself was successful. */
+ msg_perr("Unhandled programmer parameters: %s\n", programmer_param);
+ msg_perr("Aborting.\n");
+ /* Do not overwrite any error code from programmer init. */
+ if (!ret)
+ ret = ERROR_FATAL;
}
return ret;
}
--
http://www.hailfinger.org/
Author: hailfinger
Date: Tue Aug 13 09:09:57 2013
New Revision: 1708
URL: http://flashrom.org/trac/flashrom/changeset/1708
Log:
An unused programmer parameter is a sign that the user wanted to either
do something not supported by the programmer or misspelled a parameter
which may be essential for the given programmer. Aborting is the only
safe choice. If the programmer parameter is unused because of an error
during programmer init, aborting would have happened anyway due to that
error.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006(a)gmx.net>
Acked-by: Stefan Tauner <stefan.tauner(a)student.tuwien.ac.at>
Modified:
trunk/flashrom.c
Modified: trunk/flashrom.c
==============================================================================
--- trunk/flashrom.c Tue Aug 13 00:58:43 2013 (r1707)
+++ trunk/flashrom.c Tue Aug 13 09:09:57 2013 (r1708)
@@ -392,13 +392,23 @@
programmer_may_write = 1;
programmer_param = param;
- msg_pdbg("Initializing %s programmer\n",
- programmer_table[programmer].name);
+ msg_pdbg("Initializing %s programmer\n", programmer_table[programmer].name);
ret = programmer_table[programmer].init();
if (programmer_param && strlen(programmer_param)) {
- msg_perr("Unhandled programmer parameters: %s\n",
- programmer_param);
- /* Do not error out here, the init itself was successful. */
+ if (ret != 0) {
+ /* It is quite possible that any unhandled programmer parameter would have been valid,
+ * but an error in actual programmer init happened before the parameter was evaluated.
+ */
+ msg_pwarn("Unhandled programmer parameters (possibly due to another failure): %s\n",
+ programmer_param);
+ } else {
+ /* Actual programmer init was successful, but the user specified an invalid or unusable
+ * (for the current programmer configuration) parameter.
+ */
+ msg_perr("Unhandled programmer parameters: %s\n", programmer_param);
+ msg_perr("Aborting.\n");
+ ret = ERROR_FATAL;
+ }
}
return ret;
}