Skip to content

packages: i2c-tools 4.4 (with machine patch refreshes) - #1141

Open
bhouse-nexthop wants to merge 2 commits into
opencomputeproject:onie-modernization-2026from
bhouse-nexthop:bhouse.i2c-tools-4.4
Open

bhouse-nexthop wants to merge 2 commits into
opencomputeproject:onie-modernization-2026from
bhouse-nexthop:bhouse.i2c-tools-4.4

Conversation

@bhouse-nexthop

@bhouse-nexthop bhouse-nexthop commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Targets onie-modernization-2026. Independent of the other modernization PRs. Split out of #1127 during review, because this bump needs changes to vendor machine trees.

What changes

Package From To
i2c-tools 3.1.1 4.4

ONIE uses i2c-tools only to build onie-syseeprom (I2CTOOLS_SYSEEPROM = yes). The stock i2c-tools binaries are not installed; busybox provides i2cget/i2cset/etc. Six machines set I2CTOOLS_SYSEEPROM = yes. None of them have the busybox syseeprom applet, so this is their only way to read the ONIE TLV EEPROM.

Machine patch changes

Five of the six machines carry i2c-tools patches that don't apply to 4.4:

Machines Problem Change
alphanetworks snh60a0_320f, snq60a0_320f, snx60a0_486f 002-i2ctools-sys-eeprom-delay-time.patch changes the post-write usleep(10) to usleep(5000); 4.4 already uses 5 ms (WRITE_DELAY_US 5000), so the patch has nothing left to change Dropped from the three series and deleted
same three 002-i2ctools-mux-set-alpha-*.patch: 4.4 rewrote the if ((r = ioctl(...)) < 0) checks in eeprom_open() as two lines, which broke the hunk context Refreshed; only context and line numbers change, the added lines are identical
celestica cel_redstone_xp, cel_smallstone_xp i2ctools-celestica-redstone-xp.patch replaces the upstream 24cXX code with Celestica's own sources; its sys_eeprom/Module.mk hunks no longer match 4.4 Module.mk hunks refreshed; C sources untouched
dell dell_s6000_s1220 — none needed

One behaviour change, on the three alphanetworks machines: 2-byte EEPROM writes (i2c_write_2b), which their patch did not touch, also go from a 10 µs to a 5 ms post-write delay. That is the delay those machines already chose for 1- and 3-byte writes, and in line with typical EEPROM write-cycle times.

Testing

bhouse-nexthop added a commit to bhouse-nexthop/onie that referenced this pull request Oct 6, 2026
Squashed content of PR opencomputeproject#1141, pulled in as a dependency: older package versions do not build under GCC 14.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Brad House <bhouse@nexthop.ai>
bhouse-nexthop added a commit to bhouse-nexthop/onie that referenced this pull request Oct 6, 2026
…sstool-NG 1.28 / uClibc-ng 1.0.54)

Squashed content of PR opencomputeproject#1129, pulled in as a dependency.  (PR opencomputeproject#1129 in
turn carries PRs opencomputeproject#1127, opencomputeproject#1140, opencomputeproject#1141 and opencomputeproject#1128 -- including the
secure-boot stack: shim 16.1, host pesign, grub SBAT -- so they are
transitively included here.)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Brad House <bhouse@nexthop.ai>
bhouse-nexthop added a commit to bhouse-nexthop/onie that referenced this pull request Oct 6, 2026
Squashed content of PR opencomputeproject#1141, pulled in as a dependency: older package versions do not build under GCC 14.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Brad House <bhouse@nexthop.ai>
bhouse-nexthop added a commit to bhouse-nexthop/onie that referenced this pull request Oct 6, 2026
…sstool-NG 1.28 / uClibc-ng 1.0.54)

Squashed content of PR opencomputeproject#1129, pulled in as a dependency.  (PR opencomputeproject#1129 in turn carries PRs opencomputeproject#1142, opencomputeproject#1127, opencomputeproject#1140, opencomputeproject#1141 and opencomputeproject#1128 -- including the secure-boot stack: shim 16.1, host pesign, grub SBAT -- so they are transitively included here.)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Brad House <bhouse@nexthop.ai>
bhouse-nexthop added a commit to bhouse-nexthop/onie that referenced this pull request Oct 6, 2026
Squashed content of PR opencomputeproject#1141, pulled in as a dependency: older package versions do not build under GCC 14.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Brad House <bhouse@nexthop.ai>
bhouse-nexthop added a commit to bhouse-nexthop/onie that referenced this pull request Oct 6, 2026
…sstool-NG 1.28 / uClibc-ng 1.0.54)

Squashed content of PR opencomputeproject#1129, pulled in as a dependency.  (PR opencomputeproject#1129 in turn carries PRs opencomputeproject#1142, opencomputeproject#1127, opencomputeproject#1140, opencomputeproject#1141 and opencomputeproject#1128 -- including the secure-boot stack: shim 16.1, host pesign, grub SBAT -- so they are transitively included here.)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Brad House <bhouse@nexthop.ai>
bhouse-nexthop added a commit to bhouse-nexthop/onie that referenced this pull request Oct 6, 2026
…the full stack

