AA: flashrom: remove broken msr path change
authorjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Fri, 21 Dec 2012 18:33:26 +0000 (18:33 +0000)
committerjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Fri, 21 Dec 2012 18:33:26 +0000 (18:33 +0000)
Backport of r34832.

This almost caused a nasty accident on my Geos — without the MSR access
it managed to erase *most* of the flash and write the new image, but
didn't manage to change the last few KiB. Thankfully I'd already taken a
copy of the old contents, and could flash them back.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/branches/packages_12.09@34833 3c298f89-4303-0410-b956-a3cf2f4a3e73

utils/flashrom/Makefile
utils/flashrom/patches/001-msr_dev_path.patch [deleted file]

index 354b991..c5f8dc1 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=flashrom
 PKG_VERSION:=0.9.4
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://download.flashrom.org/releases
diff --git a/utils/flashrom/patches/001-msr_dev_path.patch b/utils/flashrom/patches/001-msr_dev_path.patch
deleted file mode 100644 (file)
index d018c72..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
---- a/physmap.c
-+++ b/physmap.c
-@@ -352,7 +352,7 @@ int setup_cpu_msr(int cpu)
- {
-       char msrfilename[64];
-       memset(msrfilename, 0, sizeof(msrfilename));
--      snprintf(msrfilename, sizeof(msrfilename), "/dev/cpu/%d/msr", cpu);
-+      snprintf(msrfilename, sizeof(msrfilename), "/dev/msr%d", cpu);
-       if (fd_msr != -1) {
-               msg_pinfo("MSR was already initialized\n");
-@@ -362,7 +362,8 @@ int setup_cpu_msr(int cpu)
-       fd_msr = open(msrfilename, O_RDWR);
-       if (fd_msr < 0) {
--              perror("Error while opening /dev/cpu/0/msr");
-+              fprintf(stderr, "Error while opening %s: %s\n", msrfilename,
-+                      strerror(errno));
-               msg_pinfo("Did you run 'modprobe msr'?\n");
-               return -1;
-       }