Skip to content

[AS5812-54X] Upgrade kernel from 4.14 to 6.12#200

Open
vincentchiang-ec wants to merge 1 commit into
accton:support_linux_6.12from
vincentchiang-ec:as5812-54x/upgrade-kernel-6.12
Open

[AS5812-54X] Upgrade kernel from 4.14 to 6.12#200
vincentchiang-ec wants to merge 1 commit into
accton:support_linux_6.12from
vincentchiang-ec:as5812-54x/upgrade-kernel-6.12

Conversation

@vincentchiang-ec

Copy link
Copy Markdown

Summary

Upgrades AS5812-54X from kernel 4.14 to 6.12 LTS. Covers the per-platform changes plus the longer chain of kernel API breakage that comes from skipping 4.19 / 5.4 / 6.1.

Config

  • modules/PKG.yml, modules/builds/Makefile: KERNELS switched to onl-kernel-6.12-lts-x86-64-all
  • platform-config/r0/.../x86-64-accton-as5812-54x-r0.yml: kernel anchor *kernel-4-14*kernel-6-12

Build layout

  • Moved cpld/fan/leds/psu.c from modules/builds/ into modules/builds/src/ with an explicit Kbuild (obj-m += ...). Newer kbuild builds each top-level .c as its own standalone module, so leds.c's references to as5812_54x_cpld_read/write failed modpost even though cpld.c exports them. The src/ subdir mirrors the convention already used by as5835-54x and other 6.12-ready platforms.

Driver API (4.14 → 6.12)

  • cpld.c:
    • i2c_driver.probe() single-arg signature; restore device id via i2c_client_get_device_id()
    • i2c_mux_add_adapter() drops the removed class argument (and the local class variable)
    • i2c_driver.remove() returns void
  • psu.c:
    • i2c_driver.probe() single-arg signature + i2c_client_get_device_id() (body still consumes dev_id->driver_data)
    • i2c_driver.remove() returns void
  • fan.c, leds.c: platform_driver.remove() returns void per 6.11+ API

ONLP

  • platform_lib.h: IDPROM_PATH switched from the pci-bus path (/sys/devices/pci0000:00/.../1-0057/eeprom) to /sys/bus/i2c/devices/1-0057/eeprom; the old path no longer enumerates on 6.12
  • sysi.c: zero-init onlp_onie_info_t onie to avoid the double-free path that has bitten other platforms on this branch

Test plan

  • onlpm --force --build onl-platform-modules-x86-64-accton-as5812-54x:amd64 — produces .deb with cpld.ko / fan.ko / leds.ko / psu.ko under /lib/modules/6.12.73-OpenNetworkLinux/onl/accton/x86-64-accton-as5812-54x/
  • onlpm --force --build onlp-x86-64-accton-as5812-54x-r0:amd64
  • onlpm --force --build onl-platform-config-x86-64-accton-as5812-54x-r0:amd64
  • Full installer image regenerated (make amd64 OK)
  • DUT install + onlpdump smoke test (pending HW access)

🤖 Generated with Claude Code

- modules/PKG.yml, modules/builds/Makefile: use
  onl-kernel-6.12-lts-x86-64-all
- modules/builds: move drivers into src/ subdir with explicit
  Kbuild (obj-m += ...) so cross-module EXPORT_SYMBOL refs
  resolve at modpost time; required because newer kbuild won't
  treat sibling .c files as a single module group
- platform-config r0 yml: kernel anchor *kernel-6-12
- cpld: i2c_driver.probe() single-arg signature + use
  i2c_client_get_device_id(); i2c_mux_add_adapter() loses the
  removed `class` arg; i2c_driver.remove() returns void
- psu: i2c_driver.probe() single-arg signature + use
  i2c_client_get_device_id(); i2c_driver.remove() returns void
- fan/leds: platform_driver.remove() returns void per kernel
  6.11+ API
- onlp platform_lib.h: IDPROM_PATH switch from
  /sys/devices/pci0000:00/.../1-0057 to /sys/bus/i2c/devices/1-0057
  (old path no longer enumerates on 6.12)
- onlp sysi.c: zero-init onlp_onie_info_t to avoid double-free
  on the failure path

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.

1 participant