sonic-buildimage/platform/broadcom
Ramasamy Chandramouli c436ce20be [PR:16737, PR:16739] platform-modules: pddf, broadcom/cel: adapt for kernel 6.1 and bookworm (#16954)
* sonic-platform-modules-cel: broadcom: adapt for kernel 6.1 and bookworm

The i2c_driver->remove API declaration has been updated to return void instead
of int, as part of cleanup patches in 6.1. More details can be referred from
here: [1]. Update the remove API definition in the modules accordingly and
cleanup variables that go unused from the remove API.

Update python build commands for bookworm. The packaging based on calling
setup.py is deprecated and using build module/pip utility is the recommended
method for python packaging/installation. Further details can be referred to
from here: [2], [3]. The build module is picky about the package information file,
which needs to be either setup.py or pyproject.toml.

Additionally, fix formatting inconsistencies in debian/changelog reported by
`dh_installchangelogs` during the build.

Tested the changes by compiling the changes as below:

    make sonic-slave-bash NOBUSTER=1 NOBULLSEYE=1
    sudo dpkg -i target/debs/bookworm/linux-headers-6.1.0-11-2-*.deb
    cd platform/broadcom/sonic-platform-modules-cel
    KVERSION=6.1.0-11-2-amd64 dpkg-buildpackage

Also verified the python scripts under the sonic-platform-modules-cel with
pyflakes to ensure no new errors are flagged (with exception of unused modules).

References:
   [1] - https://github.com/torvalds/linux/commit/ed5c2f5f
   [2] - https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.htm
   [3] - 0b20a4863 (Update Python build commands for Bookworm, 2023-09-07)

Signed-off-by: Ramasamy Chandramouli <rachandr@celestica.com>

* platform/pddf: i2c: adapt for kernel 6.1 and bookworm

   * Fixup i2c_driver->remove API due to changes in the function
     prototype (ref: [1]).

   * Cleanup `MODULE_SUPPORTED_DEVICE` macros that were cleaned up in
     the upstream (ref: [2]).

   * Sanitize python packaging and installation using the `build` module
   instead of calling the setup.py directly (ref: [3]. [4]).

Tested the changes by compiling pddf module as below:

     make sonic-slave-bash NOBUSTER=1 NOBULLSEYE=1
     sudo dpkg -i target/debs/bookworm/linux-headers-6.1.0-11-2-*.deb
     cd platform/pddf/i2c
     KVERSION=6.1.0-11-2-amd64 dpkg-buildpackage

References:
    [1] - https://github.com/torvalds/linux/commit/ed5c2f5f
    [2] - https://github.com/torvalds/linux/commit/6417f031
    [2] - https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.htm
    [3] - 0b20a4863 (Update Python build commands for Bookworm, 2023-09-07)

Signed-off-by: Ramasamy Chandramouli <rachandr@celestica.com>

* platform/broadcom: include platform-modules-cel in builds

With pddf modules patched for 6.1, platform-modules-cel can be compiled
and included in the final image.

Testing by building sonic-broadcom.bin/sonic-broadcom-dnx.bin.

Signed-off-by: Ramasamy Chandramouli <rachandr@celestica.com>

* pddf/i2c: revert correct rootdir for pip install

The pip install directory has been set to test-pkg1/ for testing the build and
incorrectly retained as is. Revert this to the correct path $(PACKAGE_PRE_NAME).

Signed-off-by: Ramasamy Chandramouli <rachandr@celestica.com>

* platform/broadcom: include pddf/modules-cel in the base package

Without this change, the modules were built but not packaged in the final .bin.

The final sonic-broadcom.bin has been tested for bootup on Celestica's
Silverstone platform.

   admin@sonic:~$ uname -a
   Linux sonic 6.1.0-11-2-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.38-4 (2023-08-08) x86_64 GNU/Linux
   admin@sonic:~$ show platform summary
   Platform: x86_64-cel_silverstone-r0
   HwSKU: Silverstone
   ASIC: broadcom
   ASIC Count: 1
   Serial Number: R4009B2F062504LK200024
   Model Number: N/A
   Hardware Revision: N/A
   admin@sonic:~$ show version | head

   SONiC Software Version: SONiC.g0aad6c67c-rachandr
   SONiC OS Version: 12
   Distribution: Debian 12.2
   Kernel: 6.1.0-11-2-amd64
   Build commit: 0aad6c67c
   Build date: Thu Oct 26 07:13:47 UTC 2023
   Built by: rachandr@AZUHPS14

   Platform: x86_64-cel_silverstone-r0

Signed-off-by: Ramasamy Chandramouli <rachandr@celestica.com>

---------

Signed-off-by: Ramasamy Chandramouli <rachandr@celestica.com>
2023-11-21 18:53:15 -08:00
..
docker-saiserver-brcm [SAIServer]Upgrade SAI server init script (#13175) (#13227) (#13232) 2023-01-06 11:44:34 +08:00
docker-syncd-brcm [infra] Support syslog rate limit configuration (#12490) 2022-12-20 10:53:58 +02:00
docker-syncd-brcm-dnx [infra] Support syslog rate limit configuration (#12490) 2022-12-20 10:53:58 +02:00
docker-syncd-brcm-dnx-rpc Install ptf afpacket module required by ptf_nn_agent. (#14503) 2023-05-17 11:34:43 -07:00
docker-syncd-brcm-rpc Revert "[SAI PTF]Support sai ptf v2 Syncd-rpc (#12761)" 2022-11-21 07:22:26 +00:00
saibcm-modules Update sonic-linux-kernel to use 6.1.38 2023-11-21 18:53:15 -08:00
saibcm-modules-dnx@504485cebc Update sonic-linux-kernel to use 6.1.38 2023-11-21 18:53:15 -08:00
sonic-platform-modules-accton [devices]: Fix eth0 hardware numbering using udev for AS4630-54PE platform. (#16464) 2023-09-23 00:43:12 -07:00
sonic-platform-modules-alphanetworks Update sonic-linux-kernel to use 6.1.38 2023-11-21 18:53:15 -08:00
sonic-platform-modules-arista@c2b98f6a9e [Arista] Update platform library submodules (#16701) 2023-11-17 17:15:39 -08:00
sonic-platform-modules-brcm-xlr-gts [broadcom] Replace popen function (#12106) 2022-10-10 10:12:26 -04:00
sonic-platform-modules-cel [PR:16737, PR:16739] platform-modules: pddf, broadcom/cel: adapt for kernel 6.1 and bookworm (#16954) 2023-11-21 18:53:15 -08:00
sonic-platform-modules-dell Update sonic-linux-kernel to use 6.1.38 2023-11-21 18:53:15 -08:00
sonic-platform-modules-delta [sonic-linux-kernel]: security update to kernel 4.19.152 (#6490) 2021-02-06 21:02:06 -08:00
sonic-platform-modules-ingrasys [platform-modules]: fix compile issues for platform driver under 4.19 2020-04-17 04:51:51 +00:00
sonic-platform-modules-inventec [inventec] Replace os.system and remove subprocess with shell=True (#12108) 2022-10-14 10:21:44 -04:00
sonic-platform-modules-juniper [device/juniper] Mitigation for security vulnerability (#11838) 2022-11-22 10:46:12 -05:00
sonic-platform-modules-mitac [sonic-linux-kernel]: security update to kernel 4.19.152 (#6490) 2021-02-06 21:02:06 -08:00
sonic-platform-modules-nokia@6b07af449c [Nokia][sonic-platform] Update Nokia sonic-platform submodule - SFP support for CMIS CDB operations (#16572) 2023-09-23 14:09:02 -07:00
sonic-platform-modules-quanta [device/quanta] Mitigation for security vulnerability (#11867) 2022-10-19 10:05:36 -04:00
sonic-platform-modules-ragile Update to Linux 5.10.179 (#15926) 2023-09-20 15:24:39 -07:00
sonic-platform-modules-ruijie [ruijie] Replace os.system and remove subprocess with shell=True (#12107) 2022-11-28 12:43:43 -05:00
sonic-platform-modules-tencent two platforms supporting S3IP SYSFS (TCS8400, TCS9400) (#12386) 2022-12-18 16:16:53 +08:00
sonic-platform-modules-ufispace [Ufispace][PDDF] Add PDDF support on S9110-32X, S8901-54XC, S7801-54XS and S6301-56ST (#16017) 2023-08-14 15:56:03 -07:00
docker-pde.dep [PDE]: introduce the SONiC Platform Development Env (#7510) 2021-07-24 16:24:43 -07:00
docker-pde.mk PDE migration to bullseye (#10836) 2022-07-13 11:58:47 -07:00
docker-saiserver-brcm.dep [build]: support for DPKG local caching (#4117) 2020-03-11 20:04:52 -07:00
docker-saiserver-brcm.mk [SAIServer]Upgrade SAI server init script (#13175) (#13227) (#13232) 2023-01-06 11:44:34 +08:00
docker-syncd-brcm-dnx-rpc.dep New sonic-buildimage images for Broadcom DNX ASIC family. (#7598) 2021-06-22 11:12:22 -07:00
docker-syncd-brcm-dnx-rpc.mk Upgrade broadcom platform containers(syncd/ saiserver/ syncd-rpc/ syncd-dnx-rpc) to bullseye (#10864) 2022-06-27 13:54:08 -07:00
docker-syncd-brcm-dnx.dep New sonic-buildimage images for Broadcom DNX ASIC family. (#7598) 2021-06-22 11:12:22 -07:00
docker-syncd-brcm-dnx.mk Upgrade broadcom platform containers(syncd/ saiserver/ syncd-rpc/ syncd-dnx-rpc) to bullseye (#10864) 2022-06-27 13:54:08 -07:00
docker-syncd-brcm-rpc.dep [build]: support for DPKG local caching (#4117) 2020-03-11 20:04:52 -07:00
docker-syncd-brcm-rpc.mk Revert "[SAI PTF]Support sai ptf v2 Syncd-rpc (#12761)" 2022-11-21 07:22:26 +00:00
docker-syncd-brcm.dep [build]: Fix syncd dpkg cache dependency issue (#6680) 2021-02-04 09:03:14 -08:00
docker-syncd-brcm.mk Upgrade broadcom platform containers(syncd/ saiserver/ syncd-rpc/ syncd-dnx-rpc) to bullseye (#10864) 2022-06-27 13:54:08 -07:00
libsaithrift-dev.dep [build]: support for DPKG local caching (#4117) 2020-03-11 20:04:52 -07:00
libsaithrift-dev.mk [bcm sai] upgrade Broadcom SAI to 7.1.0.0-5 (#11236) 2022-06-23 15:34:51 -07:00
one-aboot.dep [build]: support for DPKG local caching (#4117) 2020-03-11 20:04:52 -07:00
one-aboot.mk Add some config options to make gbsyncd optional (#16840) 2023-10-25 15:39:03 +08:00
one-image.dep [build]: support for DPKG local caching (#4117) 2020-03-11 20:04:52 -07:00
one-image.mk [Ufispace][PDDF] Add PDDF support on S9110-32X, S8901-54XC, S7801-54XS and S6301-56ST (#16017) 2023-08-14 15:56:03 -07:00
platform-modules-accton.dep [build]: support for DPKG local caching (#4117) 2020-03-11 20:04:52 -07:00
platform-modules-accton.mk Fix for Accton platform build failure when doing incremental build (#10541) 2022-05-09 12:17:38 -07:00
platform-modules-alphanetworks.dep [build]: support for DPKG local caching (#4117) 2020-03-11 20:04:52 -07:00
platform-modules-alphanetworks.mk [Alphanetworks] Add new platform BES2348T (#11196) 2022-09-15 21:34:52 -07:00
platform-modules-arista.dep [build]: support for DPKG local caching (#4117) 2020-03-11 20:04:52 -07:00
platform-modules-arista.mk [Arista] Update driver submodules (#9393) 2021-12-08 11:33:36 -08:00
platform-modules-brcm-xlr-gts.dep [build]: support for DPKG local caching (#4117) 2020-03-11 20:04:52 -07:00
platform-modules-brcm-xlr-gts.mk [build]: add buster docker as the last step of the build proces 2020-04-16 10:26:18 +00:00
platform-modules-cel.dep [build]: support for DPKG local caching (#4117) 2020-03-11 20:04:52 -07:00
platform-modules-cel.mk Sync platform-modules-belgite deb's kernel version 5.10.0-8-2 with master runtime kernel version 5.10.0-12-2 (#10946) 2022-08-18 12:56:04 +08:00
platform-modules-dell.dep [build]: support for DPKG local caching (#4117) 2020-03-11 20:04:52 -07:00
platform-modules-dell.mk Dell: E3224F platform onboarding (#16002) 2023-08-10 17:27:30 -07:00
platform-modules-delta.dep [build]: support for DPKG local caching (#4117) 2020-03-11 20:04:52 -07:00
platform-modules-delta.mk [platform/delta]: Add a new supported platform, Delta-agc032 (#4602) 2020-05-27 09:33:02 -07:00
platform-modules-ingrasys.dep [build]: support for DPKG local caching (#4117) 2020-03-11 20:04:52 -07:00
platform-modules-ingrasys.mk [build]: add buster docker as the last step of the build proces 2020-04-16 10:26:18 +00:00
platform-modules-inventec.dep [build]: support for DPKG local caching (#4117) 2020-03-11 20:04:52 -07:00
platform-modules-inventec.mk [Inventec] Add support for D6332 platform (#5304) 2020-10-20 11:37:16 -07:00
platform-modules-juniper.dep [build]: support for DPKG local caching (#4117) 2020-03-11 20:04:52 -07:00
platform-modules-juniper.mk [build]: add buster docker as the last step of the build proces 2020-04-16 10:26:18 +00:00
platform-modules-mitac.dep [build]: support for DPKG local caching (#4117) 2020-03-11 20:04:52 -07:00
platform-modules-mitac.mk [build]: add buster docker as the last step of the build proces 2020-04-16 10:26:18 +00:00
platform-modules-nokia.dep Added Nokia IXR7250E support (#7809) 2021-08-17 12:26:04 -07:00
platform-modules-nokia.mk Added Nokia IXR7250E support (#7809) 2021-08-17 12:26:04 -07:00
platform-modules-quanta.dep [build]: support for DPKG local caching (#4117) 2020-03-11 20:04:52 -07:00
platform-modules-quanta.mk [Quanta] Add and update platform and device files (#6971) 2021-06-21 09:24:41 -07:00
platform-modules-ragile.dep [Platform/Ragile] Support RA-B6510-48v8c platform (#7620) 2021-06-03 10:51:01 -07:00
platform-modules-ragile.mk [Ragile]Adapt kernel 5.10 for broadcom on RA-B6510-48V8C (#14809) 2023-08-04 12:01:49 -07:00
platform-modules-ruijie.dep [Ruijie] Add ruijie platform & device (#4954) 2021-02-24 16:45:27 -08:00
platform-modules-ruijie.mk [Ruijie] Add ruijie platform & device (#4954) 2021-02-24 16:45:27 -08:00
platform-modules-s6000.dep [build]: support for DPKG local caching (#4117) 2020-03-11 20:04:52 -07:00
platform-modules-tencent.dep two platforms supporting S3IP SYSFS (TCS8400, TCS9400) (#12386) 2022-12-18 16:16:53 +08:00
platform-modules-tencent.mk two platforms supporting S3IP SYSFS (TCS8400, TCS9400) (#12386) 2022-12-18 16:16:53 +08:00
platform-modules-ufispace.mk [ufispace][pddf] Add the pddf package dependency to the ufispace platform modules mk file. (#16302) 2023-08-29 09:45:28 -07:00
platform.conf one image implementation (#215) 2017-01-29 11:33:33 -08:00
raw-image.dep [build]: support for DPKG local caching (#4117) 2020-03-11 20:04:52 -07:00
raw-image.mk Flashrom refactoring for broadcom platforms (#7693) 2021-06-22 15:29:21 -07:00
rules.dep [PR:16737, PR:16739] platform-modules: pddf, broadcom/cel: adapt for kernel 6.1 and bookworm (#16954) 2023-11-21 18:53:15 -08:00
rules.mk [PR:16737, PR:16739] platform-modules: pddf, broadcom/cel: adapt for kernel 6.1 and bookworm (#16954) 2023-11-21 18:53:15 -08:00
sai-modules.dep [build]: Update the make cache mode for opennsl-module-dnx (#8391) 2021-08-10 07:27:01 -07:00
sai-modules.mk Update sonic-linux-kernel to use 6.1.38 2023-11-21 18:53:15 -08:00
sai.dep [build] use real wget for SAI_FLAGS (#12665) 2022-12-13 23:28:00 -08:00
sai.mk upgrade xgs SAI version to 8.4.21.0 (#16805) 2023-10-10 09:59:15 -07:00
sonic-pde-tests.dep [PDE]: introduce the SONiC Platform Development Env (#7510) 2021-07-24 16:24:43 -07:00
sonic-pde-tests.mk [bcm sai] upgrade Broadcom SAI to 7.1.0.0-5 (#11236) 2022-06-23 15:34:51 -07:00