Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for Accton platform build failure while doing incremental build #10541

Merged
merged 1 commit into from
May 9, 2022

Conversation

FuzailBrcm
Copy link
Contributor

Why I did it

PDDF kernel modules symbols are required while building Accton platform modules e.g. AS9716, AS7726, AS7816 etc. When a fresh clone is done and build is triggered, then 'sonic-platform-pddf_1.1_amd64.deb' pkg gets built and symvars file is backed up. This is used in Accton platforms kernel modules build.

However (since the DPKG_CACHE is enabled) if PDDF pkg is picked from the cache then the symvers file is not generated and hence Accton platform kernel modules build would fail.

make[2]: Entering directory '/usr/src/linux-headers-5.10.0-8-2-amd64'
WARNING: Symbol version dump "/sonic/platform/broadcom/sonic-platform-modules-accton/as7726-32x/modules/../../../../pddf/i2c/Module.symvers.PDDF" is missing.
         Modules may not have dependencies or modversions.
  MODPOST /sonic/platform/broadcom/sonic-platform-modules-accton/as7726-32x/modules/Module.symvers
ERROR: modpost: "access_psu_model_name" [/sonic/platform/broadcom/sonic-platform-modules-accton/as7726-32x/modules/pddf_custom_psu.ko] undefined!
ERROR: modpost: "access_psu_serial_num" [/sonic/platform/broadcom/sonic-platform-modules-accton/as7726-32x/modules/pddf_custom_psu.ko] undefined!
make[4]: *** [/usr/src/linux-headers-5.10.0-8-2-common/scripts/Makefile.modpost:124: /sonic/platform/broadcom/sonic-platform-modules-accton/as7726-32x/modules/Module.symvers] Error 1
make[4]: *** Deleting file '/sonic/platform/broadcom/sonic-platform-modules-accton/as7726-32x/modules/Module.symvers'
make[3]: *** [/usr/src/linux-headers-5.10.0-8-2-common/Makefile:1749: modules] Error 2
make[2]: *** [/usr/src/linux-headers-5.10.0-8-2-common/Makefile:185: __sub-make] Error 2
make[2]: Leaving directory '/usr/src/linux-headers-5.10.0-8-2-amd64'
running build
running build_py

How I did it

I added a 'derived package' called sonic-platform-pddf-sym which contains the files required for supporting other platform's build. This derived package wont be the part of the final binary, but used only during the build-time. Added dependency for Accton platforms on this new derived package.

How to verify it

After the first build, make some small changes in Accton platform AS7726's kernel module driver file and trigger the Accton pkg re-build. Check if AS7726 kernel modules are built properly.

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111

Description for the changelog

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

@FuzailBrcm
Copy link
Contributor Author

@Kalimuthu-Velappan @jostar-yang
Please review this PR

@FuzailBrcm
Copy link
Contributor Author

/azpw run Azure.sonic-buildimage

@mssonicbld
Copy link
Collaborator

/AzurePipelines run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@FuzailBrcm
Copy link
Contributor Author

/azpw run Azure.sonic-buildimage

@mssonicbld
Copy link
Collaborator

/AzurePipelines run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@Kalimuthu-Velappan
Copy link
Contributor

Kalimuthu-Velappan commented Apr 25, 2022

@Kalimuthu-Velappan @jostar-yang Please review this PR

Changes look fine

@adyeung
Copy link
Collaborator

adyeung commented May 9, 2022

@prgeor pls help review and signoff

@prgeor prgeor merged commit f579f61 into sonic-net:master May 9, 2022
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.

6 participants