Initial Commit
- initial default booting image
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
From 13c19fccd7946c692e587e308c916a1090d3592d Mon Sep 17 00:00:00 2001
|
||||
From: Florian Larysch <fl@n621.de>
|
||||
Date: Mon, 13 Apr 2026 01:40:52 +0200
|
||||
Subject: [PATCH] libflashrom: fix build on big-endian targets
|
||||
|
||||
Commit f74f02e2 ("Add guard for compare_region_with_dump()") added
|
||||
little-endian-only compile guards to that function because it was only
|
||||
used on little-endian systems and caused -Wunused-function to trip on
|
||||
other targets.
|
||||
|
||||
When b0b975d0 ("libflashrom: Add new layout_compare() function with
|
||||
test") introduced flashrom_layout_compare(), it included the new
|
||||
function within those guards too, but this isn't necessary:
|
||||
compare_region_with_dump() is not sensitive to endianess and adding that
|
||||
new dependent actually made the original reason for adding the guard
|
||||
obsolete.
|
||||
|
||||
However, now building on big-endian architectures fails because
|
||||
cli_classic.c unconditionally refers to flashrom_layout_compare().
|
||||
|
||||
Resolve this by simply removing the guard.
|
||||
|
||||
Fixes: https://ticket.coreboot.org/issues/635
|
||||
|
||||
Change-Id: If3e6828e6445e0708e1174728f91053e48a097ba
|
||||
Signed-off-by: Florian Larysch <fl@n621.de>
|
||||
Upstream: https://review.coreboot.org/c/flashrom/+/92156
|
||||
---
|
||||
libflashrom.c | 2 --
|
||||
1 file changed, 2 deletions(-)
|
||||
|
||||
diff --git a/libflashrom.c b/libflashrom.c
|
||||
index 159e3924..503386fa 100644
|
||||
--- a/libflashrom.c
|
||||
+++ b/libflashrom.c
|
||||
@@ -462,7 +462,6 @@ bool flashrom_flag_get(const struct flashrom_flashctx *const flashctx, const enu
|
||||
}
|
||||
}
|
||||
|
||||
-#ifdef __FLASHROM_LITTLE_ENDIAN__
|
||||
static int compare_region_with_dump(const struct romentry *const a, const struct romentry *const b)
|
||||
{
|
||||
if (a->region.start != b->region.start
|
||||
@@ -508,7 +507,6 @@ int flashrom_layout_compare(const struct flashrom_layout *layout1,
|
||||
|
||||
return 0;
|
||||
}
|
||||
-#endif /* __FLASHROM_LITTLE_ENDIAN__ */
|
||||
|
||||
int flashrom_layout_read_from_ifd(struct flashrom_layout **const layout, struct flashctx *const flashctx,
|
||||
const void *const dump, const size_t len)
|
||||
--
|
||||
2.53.0
|
||||
|
||||
24
package/flashrom/Config.in
Normal file
24
package/flashrom/Config.in
Normal file
@@ -0,0 +1,24 @@
|
||||
config BR2_PACKAGE_FLASHROM_ARCH_SUPPORTS
|
||||
bool
|
||||
default y if BR2_aarch64 || BR2_aarch64_be
|
||||
default y if BR2_arc
|
||||
default y if BR2_arm || BR2_armeb
|
||||
default y if BR2_i386 || BR2_x86_64
|
||||
default y if BR2_m68k
|
||||
default y if BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el
|
||||
default y if BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le
|
||||
default y if BR2_riscv
|
||||
default y if BR2_sh
|
||||
default y if BR2_sparc || BR2_sparc64
|
||||
|
||||
config BR2_PACKAGE_FLASHROM
|
||||
bool "flashrom"
|
||||
depends on BR2_PACKAGE_FLASHROM_ARCH_SUPPORTS
|
||||
help
|
||||
flashrom is a utility for identifying, reading, writing,
|
||||
verifying and erasing flash chips. It is designed to flash
|
||||
BIOS/EFI/coreboot/firmware/optionROM images on mainboards,
|
||||
network/graphics/storage controller cards, and various other
|
||||
programmer devices.
|
||||
|
||||
http://flashrom.org/
|
||||
3
package/flashrom/flashrom.hash
Normal file
3
package/flashrom/flashrom.hash
Normal file
@@ -0,0 +1,3 @@
|
||||
# Locally computed
|
||||
sha256 c5a8892158bd749aadfee6e114eec268130cdd8c2027fd1ddf44273755b07b59 flashrom-1.7.0.tar.gz
|
||||
sha256 e51c99ee054c216999e7a8db04a2e7a6b39915dccc8a58e54b48a720e0c4158a COPYING.rst
|
||||
87
package/flashrom/flashrom.mk
Normal file
87
package/flashrom/flashrom.mk
Normal file
@@ -0,0 +1,87 @@
|
||||
################################################################################
|
||||
#
|
||||
# flashrom
|
||||
#
|
||||
################################################################################
|
||||
|
||||
FLASHROM_VERSION = 1.7.0
|
||||
FLASHROM_SITE = $(call github,flashrom,flashrom,v$(FLASHROM_VERSION))
|
||||
FLASHROM_LICENSE = GPL-2.0+
|
||||
FLASHROM_LICENSE_FILES = COPYING.rst
|
||||
FLASHROM_INSTALL_STAGING = YES
|
||||
FLASHROM_CONF_OPTS = \
|
||||
-Dclassic_cli=enabled \
|
||||
-Dich_descriptors_tool=enabled \
|
||||
-Dtests=disabled \
|
||||
-Duse_internal_dmi=true \
|
||||
-Dwerror=false \
|
||||
-Dman-pages=disabled \
|
||||
-Ddocumentation=disabled
|
||||
|
||||
FLASHROM_PROGRAMMERS = \
|
||||
buspirate_spi \
|
||||
linux_mtd \
|
||||
linux_spi \
|
||||
parade_lspcon \
|
||||
mediatek_i2c_spi \
|
||||
mstarddc_spi \
|
||||
pony_spi \
|
||||
realtek_mst_i2c_spi \
|
||||
serprog
|
||||
|
||||
ifeq ($(BR2_i386)$(BR2_x86_64),y)
|
||||
FLASHROM_PROGRAMMERS += rayer_spi
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBFTDI1),y)
|
||||
FLASHROM_DEPENDENCIES += host-pkgconf libftdi1
|
||||
FLASHROM_PROGRAMMERS += \
|
||||
ft2232_spi \
|
||||
usbblaster_spi
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBUSB),y)
|
||||
FLASHROM_DEPENDENCIES += host-pkgconf libusb
|
||||
FLASHROM_PROGRAMMERS += \
|
||||
ch341a_spi \
|
||||
dediprog \
|
||||
developerbox_spi \
|
||||
digilent_spi \
|
||||
dirtyjtag_spi \
|
||||
pickit2_spi \
|
||||
raiden_debug_spi \
|
||||
stlinkv3_spi
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_PCIUTILS),y)
|
||||
FLASHROM_DEPENDENCIES += pciutils
|
||||
FLASHROM_PROGRAMMERS += \
|
||||
atavia \
|
||||
drkaiser \
|
||||
gfxnvidia \
|
||||
internal \
|
||||
it8212 \
|
||||
nicintel \
|
||||
nicintel_eeprom \
|
||||
nicintel_spi \
|
||||
ogp_spi \
|
||||
satasii
|
||||
|
||||
ifeq ($(BR2_i386)$(BR2_x86_64),y)
|
||||
FLASHROM_PROGRAMMERS += \
|
||||
atahpt \
|
||||
atapromise \
|
||||
nic3com \
|
||||
nicnatsemi \
|
||||
nicrealtek \
|
||||
satamv
|
||||
endif
|
||||
endif
|
||||
|
||||
FLASHROM_CONF_OPTS += -Dprogrammer=$(subst $(space),$(comma),$(strip $(FLASHROM_PROGRAMMERS)))
|
||||
|
||||
ifeq ($(BR2_SHARED_LIBS),y)
|
||||
FLASHROM_CONF_OPTS += --default-library=both
|
||||
endif
|
||||
|
||||
$(eval $(meson-package))
|
||||
Reference in New Issue
Block a user