Skip to content

Commit 10e7dbe

Browse files
deps: PR opencomputeproject#1131 (util-linux 2.41.4, e2fsprogs 1.47.4, flashrom 1.7.0)
Squashed content of PR opencomputeproject#1131 (delta over opencomputeproject#1129), pulled in as a dependency. Signed-off-by: Brad House <bhouse@nexthop.ai>
1 parent 6627ffa commit 10e7dbe

10 files changed

Lines changed: 62 additions & 43 deletions

.github/onie-build/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
# This image builds the generic kvm_x86_64 target with secure boot
1010
# enabled. It includes the secure-boot tooling needed to exercise the SB
1111
# build path -- pesign, efitools, sbsigntool and gnupg2 (for key
12-
# generation and EFI signing).
12+
# generation and EFI signing) -- and meson/ninja, which flashrom 1.x
13+
# requires to build.
1314
FROM debian:13
1415
WORKDIR /onie
1516

@@ -49,7 +50,9 @@ RUN apt-get update && apt-get install -y \
4950
libtool \
5051
libtool-bin \
5152
locales \
53+
meson \
5254
mtools \
55+
ninja-build \
5356
pesign \
5457
pkgconf \
5558
python3-all-dev \

build-config/make/e2fsprogs.make

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# This is a makefile fragment that defines the build of e2fsprogs
1010
#
1111

12-
E2FSPROGS_VERSION = 1.46.3
12+
E2FSPROGS_VERSION = 1.47.4
1313
E2FSPROGS_TARBALL = e2fsprogs-$(E2FSPROGS_VERSION).tar.xz
1414
E2FSPROGS_TARBALL_URLS += $(ONIE_MIRROR) \
1515
https://www.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/v$(E2FSPROGS_VERSION)

build-config/make/flashrom.make

Lines changed: 51 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,32 @@
99
# This is a makefile fragment that defines the build of flashrom
1010
#
1111

12-
FLASHROM_VERSION = 0.9.8
13-
FLASHROM_TARBALL = flashrom-$(FLASHROM_VERSION).tar.bz2
14-
FLASHROM_TARBALL_URLS += $(ONIE_MIRROR) http://download.flashrom.org/releases/
12+
FLASHROM_VERSION = 1.7.0
13+
FLASHROM_TARBALL = flashrom-v$(FLASHROM_VERSION).tar.xz
14+
FLASHROM_TARBALL_URLS += $(ONIE_MIRROR) https://download.flashrom.org/releases/
1515
FLASHROM_BUILD_DIR = $(USER_BUILDDIR)/flashrom
16-
FLASHROM_DIR = $(FLASHROM_BUILD_DIR)/flashrom-$(FLASHROM_VERSION)
16+
FLASHROM_DIR = $(FLASHROM_BUILD_DIR)/flashrom-v$(FLASHROM_VERSION)
17+
FLASHROM_MESON_BUILD = $(FLASHROM_DIR)/onie-build
18+
FLASHROM_CROSS_FILE = $(FLASHROM_DIR)/onie-cross.ini
1719

18-
FLASHROM_SRCPATCHDIR = $(PATCHDIR)/flashrom
1920
FLASHROM_DOWNLOAD_STAMP = $(DOWNLOADDIR)/flashrom-download
2021
FLASHROM_SOURCE_STAMP = $(USER_STAMPDIR)/flashrom-source
21-
FLASHROM_PATCH_STAMP = $(USER_STAMPDIR)/flashrom-patch
2222
FLASHROM_BUILD_STAMP = $(USER_STAMPDIR)/flashrom-build
2323
FLASHROM_INSTALL_STAMP = $(STAMPDIR)/flashrom-install
2424
FLASHROM_STAMP = $(FLASHROM_SOURCE_STAMP) \
25-
$(FLASHROM_PATCH_STAMP) \
2625
$(FLASHROM_BUILD_STAMP) \
2726
$(FLASHROM_INSTALL_STAMP)
2827

2928
FLASHROM_PROGRAMS = flashrom
3029

30+
# flashrom 1.x builds with meson/ninja (the old Makefile was dropped after
31+
# 0.9.x). Select the programmers ONIE needs: 'internal' for on-board chipset
32+
# flashing and 'nicintel_eeprom' to program the Intel NIC EEPROM (useful in
33+
# manufacturing to set the eth0 MAC). Both rely only on libpci, so no extra
34+
# USB/FTDI/serial dependencies are pulled in. A platform can override this to
35+
# enable additional programmers.
36+
FLASHROM_PROGRAMMERS ?= internal,nicintel_eeprom
37+
3138
PHONY += flashrom flashrom-download flashrom-source flashrom-build \
3239
flashrom-install flashrom-clean flashrom-download-clean
3340

@@ -50,39 +57,48 @@ $(FLASHROM_SOURCE_STAMP): $(USER_TREE_STAMP) $(FLASHROM_DOWNLOAD_STAMP)
5057
$(Q) $(SCRIPTDIR)/extract-package $(FLASHROM_BUILD_DIR) $(DOWNLOADDIR)/$(FLASHROM_TARBALL)
5158
$(Q) touch $@
5259

53-
# Disable all flashrom methods, except for 'internal' by default.
54-
# Individual platforms can define FLASHROM_MAKE_CONFIG_PLATFORM to
55-
# enable support for specific flashing methods, for example:
56-
#
57-
# FLASHROM_MAKE_CONFIG_PLATFORM = CONFIG_XYZ=yes
58-
#
59-
# See the Makefile in the flashrom source directory for the complete
60-
# list of CONFIG_XYZ variables.
61-
#
62-
# Note: Leaving the Intel NIC EEPROMs enabled, as that could be useful
63-
# in manufacturing to program the MAC address for eth0.
64-
FLASHROM_MAKE_CONFIG = \
65-
CC=$(CROSSPREFIX)gcc CFLAGS="-Wall -Wshadow $(ONIE_CFLAGS)" \
66-
LDFLAGS="$(ONIE_LDFLAGS)" \
67-
PREFIX=/usr DESTDIR=$(DEV_SYSROOT) \
68-
CONFIG_SERPROG=no CONFIG_RAYER_SPI=no CONFIG_PONY_SPI=no \
69-
CONFIG_NIC3COM=no CONFIG_GFXNVIDIA=no CONFIG_SATASII=no \
70-
CONFIG_ATAHPT=no CONFIG_ATAVIA=no CONFIG_FT2232_SPI=no \
71-
CONFIG_USBBLASTER_SPI=no CONFIG_MSTARDDC_SPI=no CONFIG_PICKIT2_SPI=no \
72-
CONFIG_DRKAISER=no CONFIG_NICREALTEK=no CONFIG_NICNATSEMI=no \
73-
CONFIG_OGP_SPI=no CONFIG_BUSPIRATE_SPI=no CONFIG_DEDIPROG=no \
74-
CONFIG_SATAMV=no CONFIG_IT8212=no CONFIG_PRINT_WIKI=no \
75-
$(FLASHROM_MAKE_CONFIG_PLATFORM)
76-
7760
flashrom-build: $(FLASHROM_BUILD_STAMP)
7861
$(FLASHROM_BUILD_STAMP): $(FLASHROM_SOURCE_STAMP) $(PCIUTILS_BUILD_STAMP) \
7962
| $(DEV_SYSROOT_INIT_STAMP)
8063
$(Q) rm -f $@ && eval $(PROFILE_STAMP)
8164
$(Q) echo "==== Building flashrom-$(FLASHROM_VERSION) ===="
82-
$(Q) PATH='$(CROSSBIN):$(PATH)' $(MAKE) -C $(FLASHROM_DIR) \
83-
$(FLASHROM_MAKE_CONFIG) all
84-
$(Q) PATH='$(CROSSBIN):$(PATH)' $(MAKE) -C $(FLASHROM_DIR) \
85-
$(FLASHROM_MAKE_CONFIG) install
65+
# Generate a meson cross file describing the ONIE cross toolchain.
66+
# flashrom is only enabled for x86_64 (see arch/x86_64.make).
67+
$(Q) { \
68+
echo "[binaries]" ; \
69+
echo "c = '$(CROSSPREFIX)gcc'" ; \
70+
echo "ar = '$(CROSSPREFIX)ar'" ; \
71+
echo "strip = '$(CROSSPREFIX)strip'" ; \
72+
echo "pkgconfig = 'pkg-config'" ; \
73+
echo "" ; \
74+
echo "[host_machine]" ; \
75+
echo "system = 'linux'" ; \
76+
echo "cpu_family = 'x86_64'" ; \
77+
echo "cpu = 'x86_64'" ; \
78+
echo "endian = 'little'" ; \
79+
echo "" ; \
80+
echo "[properties]" ; \
81+
echo "sys_root = '$(DEV_SYSROOT)'" ; \
82+
echo "" ; \
83+
echo "[built-in options]" ; \
84+
echo "c_args = ['-Os']" ; \
85+
echo "c_link_args = ['--sysroot=$(DEV_SYSROOT)']" ; \
86+
} > $(FLASHROM_CROSS_FILE)
87+
$(Q) rm -rf $(FLASHROM_MESON_BUILD)
88+
$(Q) cd $(FLASHROM_DIR) && PATH='$(CROSSBIN):$(PATH)' $(ONIE_PKG_CONFIG) \
89+
meson setup --cross-file $(FLASHROM_CROSS_FILE) --prefix=/usr \
90+
-Dprogrammer=$(FLASHROM_PROGRAMMERS) \
91+
-Dclassic_cli=enabled \
92+
-Dtests=disabled \
93+
-Dman-pages=disabled \
94+
-Ddocumentation=disabled \
95+
-Dich_descriptors_tool=disabled \
96+
-Dbash_completion=disabled \
97+
-Duse_git_version=disabled \
98+
onie-build
99+
$(Q) PATH='$(CROSSBIN):$(PATH)' ninja -C $(FLASHROM_MESON_BUILD)
100+
$(Q) PATH='$(CROSSBIN):$(PATH)' DESTDIR=$(DEV_SYSROOT) \
101+
ninja -C $(FLASHROM_MESON_BUILD) install
86102
$(Q) touch $@
87103

