X-Original-To: alpine-aports@lists.alpinelinux.org Received: from mx1.tetrasec.net (mx1.tetrasec.net [74.117.190.25]) by lists.alpinelinux.org (Postfix) with ESMTP id 3995FF854F4 for ; Wed, 26 Jun 2019 12:00:36 +0000 (UTC) Received: from mx1.tetrasec.net (mail.local [127.0.0.1]) by mx1.tetrasec.net (Postfix) with ESMTP id 8C5A49E2646; Wed, 26 Jun 2019 12:00:35 +0000 (UTC) Received: from obsidian.resnet.local (fw.spencertelecom.com [74.117.189.85]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: nangel@tetrasec.net) by mx1.tetrasec.net (Postfix) with ESMTPSA id 356A59E0078; Wed, 26 Jun 2019 12:00:34 +0000 (UTC) From: Nathan Angelacos To: alpine-aports@lists.alpinelinux.org Cc: Nathan Angelacos Subject: [alpine-aports] [PATCH] flashrom: Version bump to 1.1 Date: Wed, 26 Jun 2019 08:00:25 -0400 Message-Id: <20190626120025.13785-1-nangel@alpinelinux.org> X-Mailer: git-send-email 2.22.0 X-Mailinglist: alpine-aports Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable --- main/flashrom/APKBUILD | 16 +-- main/flashrom/libusb_set_option.patch | 11 -- main/flashrom/sst26.patch | 198 -------------------------- 3 files changed, 6 insertions(+), 219 deletions(-) delete mode 100644 main/flashrom/libusb_set_option.patch delete mode 100644 main/flashrom/sst26.patch diff --git a/main/flashrom/APKBUILD b/main/flashrom/APKBUILD index 1a622d50b3..64c153bcb0 100644 --- a/main/flashrom/APKBUILD +++ b/main/flashrom/APKBUILD @@ -1,8 +1,8 @@ # Contributor: Francesco Colista # Maintainer: Nathan Angelacos pkgname=3Dflashrom -pkgver=3D1.0 -pkgrel=3D3 +pkgver=3D1.1 +pkgrel=3D0 pkgdesc=3D"A utility for identifying, reading, writing, verifying and er= asing flash chips" url=3D"https://www.flashrom.org/Flashrom" arch=3D"all" @@ -12,13 +12,11 @@ makedepends=3D"pciutils-dev libusb-compat-dev linux-h= eaders" subpackages=3D"$pkgname-doc" install=3D"$pkgname.post-install" options=3D"!check" # no test suite -source=3D"https://download.flashrom.org/releases/flashrom-$pkgver.tar.bz= 2 - sst26.patch +source=3D"https://download.flashrom.org/releases/flashrom-v${pkgver}.tar= .bz2 musl-ffs.patch - libusb_set_option.patch " =20 -builddir=3D"$srcdir"/$pkgname-$pkgver +builddir=3D"$srcdir"/$pkgname-v${pkgver} =20 build() { cd "$builddir" @@ -30,7 +28,5 @@ package() { make PREFIX=3D"$pkgdir/usr/" install } =20 -sha512sums=3D"355ac1322421b2fd699deb0ceff8555c9e89062e639de674c62f1fdaca= d9ed9351fe89e4c14e22f07a6d4e2e2f070fd4d2ed1cd347a20069f2505966b5c29e0e f= lashrom-1.0.tar.bz2 -545dfadf8d0c53c9b0116af29eb4454b09ec74b2e906258aa7fcedb472957941a405273f= ae8ccd1e2f2ec5a848780a8191fcde80e2714573c76b3cd35ab279fa sst26.patch -371131e37ee0f2ce31b5dd264707b91817a2f0a3654943e6b3430df862d4bb64f27117c1= c94276cb447f5b45f1771b9997f9c96423d68c6dd4565c1e1f442a5e musl-ffs.patch -1b50b760cfc5fc272b8fd87672308737641cca99cbdb79b73005e5d5ac37f371639990eb= 9573e31b23ccf63d364d044e16d9db6f6149203843b1aed91d69f3ab libusb_set_opti= on.patch" +sha512sums=3D"8cb75a7223490fa9dbd65a85d24a87beab68ee03120891a3d8ebf4e8bc= 3d2a2ee640e254ccff657eaf5175e6c2477288337369fa1b1dac110a0903b0c95c1e56 f= lashrom-v1.1.tar.bz2 +371131e37ee0f2ce31b5dd264707b91817a2f0a3654943e6b3430df862d4bb64f27117c1= c94276cb447f5b45f1771b9997f9c96423d68c6dd4565c1e1f442a5e musl-ffs.patch" diff --git a/main/flashrom/libusb_set_option.patch b/main/flashrom/libusb= _set_option.patch deleted file mode 100644 index 8e457fa976..0000000000 --- a/main/flashrom/libusb_set_option.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/ch341a_spi.c -+++ b/ch341a_spi.c -@@ -444,7 +444,7 @@ - return -1; - } -=20 -- libusb_set_debug(NULL, 3); // Enable information, warning and error me= ssages (only). -+ libusb_set_option(NULL, LIBUSB_OPTION_LOG_LEVEL, LIBUSB_LOG_LEVEL_INFO= ); // Enable information, warning and error messages (only). -=20 - uint16_t vid =3D devs_ch341a_spi[0].vendor_id; - uint16_t pid =3D devs_ch341a_spi[0].device_id; diff --git a/main/flashrom/sst26.patch b/main/flashrom/sst26.patch deleted file mode 100644 index 46a01529f7..0000000000 --- a/main/flashrom/sst26.patch +++ /dev/null @@ -1,198 +0,0 @@ ---- flashrom-0.9.9.orig/chipdrivers.h -+++ flashrom-0.9.9/chipdrivers.h -@@ -103,6 +103,7 @@ - int spi_prettyprint_status_register_sst25(struct flashctx *flash); - int spi_prettyprint_status_register_sst25vf016(struct flashctx *flash); - int spi_prettyprint_status_register_sst25vf040b(struct flashctx *flash)= ; -+int spi_disable_blockprotect_sst26_global_unprotect(struct flashctx *fl= ash); -=20 - /* sfdp.c */ - int probe_spi_sfdp(struct flashctx *flash); ---- flashrom-0.9.9.orig/flashchips.c -+++ flashrom-0.9.9/flashchips.c -@@ -12564,6 +12564,120 @@ -=20 - { - .vendor =3D "SST", -+ .name =3D "SST26VF016B(A)", -+ .bustype =3D BUS_SPI, -+ .manufacture_id =3D SST_ID, -+ .model_id =3D SST_SST26VF016B, -+ .total_size =3D 2048, -+ .page_size =3D 256, -+ .feature_bits =3D FEATURE_WRSR_WREN | FEATURE_OTP, -+ .tested =3D TEST_OK_PREW, -+ .probe =3D probe_spi_rdid, -+ .probe_timing =3D TIMING_ZERO, -+ .block_erasers =3D -+ { -+ { -+ .eraseblocks =3D { {4 * 1024, 512} }, -+ .block_erase =3D spi_block_erase_20, -+ }, { -+ .eraseblocks =3D { -+ {8 * 1024, 4}, -+ {32 * 1024, 1}, -+ {64 * 1024, 30}, -+ {32 * 1024, 1}, -+ {8 * 1024, 4}, -+ }, -+ .block_erase =3D spi_block_erase_d8, -+ }, { -+ .eraseblocks =3D { {2 * 1024 * 1024, 1} }, -+ .block_erase =3D spi_block_erase_c7, -+ }, -+ }, -+ .printlock =3D spi_prettyprint_status_register_plain, /* TODO: improv= e */ -+ .unlock =3D spi_disable_blockprotect_sst26_global_unprotect, -+ .write =3D spi_chip_write_256, /* Multi I/O supported */ -+ .read =3D spi_chip_read, /* Fast read (0x0B) and multi I/O supported= */ -+ .voltage =3D {2700, 3600}, -+ }, -+ { -+ .vendor =3D "SST", -+ .name =3D "SST26VF032B(A)", -+ .bustype =3D BUS_SPI, -+ .manufacture_id =3D SST_ID, -+ .model_id =3D SST_SST26VF032B, -+ .total_size =3D 4096, -+ .page_size =3D 256, -+ .feature_bits =3D FEATURE_WRSR_WREN | FEATURE_OTP, -+ .tested =3D TEST_UNTESTED, -+ .probe =3D probe_spi_rdid, -+ .probe_timing =3D TIMING_ZERO, -+ .block_erasers =3D -+ { -+ { -+ .eraseblocks =3D { {4 * 1024, 1024} }, -+ .block_erase =3D spi_block_erase_20, -+ }, { -+ .eraseblocks =3D { -+ {8 * 1024, 4}, -+ {32 * 1024, 1}, -+ {64 * 1024, 62}, -+ {32 * 1024, 1}, -+ {8 * 1024, 4}, -+ }, -+ .block_erase =3D spi_block_erase_d8, -+ }, { -+ .eraseblocks =3D { {4 * 1024 * 1024, 1} }, -+ .block_erase =3D spi_block_erase_c7, -+ }, -+ }, -+ .printlock =3D spi_prettyprint_status_register_plain, /* TODO: improv= e */ -+ .unlock =3D spi_disable_blockprotect_sst26_global_unprotect, -+ .write =3D spi_chip_write_256, /* Multi I/O supported */ -+ .read =3D spi_chip_read, /* Fast read (0x0B) and multi I/O supported= */ -+ .voltage =3D {2700, 3600}, -+ }, -+ -+ -+ { -+ .vendor =3D "SST", -+ .name =3D "SST26VF064B(A)", -+ .bustype =3D BUS_SPI, -+ .manufacture_id =3D SST_ID, -+ .model_id =3D SST_SST26VF064B, -+ .total_size =3D 8192, -+ .page_size =3D 256, -+ .feature_bits =3D FEATURE_WRSR_WREN | FEATURE_OTP, -+ .tested =3D TEST_OK_PREW, -+ .probe =3D probe_spi_rdid, -+ .probe_timing =3D TIMING_ZERO, -+ .block_erasers =3D -+ { -+ { -+ .eraseblocks =3D { {4 * 1024, 2048} }, -+ .block_erase =3D spi_block_erase_20, -+ }, { -+ .eraseblocks =3D { -+ {8 * 1024, 4}, -+ {32 * 1024, 1}, -+ {64 * 1024, 126}, -+ {32 * 1024, 1}, -+ {8 * 1024, 4}, -+ }, -+ .block_erase =3D spi_block_erase_d8, -+ }, { -+ .eraseblocks =3D { {8 * 1024 * 1024, 1} }, -+ .block_erase =3D spi_block_erase_c7, -+ }, -+ }, -+ .printlock =3D spi_prettyprint_status_register_plain, /* TODO: improv= e */ -+ .unlock =3D spi_disable_blockprotect_sst26_global_unprotect, -+ .write =3D spi_chip_write_256, /* Multi I/O supported */ -+ .read =3D spi_chip_read, /* Fast read (0x0B) and multi I/O supported= */ -+ .voltage =3D {2700, 3600}, -+ }, -+ -+ { -+ .vendor =3D "SST", - .name =3D "SST25WF512", - .bustype =3D BUS_SPI, - .manufacture_id =3D SST_ID, ---- flashrom-0.9.9.orig/flashchips.h -+++ flashrom-0.9.9/flashchips.h -@@ -697,6 +697,8 @@ - #define SST_SST25VF064C 0x254B - #define SST_SST26VF016 0x2601 - #define SST_SST26VF032 0x2602 -+#define SST_SST26VF016B 0x2641 -+#define SST_SST26VF032B 0x2642 - #define SST_SST26VF064B 0x2643 - #define SST_SST27SF512 0xA4 - #define SST_SST27SF010 0xA5 ---- flashrom-0.9.9.orig/linux_spi.c -+++ flashrom-0.9.9/linux_spi.c -@@ -141,6 +141,16 @@ - return 0; - } -=20 -+static void print_hex(const char *msg, const void *buf, size_t len) -+{ -+ size_t i; -+ msg_pspew("%s:\n", msg); -+ for (i =3D 0; i < len; i++) { -+ msg_pspew(" %02x", ((uint8_t *)buf)[i]); -+ } -+ msg_pspew("\n"); -+} -+ - static int linux_spi_send_command(struct flashctx *flash, unsigned int = writecnt, - unsigned int readcnt, - const unsigned char *txbuf, -@@ -172,10 +182,12 @@ - else - iocontrol_code =3D SPI_IOC_MESSAGE(2); -=20 -+ print_hex("Write", txbuf, writecnt); - if (ioctl(fd, iocontrol_code, msg) =3D=3D -1) { - msg_cerr("%s: ioctl: %s\n", __func__, strerror(errno)); - return -1; - } -+ if (readcnt) print_hex("Got", rxbuf, readcnt); - return 0; - } -=20 ---- flashrom-0.9.9.orig/spi25_statusreg.c -+++ flashrom-0.9.9/spi25_statusreg.c -@@ -196,6 +196,19 @@ - return spi_disable_blockprotect_generic(flash, 0x3C, 0, 0, 0xFF); - } -=20 -+int spi_disable_blockprotect_sst26_global_unprotect(struct flashctx *fl= ash) -+{ -+ int result =3D spi_write_enable(flash); -+ if (result) -+ return result; -+ -+ static const unsigned char cmd[] =3D { 0x98 }; /* ULBPR */ -+ result =3D spi_send_command(flash, sizeof(cmd), 0, cmd, NULL); -+ if (result) -+ msg_cerr("ULBPR failed\n"); -+ return result; -+} -+ - /* A common block protection disable that tries to unset the status reg= ister bits masked by 0x0C (BP0-1) and - * protected/locked by bit #7. Useful when bits 4-5 may be non-0). */ - int spi_disable_blockprotect_bp1_srwd(struct flashctx *flash) --=20 2.22.0 --- Unsubscribe: alpine-aports+unsubscribe@lists.alpinelinux.org Help: alpine-aports+help@lists.alpinelinux.org ---