Integration branch: opencomputeproject#1142, opencomputeproject#1127, opencomputeproject#1140, opencomputeproject#1141, opencomputeproject#1128, opencomputeproject#1129, opencomputeproject#1130, opencomputeproject#1131, opencomputeproject#1132 (via the opencomputeproject#1132 stack) plus opencomputeproject#1133.  Not for merge; regenerated whenever any of those PRs change.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Brad House <bhouse@nexthop.ai>
bhouse-nexthop added a commit to bhouse-nexthop/onie that referenced this pull request Oct 6, 2026
Squashed content of PR opencomputeproject#1141, pulled in as a dependency: older package versions do not build under GCC 14.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Brad House <bhouse@nexthop.ai>
bhouse-nexthop added a commit to bhouse-nexthop/onie that referenced this pull request Oct 6, 2026
…sstool-NG 1.28 / uClibc-ng 1.0.54)

Squashed content of PR opencomputeproject#1129, pulled in as a dependency.  (PR opencomputeproject#1129 in turn carries PRs opencomputeproject#1142, opencomputeproject#1127, opencomputeproject#1140, opencomputeproject#1141 and opencomputeproject#1128 -- including the secure-boot stack: shim 16.1, host pesign, grub SBAT -- so they are transitively included here.)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Brad House <bhouse@nexthop.ai>
bhouse-nexthop added a commit to bhouse-nexthop/onie that referenced this pull request Oct 6, 2026
…the full stack

Integration branch: opencomputeproject#1142, opencomputeproject#1127, opencomputeproject#1140, opencomputeproject#1141, opencomputeproject#1128, opencomputeproject#1129, opencomputeproject#1130, opencomputeproject#1131, opencomputeproject#1132 (via the opencomputeproject#1132 stack) plus opencomputeproject#1133.  Not for merge; regenerated whenever any of those PRs change.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Brad House <bhouse@nexthop.ai>
bhouse-nexthop added a commit to bhouse-nexthop/onie that referenced this pull request Oct 7, 2026
…sstool-NG 1.28 / uClibc-ng 1.0.54)

Squashed content of PR opencomputeproject#1129, pulled in as a dependency.  (PR opencomputeproject#1129 in turn carries PRs opencomputeproject#1142, opencomputeproject#1127, opencomputeproject#1140, opencomputeproject#1141 and opencomputeproject#1128 -- including the secure-boot stack: shim 16.1, host pesign, grub SBAT -- so they are transitively included here.)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Brad House <bhouse@nexthop.ai>
bhouse-nexthop added a commit to bhouse-nexthop/onie that referenced this pull request Oct 7, 2026
…the full stack

Integration branch: opencomputeproject#1142, opencomputeproject#1127, opencomputeproject#1140, opencomputeproject#1141, opencomputeproject#1128, opencomputeproject#1129, opencomputeproject#1130, opencomputeproject#1131, opencomputeproject#1132 (via the opencomputeproject#1132 stack) plus opencomputeproject#1133.  Not for merge; regenerated whenever any of those PRs change.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Brad House <bhouse@nexthop.ai>
bhouse-nexthop added a commit to bhouse-nexthop/onie that referenced this pull request Oct 7, 2026
Squashed content of PR opencomputeproject#1141, pulled in as a dependency: older package versions do not build under GCC 14.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Brad House <bhouse@nexthop.ai>
bhouse-nexthop added a commit to bhouse-nexthop/onie that referenced this pull request Oct 7, 2026
…sstool-NG 1.28 / uClibc-ng 1.0.54)

Squashed content of PR opencomputeproject#1129, pulled in as a dependency.  (PR opencomputeproject#1129 in turn carries PRs opencomputeproject#1142, opencomputeproject#1127, opencomputeproject#1140, opencomputeproject#1141 and opencomputeproject#1128 -- including the secure-boot stack: shim 16.1, host pesign, grub SBAT -- so they are transitively included here.)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Brad House <bhouse@nexthop.ai>
bhouse-nexthop added a commit to bhouse-nexthop/onie that referenced this pull request Oct 7, 2026
…the full stack

Integration branch: opencomputeproject#1142, opencomputeproject#1127, opencomputeproject#1140, opencomputeproject#1141, opencomputeproject#1128, opencomputeproject#1129, opencomputeproject#1130, opencomputeproject#1131, opencomputeproject#1132 (via the opencomputeproject#1132 stack) plus opencomputeproject#1133.  Not for merge; regenerated whenever any of those PRs change.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Brad House <bhouse@nexthop.ai>
@mshych

mshych commented Nov 30, 2026

Copy link
Copy Markdown
Collaborator

master is now merged into onie-modernization-2026, including your #1139. This PR conflicts only in build-config/make/i2ctools.make. That conflict isn't from #1139: a follow-up commit on master added a Wayback Machine URL for i2c-tools 3.1.1, because the old host is gone. Take this PR's side (4.4 from kernel.org). Please rebase once #1142 is in.