88104
flashrom-install: $(FLASHROM_INSTALL_STAMP)

build-config/make/util-linux.make

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
# This is a makefile fragment that defines the build of some libraries
1010
# from the util-linux package.
1111
#
12-
UTILLINUX_MAJOR_VERSION = 2.37
13-
UTILLINUX_VERSION = $(UTILLINUX_MAJOR_VERSION).2
12+
UTILLINUX_MAJOR_VERSION = 2.41
13+
UTILLINUX_VERSION = $(UTILLINUX_MAJOR_VERSION).4
1414
UTILLINUX_TARBALL = util-linux-$(UTILLINUX_VERSION).tar.xz
1515
UTILLINUX_TARBALL_URLS += $(ONIE_MIRROR) \
16-
https://www.kernel.org/pub/linux/utils/util-linux/v$(UTILLINUX_VERSION)/
16+
https://www.kernel.org/pub/linux/utils/util-linux/v$(UTILLINUX_MAJOR_VERSION)/
1717

1818
ifneq ($(filter yes, $(EXT3_4_ENABLE) $(LVM2_ENABLE)),)
1919
UTILLINUX_FLAVOR = util-linux

upstream/e2fsprogs-1.46.3.tar.xz.sha1

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
e3c83517d8decc339e9fa0f5afe8246d3d0c6d82 e2fsprogs-1.47.4.tar.xz

upstream/flashrom-0.9.8.tar.bz2.sha1

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
298b12b3e30035c0041ddd641ebd4658e234fd23 flashrom-v1.7.0.tar.xz

upstream/util-linux-2.37.2.tar.xz.sha1

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0e61178c68875f33be327a7606429904d1663867 util-linux-2.41.4.tar.xz

0 commit comments

Comments
 (0)