diff options
| author | Patrick Rudolph <patrick.rudolph@9elements.com> | 2025-03-12 21:55:05 +0530 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2025-03-13 22:09:17 -0700 |
| commit | 8cc6bfdb38d99da748324ac8bbd32575cb0ea0fc (patch) | |
| tree | 79c8fa7bf497e69558b29f3c687355817951fcba | |
| parent | 4fdf3b2891983e1d09e4f64625b8b1cfc09e9760 (diff) | |
| download | meta-openembedded-8cc6bfdb38d99da748324ac8bbd32575cb0ea0fc.tar.gz | |
flashrom: Update to v1.4.0
Flashrom Release note:
https://www.flashrom.org/release_notes/v_1_4.html
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Tested-by: Naresh Solanki <naresh.solanki@9elements.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
| -rw-r--r-- | meta-oe/recipes-bsp/flashrom/flashrom/0001-flashrom-Mark-RISCV-as-non-memory-mapped-I-O-archite.patch | 54 | ||||
| -rw-r--r-- | meta-oe/recipes-bsp/flashrom/flashrom/0001-hwaccess-use-__asm__-as-is-done-elsewhere.patch | 52 | ||||
| -rw-r--r-- | meta-oe/recipes-bsp/flashrom/flashrom/0002-meson-Add-options-pciutils-ftdi-usb.patch | 48 | ||||
| -rw-r--r-- | meta-oe/recipes-bsp/flashrom/flashrom/meson-fixes.patch | 68 | ||||
| -rw-r--r-- | meta-oe/recipes-bsp/flashrom/flashrom_1.4.0.bb (renamed from meta-oe/recipes-bsp/flashrom/flashrom_1.2.1.bb) | 10 |
5 files changed, 74 insertions, 158 deletions
diff --git a/meta-oe/recipes-bsp/flashrom/flashrom/0001-flashrom-Mark-RISCV-as-non-memory-mapped-I-O-archite.patch b/meta-oe/recipes-bsp/flashrom/flashrom/0001-flashrom-Mark-RISCV-as-non-memory-mapped-I-O-archite.patch index e481c5a161..58f1aa4d43 100644 --- a/meta-oe/recipes-bsp/flashrom/flashrom/0001-flashrom-Mark-RISCV-as-non-memory-mapped-I-O-archite.patch +++ b/meta-oe/recipes-bsp/flashrom/flashrom/0001-flashrom-Mark-RISCV-as-non-memory-mapped-I-O-archite.patch | |||
| @@ -1,44 +1,30 @@ | |||
| 1 | From 2c777126765b4095bf481d5cfe4a21470374d940 Mon Sep 17 00:00:00 2001 | 1 | From bf5a30ef30818973eb2cfac792b80c642df8a721 Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Patrick Rudolph <patrick.rudolph@9elements.com> |
| 3 | Date: Tue, 30 Mar 2021 15:12:09 -0700 | 3 | Date: Mon, 14 Oct 2024 11:01:37 +0200 |
| 4 | Subject: [PATCH] flashrom: Mark RISCV as non memory-mapped I/O architecture | 4 | Subject: [PATCH 1/2] flashrom: Mark RISCV as non memory-mapped I/O |
| 5 | architecture | ||
| 5 | 6 | ||
| 6 | Upstream-Status: Submitted [https://review.coreboot.org/c/flashrom/+/51960] | 7 | Upstream-Status: Inactive-Upstream |
| 7 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 8 | |
| 8 | Change-Id: I55c4e8529d36f0850dd56441c3fb8602c5d889fd | 9 | Change-Id: I46d7ede7af61e7fca631e1d465100e65c6ddeee9 |
| 10 | Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> | ||
| 9 | --- | 11 | --- |
| 10 | Makefile | 2 +- | 12 | Makefile | 2 +- |
| 11 | hwaccess.h | 4 ++++ | 13 | 1 file changed, 1 insertion(+), 1 deletion(-) |
| 12 | 2 files changed, 5 insertions(+), 1 deletion(-) | ||
| 13 | 14 | ||
| 14 | diff --git a/Makefile b/Makefile | 15 | diff --git a/Makefile b/Makefile |
| 15 | index 6d37d55..203e04b 100644 | 16 | index 97f56b83..08e4c595 100644 |
| 16 | --- a/Makefile | 17 | --- a/Makefile |
| 17 | +++ b/Makefile | 18 | +++ b/Makefile |
| 18 | @@ -559,7 +559,7 @@ endif | 19 | @@ -372,7 +372,7 @@ endif |
| 19 | # Disable all drivers needing raw access (memory, PCI, port I/O) on | 20 | # Additionally disable all drivers needing raw access (memory, PCI, port I/O) |
| 20 | # architectures with unknown raw access properties. | 21 | # on architectures with unknown raw access properties. |
| 21 | # Right now those architectures are alpha hppa m68k sh s390 | 22 | # Right now those architectures are alpha hppa m68k sh s390 |
| 22 | -ifneq ($(ARCH),$(filter $(ARCH),x86 mips ppc arm sparc arc)) | 23 | -ifneq ($(ARCH), $(filter $(ARCH), x86 mips ppc arm sparc arc e2k)) |
| 23 | +ifneq ($(ARCH),$(filter $(ARCH),x86 mips ppc arm sparc arc riscv)) | 24 | +ifneq ($(ARCH), $(filter $(ARCH), x86 mips ppc arm sparc arc e2k riscv)) |
| 24 | ifeq ($(CONFIG_RAYER_SPI), yes) | 25 | $(call mark_unsupported,$(DEPENDS_ON_RAW_MEM_ACCESS)) |
| 25 | UNSUPPORTED_FEATURES += CONFIG_RAYER_SPI=yes | 26 | endif |
| 26 | else | ||
| 27 | diff --git a/hwaccess.h b/hwaccess.h | ||
| 28 | index 5602c15..e79988a 100644 | ||
| 29 | --- a/hwaccess.h | ||
| 30 | +++ b/hwaccess.h | ||
| 31 | @@ -295,6 +295,10 @@ int libpayload_wrmsr(int addr, msr_t msr); | ||
| 32 | |||
| 33 | /* Non memory mapped I/O is not supported on ARC. */ | ||
| 34 | |||
| 35 | +#elif IS_RISCV | ||
| 36 | + | ||
| 37 | +/* Non memory mapped I/O is not supported on RISCV. */ | ||
| 38 | + | ||
| 39 | #else | ||
| 40 | 27 | ||
| 41 | #error Unknown architecture, please check if it supports PCI port IO. | ||
| 42 | -- | 28 | -- |
| 43 | 2.31.1 | 29 | 2.46.2 |
| 44 | 30 | ||
diff --git a/meta-oe/recipes-bsp/flashrom/flashrom/0001-hwaccess-use-__asm__-as-is-done-elsewhere.patch b/meta-oe/recipes-bsp/flashrom/flashrom/0001-hwaccess-use-__asm__-as-is-done-elsewhere.patch deleted file mode 100644 index f3316aa264..0000000000 --- a/meta-oe/recipes-bsp/flashrom/flashrom/0001-hwaccess-use-__asm__-as-is-done-elsewhere.patch +++ /dev/null | |||
| @@ -1,52 +0,0 @@ | |||
| 1 | From 3334dd4e9fc34c79c3925c3c24869939d8955f21 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Rosen Penev <rosenp@gmail.com> | ||
| 3 | Date: Sat, 18 Jul 2020 12:16:00 -0700 | ||
| 4 | Subject: [PATCH] hwaccess: use __asm__ as is done elsewhere | ||
| 5 | |||
| 6 | Fixes compilation under powerpc platform. Made the change for the SPARC | ||
| 7 | platform as well. | ||
| 8 | |||
| 9 | ../hwaccess.c: In function 'sync_primitive': | ||
| 10 | ../hwaccess.c:74:2: warning: implicit declaration of function 'asm' | ||
| 11 | [-Wimplicit-function-declaration] | ||
| 12 | 74 | asm("eieio" : : : "memory"); | ||
| 13 | | ^~~ | ||
| 14 | ../hwaccess.c:74:13: error: expected ')' before ':' token | ||
| 15 | 74 | asm("eieio" : : : "memory"); | ||
| 16 | |||
| 17 | Upstream-Status: Submitted [https://github.com/flashrom/flashrom/pull/155] | ||
| 18 | Signed-off-by: Rosen Penev <rosenp@gmail.com> | ||
| 19 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 20 | --- | ||
| 21 | hwaccess.c | 6 +++--- | ||
| 22 | 1 file changed, 3 insertions(+), 3 deletions(-) | ||
| 23 | |||
| 24 | diff --git a/hwaccess.c b/hwaccess.c | ||
| 25 | index 48ccb34..2a39989 100644 | ||
| 26 | --- a/hwaccess.c | ||
| 27 | +++ b/hwaccess.c | ||
| 28 | @@ -71,18 +71,18 @@ static inline void sync_primitive(void) | ||
| 29 | * See also https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/memory-barriers.txt | ||
| 30 | */ | ||
| 31 | #if IS_PPC // cf. http://lxr.free-electrons.com/source/arch/powerpc/include/asm/barrier.h | ||
| 32 | - asm("eieio" : : : "memory"); | ||
| 33 | + __asm__ ("eieio" : : : "memory"); | ||
| 34 | #elif IS_SPARC | ||
| 35 | #if defined(__sparc_v9__) || defined(__sparcv9) | ||
| 36 | /* Sparc V9 CPUs support three different memory orderings that range from x86-like TSO to PowerPC-like | ||
| 37 | * RMO. The modes can be switched at runtime thus to make sure we maintain the right order of access we | ||
| 38 | * use the strongest hardware memory barriers that exist on Sparc V9. */ | ||
| 39 | - asm volatile ("membar #Sync" ::: "memory"); | ||
| 40 | + __asm__ volatile ("membar #Sync" ::: "memory"); | ||
| 41 | #elif defined(__sparc_v8__) || defined(__sparcv8) | ||
| 42 | /* On SPARC V8 there is no RMO just PSO and that does not apply to I/O accesses... but if V8 code is run | ||
| 43 | * on V9 CPUs it might apply... or not... we issue a write barrier anyway. That's the most suitable | ||
| 44 | * operation in the V8 instruction set anyway. If you know better then please tell us. */ | ||
| 45 | - asm volatile ("stbar"); | ||
| 46 | + __asm__ volatile ("stbar"); | ||
| 47 | #else | ||
| 48 | #error Unknown and/or unsupported SPARC instruction set version detected. | ||
| 49 | #endif | ||
| 50 | -- | ||
| 51 | 2.32.0 | ||
| 52 | |||
diff --git a/meta-oe/recipes-bsp/flashrom/flashrom/0002-meson-Add-options-pciutils-ftdi-usb.patch b/meta-oe/recipes-bsp/flashrom/flashrom/0002-meson-Add-options-pciutils-ftdi-usb.patch new file mode 100644 index 0000000000..bc43f17e9a --- /dev/null +++ b/meta-oe/recipes-bsp/flashrom/flashrom/0002-meson-Add-options-pciutils-ftdi-usb.patch | |||
| @@ -0,0 +1,48 @@ | |||
| 1 | From 3ea99c117aa4c7a3502c93e4e4df50b3623e46c3 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Patrick Rudolph <patrick.rudolph@9elements.com> | ||
| 3 | Date: Tue, 15 Oct 2024 10:42:05 +0200 | ||
| 4 | Subject: [PATCH 2/2] meson: Add options pciutils, ftdi, usb | ||
| 5 | |||
| 6 | The options have been dropped in favor of an array option called programmer. | ||
| 7 | Since this doesn't integrate well into yocto add back the old options. | ||
| 8 | |||
| 9 | Upstream-Status: Inappropriate Just to fix yocto build system | ||
| 10 | |||
| 11 | Change-Id: Ib697b9f7cc7fc553cfdeb75ae9d49a367badd286 | ||
| 12 | Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> | ||
| 13 | --- | ||
| 14 | meson.build | 6 +++--- | ||
| 15 | meson_options.txt | 3 +++ | ||
| 16 | 2 files changed, 6 insertions(+), 3 deletions(-) | ||
| 17 | |||
| 18 | diff --git a/meson.build b/meson.build | ||
| 19 | index ae56b26c..21093a7f 100644 | ||
| 20 | --- a/meson.build | ||
| 21 | +++ b/meson.build | ||
| 22 | @@ -151,9 +151,9 @@ systems_serial = [ 'linux', 'openbsd', 'freebsd', 'dragonfly', 'netbsd', 'da | ||
| 23 | |||
| 24 | cpus_port_io = [ 'x86', 'x86_64' ] | ||
| 25 | |||
| 26 | -group_ftdi = get_option('programmer').contains('group_ftdi') | ||
| 27 | -group_pci = get_option('programmer').contains('group_pci') | ||
| 28 | -group_usb = get_option('programmer').contains('group_usb') | ||
| 29 | +group_ftdi = get_option('programmer').contains('group_ftdi') or get_option('ftdi') | ||
| 30 | +group_pci = get_option('programmer').contains('group_pci') or get_option('pciutils') | ||
| 31 | +group_usb = get_option('programmer').contains('group_usb') or get_option('usb') | ||
| 32 | group_i2c = get_option('programmer').contains('group_i2c') | ||
| 33 | group_serial = get_option('programmer').contains('group_serial') | ||
| 34 | group_jlink = get_option('programmer').contains('group_jlink') | ||
| 35 | diff --git a/meson_options.txt b/meson_options.txt | ||
| 36 | index 8a04114d..ae722509 100644 | ||
| 37 | --- a/meson_options.txt | ||
| 38 | +++ b/meson_options.txt | ||
| 39 | @@ -25,3 +25,6 @@ option('ni845x_search_path', type : 'string', value : 'C:\Program Files (x86)\Na | ||
| 40 | option('delay_minimum_sleep_us', type : 'integer', min : 0, value : 100000, | ||
| 41 | description : 'Minimum time in microseconds to suspend execution for (rather than polling) when a delay is required.' | ||
| 42 | + ' Larger values may perform better on machines with low timer resolution, at the cost of increased power.') | ||
| 43 | +option('pciutils', type : 'boolean', value : false, description : 'Select programmer group pci') | ||
| 44 | +option('usb', type : 'boolean', value : false, description : 'Select programmer group usb') | ||
| 45 | +option('ftdi', type : 'boolean', value : false, description : 'Select programmer group ftdi') | ||
| 46 | -- | ||
| 47 | 2.46.2 | ||
| 48 | |||
diff --git a/meta-oe/recipes-bsp/flashrom/flashrom/meson-fixes.patch b/meta-oe/recipes-bsp/flashrom/flashrom/meson-fixes.patch deleted file mode 100644 index e45236ee07..0000000000 --- a/meta-oe/recipes-bsp/flashrom/flashrom/meson-fixes.patch +++ /dev/null | |||
| @@ -1,68 +0,0 @@ | |||
| 1 | Add a ftdi option alongside USB and PCI to control the external dependency, and | ||
| 2 | ensure that the build is successful in all combinations of options. | ||
| 3 | |||
| 4 | Upstream-Status: Pending | ||
| 5 | Signed-off-by: Ross Burton <ross.burton@arm.com> | ||
| 6 | |||
| 7 | diff --git a/meson.build b/meson.build | ||
| 8 | index 375089c..0df9d69 100644 | ||
| 9 | --- a/meson.build | ||
| 10 | +++ b/meson.build | ||
| 11 | @@ -91,6 +91,8 @@ else | ||
| 12 | config_digilent_spi = false | ||
| 13 | config_developerbox_spi = false | ||
| 14 | config_pickit2_spi = false | ||
| 15 | + config_stlinkv3_spi = false | ||
| 16 | + config_usbblaster_spi = false | ||
| 17 | endif | ||
| 18 | |||
| 19 | # some programmers require libpci | ||
| 20 | @@ -118,6 +120,21 @@ else | ||
| 21 | config_satasii = false | ||
| 22 | endif | ||
| 23 | |||
| 24 | +# some programmers require libftdi | ||
| 25 | +if get_option('ftdi') | ||
| 26 | + deps += dependency('libftdi1') | ||
| 27 | +else | ||
| 28 | + config_ft2232_spi = false | ||
| 29 | + config_usbblaster_spi = false | ||
| 30 | +endif | ||
| 31 | + | ||
| 32 | +if not (target_machine.cpu_family() == 'x86' or target_machine.cpu_family() == 'x86_64') | ||
| 33 | + config_satamv = false | ||
| 34 | + config_nic3com = false | ||
| 35 | + config_rayer_spi = false | ||
| 36 | + config_nicrealtek = false | ||
| 37 | +endif | ||
| 38 | + | ||
| 39 | # set defines for configured programmers | ||
| 40 | if config_atahpt | ||
| 41 | srcs += 'atahpt.c' | ||
| 42 | @@ -163,7 +180,6 @@ endif | ||
| 43 | if config_ft2232_spi | ||
| 44 | srcs += 'ft2232_spi.c' | ||
| 45 | cargs += '-DCONFIG_FT2232_SPI=1' | ||
| 46 | - deps += dependency('libftdi1') | ||
| 47 | cargs += '-DHAVE_FT232H=1' | ||
| 48 | endif | ||
| 49 | if config_gfxnvidia | ||
| 50 | @@ -216,6 +232,7 @@ endif | ||
| 51 | if config_nicintel | ||
| 52 | srcs += 'nicintel.c' | ||
| 53 | cargs += '-DCONFIG_NICINTEL=1' | ||
| 54 | + need_raw_access = true | ||
| 55 | endif | ||
| 56 | if config_nicintel_eeprom | ||
| 57 | srcs += 'nicintel_eeprom.c' | ||
| 58 | diff --git a/meson_options.txt b/meson_options.txt | ||
| 59 | index ea87311..b6b842d 100644 | ||
| 60 | --- a/meson_options.txt | ||
| 61 | +++ b/meson_options.txt | ||
| 62 | @@ -1,5 +1,6 @@ | ||
| 63 | option('pciutils', type : 'boolean', value : true, description : 'use pciutils') | ||
| 64 | option('usb', type : 'boolean', value : true, description : 'use libusb1') | ||
| 65 | +option('ftdi', type : 'boolean', value : true, description : 'use libftdi') | ||
| 66 | |||
| 67 | option('config_atahpt', type : 'boolean', value : false, description : 'Highpoint (HPT) ATA/RAID controllers') | ||
| 68 | option('config_atapromise', type : 'boolean', value : false, description : 'Promise ATA controller') | ||
diff --git a/meta-oe/recipes-bsp/flashrom/flashrom_1.2.1.bb b/meta-oe/recipes-bsp/flashrom/flashrom_1.4.0.bb index b2592d294b..98447809cf 100644 --- a/meta-oe/recipes-bsp/flashrom/flashrom_1.2.1.bb +++ b/meta-oe/recipes-bsp/flashrom/flashrom_1.4.0.bb | |||
| @@ -3,12 +3,12 @@ LICENSE = "GPL-2.0-or-later" | |||
| 3 | HOMEPAGE = "http://flashrom.org" | 3 | HOMEPAGE = "http://flashrom.org" |
| 4 | 4 | ||
| 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" | 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" |
| 6 | SRC_URI = "https://download.flashrom.org/releases/flashrom-v${PV}.tar.bz2 \ | 6 | SRC_URI = "https://download.flashrom.org/releases/flashrom-v${PV}.tar.xz \ |
| 7 | file://meson-fixes.patch \ | ||
| 8 | file://0001-flashrom-Mark-RISCV-as-non-memory-mapped-I-O-archite.patch \ | 7 | file://0001-flashrom-Mark-RISCV-as-non-memory-mapped-I-O-archite.patch \ |
| 9 | file://0001-hwaccess-use-__asm__-as-is-done-elsewhere.patch \ | 8 | file://0002-meson-Add-options-pciutils-ftdi-usb.patch \ |
| 10 | " | 9 | " |
| 11 | SRC_URI[sha256sum] = "89a7ff5beb08c89b8795bbd253a51b9453547a864c31793302296b56bbc56d65" | 10 | |
| 11 | SRC_URI[sha256sum] = "eb0eb3e61a57fd1926c66f08664cf04a96f92cee23b600cf563087c2178d70d8" | ||
| 12 | 12 | ||
| 13 | S = "${WORKDIR}/flashrom-v${PV}" | 13 | S = "${WORKDIR}/flashrom-v${PV}" |
| 14 | 14 | ||
| @@ -18,3 +18,5 @@ PACKAGECONFIG ??= "pci usb ftdi" | |||
| 18 | PACKAGECONFIG[pci] = "-Dpciutils=true,-Dpciutils=false,pciutils" | 18 | PACKAGECONFIG[pci] = "-Dpciutils=true,-Dpciutils=false,pciutils" |
| 19 | PACKAGECONFIG[usb] = "-Dusb=true,-Dusb=false,libusb" | 19 | PACKAGECONFIG[usb] = "-Dusb=true,-Dusb=false,libusb" |
| 20 | PACKAGECONFIG[ftdi] = "-Dftdi=true,-Dftdi=false,libftdi" | 20 | PACKAGECONFIG[ftdi] = "-Dftdi=true,-Dftdi=false,libftdi" |
| 21 | |||
| 22 | EXTRA_OEMESON = "-Dbash_completion=disabled -Dtests=disabled" | ||