One change is needed beyond the rebase. patches/i2ctools/gitignore.patch is still in the series and fails on 4.4 for every machine:

error: .gitignore: does not exist in index
stg import: Diff does not apply cleanly
Upstream 4.4's .gitignore starts with .*, so the git add . in apply-patch-series never indexes .gitignore itself. Please drop the patch from the series; it only adds ignore entries. I reproduced the real cp-machine-patches and apply-patch-series step against the 4.4 tarball. Without that patch, all 8 machine series apply cleanly: the 6 I2CTOOLS_SYSEEPROM=yes machines, plus cls_ds4101 and supermicro_sse_t7132s, which carry series but don't enable it. CI doesn't build i2c-tools, so a local build of at least one of those machines would be good before review.

If you'd rather I resolve it at merge time, let me know.

i2c-tools 3.1.1 -> 4.4 (latest).  jdelvare.nerim.net is dead -> kernel.org
(.tar.bz2 -> .tar.gz).  Rework the 2 remaining ONIE patches for the 4.x
layout (eepromer/ -> eeprog/, static libi2c, include/i2c/smbus.h).

Drop gitignore.patch.  4.4 ships its own .gitignore, and its first rule
is ".*", so the "git add ." in apply-patch-series never indexes
.gitignore itself and the patch fails to import ("error: .gitignore:
does not exist in index") for every machine.  The patch only added
ignore entries for build outputs; nothing depends on it.

Signed-off-by: Brad House <bhouse@nexthop.ai>
Five of the six machines that build onie-syseeprom from i2c-tools
(I2CTOOLS_SYSEEPROM = yes) carry patches that no longer apply to 4.4,
so they could not build onie-syseeprom -- and since their busybox has
no syseeprom applet, that is their only way to read the ONIE TLV
EEPROM.  CI does not catch this: kvm_x86_64 does not use i2c-tools.

alphanetworks snh60a0_320f, snq60a0_320f, snx60a0_486f:
  - Drop 002-i2ctools-sys-eeprom-delay-time.patch from their series and
    delete it.  It changed the post-write delays in 24cXX.c from
    usleep(10) to usleep(5000); 4.4 already does that upstream
    (WRITE_DELAY_US 5000), so the patch had nothing left to change.
    Side effect: the 2-byte write path, which the patch did not touch,
    also goes from 10us to 5ms -- the same delay these machines chose
    for the other two paths, and in line with typical EEPROM write
    cycle times.
  - Refresh 002-i2ctools-mux-set-alpha-*.patch: 4.4 rewrote the
    "if ((r = ioctl(...)) < 0)" checks in eeprom_open() as two lines,
    which broke the hunk context.  Only context and line numbers
    change; the added lines are identical.

celestica cel_redstone_xp, cel_smallstone_xp:
  - Refresh the sys_eeprom/Module.mk hunks of
    i2ctools-celestica-redstone-xp.patch.  The patch replaces upstream's
    24cXX EEPROM code with Celestica's own cpld/i2c sources, and 4.4
    changed the Module.mk lines around it (24cXX now builds against
    <i2c/smbus.h> and links libi2c).  The C sources are untouched;
    onie-syseeprom links the same objects as before plus -lz.

dell dell_s6000_s1220 already applies and builds.

Verified with the build's own cp-machine-patches and apply-patch-series
(git add . + stg import) on the 4.4 tarball: all 8 machine i2ctools
series apply (these 6 plus cls_ds4101 and supermicro_sse_t7132s).
onie-syseeprom cross-builds for all 6 with the x86_64 GCC 8.3.0
toolchain, not with their own GCC 4.9.2 one: the gcc-4.9.2 crosstool
configs predate crosstool-NG 1.24, which aborts on the x86_64 one
("Internal ct-ng error: 'LINUX' not defined").  That is independent of
this change.

Signed-off-by: Brad House <bhouse@nexthop.ai>
@bhouse-nexthop

Copy link
Copy Markdown
Contributor Author

Thanks. Rebased onto onie-modernization-2026 (d662246) and force-pushed.

  • i2ctools.make: took 4.4 from kernel.org.
  • Dropped patches/i2ctools/gitignore.patch and its series line (squashed into the bump commit). I reproduced your failure first: with the patch, 0 of 8 machine series import (error: .gitignore: does not exist in index); without it, all 8 apply through cp-machine-patches + apply-patch-series on the 4.4 tarball.
  • Local build: onie-syseeprom cross-builds against 4.4 for all six I2CTOOLS_SYSEEPROM=yes machines. I could not build a full image of any of them: they use GCC 4.9.2, and the gcc-4.9.2 crosstool configs are in the pre-1.24 crosstool-NG format (ct-ng 1.24 stops with "Internal ct-ng error: 'LINUX' not defined"). So I built them with the x86_64 GCC 8.3.0 toolchain (make i2ctools-install with GCC_VERSION=8.3.0 and the 5.4.86 headers). That toolchain problem is on the base already and isn't related to this PR.
  • I also corrected the second commit message. It claimed git apply is as strict as the build's stg import. It isn't, and that is how gitignore.patch got through.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants