diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-03-13 06:46:47 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-03-13 06:46:47 +0000 |
commit | afb19abe0ec73761b4e330ee952a19e98d4bc7e3 (patch) | |
tree | c831ae0927550faddb9a37c12b33f38c1b376073 /sys-apps/flashrom | |
parent | 360468f13add58583c7780bcacafb5452a07851d (diff) |
gentoo auto-resync : 13:03:2024 - 06:46:47
Diffstat (limited to 'sys-apps/flashrom')
-rw-r--r-- | sys-apps/flashrom/Manifest | 2 | ||||
-rw-r--r-- | sys-apps/flashrom/files/flashrom-1.3.0-c99.patch | 59 | ||||
-rw-r--r-- | sys-apps/flashrom/flashrom-1.3.0-r2.ebuild | 133 |
3 files changed, 194 insertions, 0 deletions
diff --git a/sys-apps/flashrom/Manifest b/sys-apps/flashrom/Manifest index 77cdfe70f82d..5781d2e48cbf 100644 --- a/sys-apps/flashrom/Manifest +++ b/sys-apps/flashrom/Manifest @@ -1,9 +1,11 @@ AUX flashrom-1.2_meson-fixes.patch 7977 BLAKE2B 5ac9e09c6fbcf08f36da1fc874511f7023338b0bffe775c61be9f7c253d6d8343833ec64ff86dc3b4733e90e67435e3cc0d52e6ae11c8d368fe2f21b6a85bc59 SHA512 a0e30c2a87775342302fabfd594c91015b6ea9fba71a7d1b294c399a8336167f85b07fdcc2ff80174cc43362ef5ca28965571ca52e1a76922ef59dcb15991664 AUX flashrom-1.2_meson-install-manpage.patch 1208 BLAKE2B a4290c046d82a7c8b8dbfba0d58abed2384506d761272929ca7972c68a92a314de2ad17af5bd49cb86af5fea119d36fb126c45febdd5ac99210949158d33fc75 SHA512 1345bc880317e37d028bc3d40c98e5b5b4b17c7cde18d3b17762c9792cf0e4ac19613702ae1d367937f86dd3dbb02732851774d91ef1372e5bbb8f998346526d +AUX flashrom-1.3.0-c99.patch 2134 BLAKE2B d1f0216a5281719972208d22ae31ca19fd6e34d10f3e2c9fb9e9633ea04fe989fd9fbe47939b2f1a9a51f99dd7ca450c479ad3abbcda9f61488d3fd8b4ee1209 SHA512 5c1c8a9663f1d584a4a27a8826062127be9ac2737d40a41c90a3e955c293c7151ed6038cbeaf41cdcb5b28ec654024e9d7ec83f7a22a3c7128cf0074b57f1adb AUX flashrom-1.3.0_spi-master.patch 9106 BLAKE2B 594a921aa48ceb67a6370080a0b51665efde24844e3523eaa84d69d49a1384272553bd5dae0642dd8540e13ba67e6d8feb2ac6edfc95949bd0edd8a2eaa164c8 SHA512 78d08c853d9dbe75610b5b0ec14df753a0780bf19309c0d9be34ebfdc4c364b8875a183307da6394456becd19b22f8987569feb9c718ca123764539ef0e52444 DIST flashrom-v1.2.tar.bz2 366995 BLAKE2B 091e01a91e12b486154ace334a5e74bccbb5f5311ad76e37f43a28167080757873d8c78b8f549d2e77eb984922c830895ba955b23eb6ee4fc24f1ffed259954b SHA512 8e01395a54d0d1344bc55e7e4975f43bb8e59ebe83fb5f2766d14f76756d718b487254ce9a19ef4093aed04fb9d40fff5fe8f709b18c512f6e6fad894f83d7b8 DIST flashrom-v1.3.0.tar.bz2 489782 BLAKE2B e6d2284d83171b003b434251f060fa44edf32ecfd3d397bd4ba39b74c6a0b5c9d1659b703dd6b632b63aa4bf27d08c8aeece72920199712c6a4ae160b2eb3a8a SHA512 73b6e00bd3bc66c98d4ad53966a65b19d3d92f07d7b210d69e041d6f5788605b9791a9bf7aec0a52e13d19fcb62c4bdaf4bab9f805fc31468393ca313129a77b EBUILD flashrom-1.2-r4.ebuild 3883 BLAKE2B d6db324e8c8aabb66dc112f537817e921a349a19c614abeaa554c6cd0c1cef307a866406a154df36905a97a4323b18cd10735bdabf884c8c25a1721391285a6a SHA512 2d46f9be773ce539b49ea729ba09257395a69f0d259d434032d88e24db1b0ac7ccd16c6e6ecb00c950f8e2e2cc4400eb9f40593c33534aeb06fd80da0c1fc625 EBUILD flashrom-1.3.0-r1.ebuild 3315 BLAKE2B 9a4456839280dde45b4bca92e0ad9eb5688409aeb051f8d792a29015bcddf6f0a15812f174b1bc1fdb7bc53dbd43540f35a6347d91916ce179685d723bf282d4 SHA512 8ef2aa35d09eda28f4eb7a0554d00e09d9c69dd3a0654c0a199d3a71466e5334f654696703cff80e4719f66927b8ac269347cfb9bf03a0fcd2b61afe1f25e218 +EBUILD flashrom-1.3.0-r2.ebuild 3357 BLAKE2B 3227bc2d4c9823bf50a5a84e25b25a8385f37ca7f8adefe644960c201e6ca7d0cb723fe5083705b4a66796ed31164131f59c0af70d7b146de13674ccc42bc29b SHA512 c8baceb94bc4c5dc499b526a052101a520205e9c59637830d648f803a528765025881778550582380bee10be5d1b7e75719af7edc2b281c51d041b943c91e9b8 EBUILD flashrom-1.3.0.ebuild 3251 BLAKE2B c16d96aa5e090f965af567dbb0315d7d1b605129bbea1ae418a58ea7f2800bd4e29cbccfab5052375ef6d853c14e16623bb72ddeea5248c47f9329d4c1e6976a SHA512 70a977760e9b6de32c6da7c484b6f68d56b21a41cccb8e6d9c28ad9970303fba54762f0e73fbf3338b04efde56866732a7fceed73bc516a830c5dbd5d9ff9fdb MISC metadata.xml 5072 BLAKE2B 5e11d250b2d59b71281ef50bf9cc79c30b2b2000002fae9725f75c73f89d02e297714d23d63dcaa55fb980162e54395b5ec5a528d15ada6c0fe8b6d020e1e3e9 SHA512 bec32f9d6d997e487f2560c89e68c041ae4162a2cc7b80dc38f20e610c300e76e8fa35144c371055f6a4594653c5af4865ba23634be87bd3e36cc8d66069ebc3 diff --git a/sys-apps/flashrom/files/flashrom-1.3.0-c99.patch b/sys-apps/flashrom/files/flashrom-1.3.0-c99.patch new file mode 100644 index 000000000000..5fdb8ff87e61 --- /dev/null +++ b/sys-apps/flashrom/files/flashrom-1.3.0-c99.patch @@ -0,0 +1,59 @@ +https://bugs.gentoo.org/919266 +https://github.com/flashrom/flashrom/commit/e31d721469a37bd5784b86ffcd2318108a796616 + +From e31d721469a37bd5784b86ffcd2318108a796616 Mon Sep 17 00:00:00 2001 +From: Nikolai Artemiev <nartemiev@google.com> +Date: Mon, 28 Nov 2022 17:40:56 +1100 +Subject: [PATCH] tree/: Make probe_opcode() flashctx argument const + +Probing an opcode generally shouldn't involve mutating the flashctx +state and currently no probe_opcode functions do that. + +Make the flashctx arg const so that call sites don't need to have a +non-const pointer. + +BUG=b:253715389,b:253713774 +BRANCH=none +TEST=ninja test + +Change-Id: I19e98be50d682de2d2715417f8b7b8c62b871617 +Signed-off-by: Nikolai Artemiev <nartemiev@google.com> +Reviewed-on: https://review.coreboot.org/c/flashrom/+/70030 +Reviewed-by: Angel Pons <th3fanbus@gmail.com> +Reviewed-by: Edward O'Callaghan <quasisec@chromium.org> +Tested-by: build bot (Jenkins) <no-reply@coreboot.org> +--- + dummyflasher.c | 4 ++-- + ichspi.c | 2 +- + 4 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/dummyflasher.c b/dummyflasher.c +index 35cdfef0b..da4efc79f 100644 +--- a/dummyflasher.c ++++ b/dummyflasher.c +@@ -122,10 +122,10 @@ static int dummy_spi_write_256(struct flashctx *flash, const uint8_t *buf, unsig + emu_data->spi_write_256_chunksize); + } + +-static bool dummy_spi_probe_opcode(struct flashctx *flash, uint8_t opcode) ++static bool dummy_spi_probe_opcode(const struct flashctx *flash, uint8_t opcode) + { + size_t i; +- struct emu_data *emu_data = flash->mst->spi.data; ++ const struct emu_data *emu_data = flash->mst->spi.data; + for (i = 0; i < emu_data->spi_blacklist_size; i++) { + if (emu_data->spi_blacklist[i] == opcode) + return false; +diff --git a/ichspi.c b/ichspi.c +index 62d1799b6..4588502a6 100644 +--- a/ichspi.c ++++ b/ichspi.c +@@ -1661,7 +1661,7 @@ static int ich_spi_send_multicommand(const struct flashctx *flash, + return ret; + } + +-static bool ich_spi_probe_opcode(struct flashctx *flash, uint8_t opcode) ++static bool ich_spi_probe_opcode(const struct flashctx *flash, uint8_t opcode) + { + return find_opcode(curopcodes, opcode) >= 0; + } diff --git a/sys-apps/flashrom/flashrom-1.3.0-r2.ebuild b/sys-apps/flashrom/flashrom-1.3.0-r2.ebuild new file mode 100644 index 000000000000..1249ff4ee1a1 --- /dev/null +++ b/sys-apps/flashrom/flashrom-1.3.0-r2.ebuild @@ -0,0 +1,133 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit meson + +MY_P="${PN}-v${PV}" +SRC_URI="https://download.flashrom.org/releases/${MY_P}.tar.bz2" +KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86" +S="${WORKDIR}/${MY_P}" + +DESCRIPTION="Utility for reading, writing, erasing and verifying flash ROM chips" +HOMEPAGE="https://flashrom.org/Flashrom" + +LICENSE="GPL-2" +SLOT="0" + +# The defaults should match the upstream "default" flags in meson.build +IUSE_PROGRAMMERS=" + atahpt + atapromise + +atavia + +buspirate-spi + +ch341a-spi + +dediprog + +developerbox-spi + +digilent-spi + +dirtyjtag-spi + +drkaiser + +dummy + +ft2232-spi + +gfxnvidia + +internal + +it8212 + jlink-spi + +linux-mtd + +linux-spi + mediatek-i2c-spi + mstarddc-spi + +nic3com + +nicintel + +nicintel-eeprom + +nicintel-spi + nicnatsemi + +nicrealtek + +ogp-spi + parade-lspcon + +pickit2-spi + +pony-spi + +raiden-debug-spi + +rayer-spi + realtek-mst-i2c-spi + +satamv + +satasii + +serprog + +stlinkv3-spi + +usbblaster-spi" +IUSE="${IUSE_PROGRAMMERS} +internal-dmi test tools" + +RESTRICT="!test? ( test )" + +COMMON="atahpt? ( sys-apps/pciutils ) + atapromise? ( sys-apps/pciutils ) + atavia? ( sys-apps/pciutils ) + ch341a-spi? ( virtual/libusb:1 ) + dediprog? ( virtual/libusb:1 ) + developerbox-spi? ( virtual/libusb:1 ) + digilent-spi? ( virtual/libusb:1 ) + dirtyjtag-spi? ( virtual/libusb:1 ) + drkaiser? ( sys-apps/pciutils ) + ft2232-spi? ( dev-embedded/libftdi:1= ) + gfxnvidia? ( sys-apps/pciutils ) + internal? ( sys-apps/pciutils ) + it8212? ( sys-apps/pciutils ) + jlink-spi? ( dev-embedded/libjaylink ) + nic3com? ( sys-apps/pciutils ) + nicintel? ( sys-apps/pciutils ) + nicintel-eeprom? ( sys-apps/pciutils ) + nicintel-spi? ( sys-apps/pciutils ) + nicnatsemi? ( sys-apps/pciutils ) + nicrealtek? ( sys-apps/pciutils ) + ogp-spi? ( sys-apps/pciutils ) + pickit2-spi? ( virtual/libusb:1 ) + raiden-debug-spi? ( virtual/libusb:1 ) + satamv? ( sys-apps/pciutils ) + satasii? ( sys-apps/pciutils ) + stlinkv3-spi? ( virtual/libusb:1 ) + usbblaster-spi? ( dev-embedded/libftdi:1= )" +RDEPEND="${COMMON} + !internal-dmi? ( sys-apps/dmidecode )" +DEPEND="${COMMON} + sys-apps/diffutils + linux-mtd? ( sys-kernel/linux-headers ) + linux-spi? ( sys-kernel/linux-headers ) + mediatek-i2c-spi? ( sys-kernel/linux-headers ) + mstarddc-spi? ( sys-kernel/linux-headers ) + parade-lspcon? ( sys-kernel/linux-headers ) + realtek-mst-i2c-spi? ( sys-kernel/linux-headers )" +BDEPEND="test? ( dev-util/cmocka )" + +PATCHES=( + "${FILESDIR}"/${PN}-1.3.0_spi-master.patch + "${FILESDIR}"/${PN}-1.3.0-c99.patch +) + +DOCS=( README Documentation/ ) + +src_configure() { + local programmers="$(printf '%s,' $(for flag in ${IUSE_PROGRAMMERS//+/}; do usev ${flag}; done))" + programmers="${programmers%,}" + programmers="${programmers//-/_}" + local emesonargs=( + -Dclassic_cli="enabled" + -Dprogrammer="${programmers}" + $(meson_feature test tests) + $(meson_feature tools ich_descriptors_tool) + ) + meson_src_configure +} + +src_install() { + meson_src_install + + # Upstream requires libflashrom.a to be present at build time because the classic CLI + # executable uses internal symbols from that library. Therefore, we let it be built + # but keep it out of the installed tree. + find "${ED}" -name '*.a' -delete || die + + if use tools; then + dosbin "${BUILD_DIR}"/util/ich_descriptors_tool/ich_descriptors_tool + fi +} |