Skip to content

Kernel ABI update from version 6 to version 6-2#145

Merged
lguohan merged 2 commits intosonic-net:masterfrom
olivier-singla:abi_update
Jun 12, 2020
Merged

Kernel ABI update from version 6 to version 6-2#145
lguohan merged 2 commits intosonic-net:masterfrom
olivier-singla:abi_update

Conversation

@olivier-singla
Copy link
Copy Markdown
Contributor

@olivier-singla olivier-singla commented Jun 5, 2020

By changing the kernel ABI from version 6 to version 6-2, this will allow to disable the kernel ABI check which Debian performs at the very end of the kernel build.

In SONiC branch 201911 (Stretch), there is this patch which is applied:

packaging-update-abiname-to-11-2.patch

It changes the kernel ABI from 11 to 11-2

This has the side effect to disable the ABI check performed by the script
debian/bin/buildcheck.py

This is because the buildcheck.py script is looking to compare the file
debian/build/build_amd64_none_amd64/Module.symvers
(generated by the build)
with the file
debian/abi/4.9.0-11-2/amd64_none_amd64

But since the ABI has changed, the Debian file checked-in is still:
debian/abi/4.9.0-11/amd64_none_amd64

So buildcheck.py, not finding the file
debian/abi/4.9.0-11-2/amd64_none_amd64
just bails out, without error, and will not check the ABI change.

In SONiC latest master branch, based on Buster, there is no such patch to change the ABI.
The script buildcheck.py will then compare the file
debian/build/build_amd64_none_amd64/Module.symvers
with the file
debian/abi/4.19.0-6/amd64_none_amd64

so any ABI change will be effectively checked..

For example, the patch:
Support-for-fullcone-nat.patch
which apply fine with SONiC 201911 (Stretch) can not currently be applied in the master branch (Buster), because there is a change in a global kernel structure
(include/net/netfilter/nf_conntrack.h in this example).

Without changing the kernel ABI, many patches might just fail because the ABI check., this is why we want to change the kernel ABI.

Please note that this PR nnees also this PR:
sonic-net/sonic-buildimage#4711

By changing the kernel ABI from version 6 to version 6-2, this will allow
to disable the kernel ABI check which Debian performs at the very end of
the kernel build.
@olivier-singla olivier-singla changed the title Abi update Kernel ABI update from version 6 to version 6-2 Jun 5, 2020
@lguohan
Copy link
Copy Markdown
Contributor

lguohan commented Jun 8, 2020

if we later merge your kernel configure change pr, will abi number change?

@rajendra-dendukuri
Copy link
Copy Markdown

if we later merge your kernel configure change pr, will abi number change?

No. There will be no need to bump the ABI one more time after the NAT patch is pushed.

@lguohan
Copy link
Copy Markdown
Contributor

lguohan commented Jun 12, 2020

retest this please

@lguohan lguohan merged commit 0776e9f into sonic-net:master Jun 12, 2020
@lguohan lguohan linked an issue Jun 26, 2020 that may be closed by this pull request
dal00 pushed a commit to kamelnetworks/sonic-linux-kernel that referenced this pull request Jul 20, 2025
Fix hostcfgd modify_single_file method generates empty file issue

#### Why I did it
Fix hostcfgd modify_single_file method generates empty file issue: sonic-net/sonic-buildimage#19748

In the original code, there are 2 'mv' commands to backup and copy new file, if hostcfgd crash between those 2 commands, the original file will be removed, then when hostcfgd restart later, it will generate a empty file.

The issue can be fix by use cp command.

##### Work item tracking
- Microsoft ADO: 29064569

#### How I did it
Replace 'mv' command to 'cp' command

#### How to verify it
Manually verified.
Pass all test case.

<!--
If PR needs to be backported, then the PR must be tested against the base branch and the earliest backport release branch and provide tested image version on these two branches. For example, if the PR is requested for master, 202211 and 202012, then the requester needs to provide test results on master and 202012.
-->

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

<!--
- Note we only backport fixes to a release branch, *not* features!
- Please also provide a reason for the backporting below.
- e.g.
- [x] 202006
-->

- [ ] 201811
- [ ] 201911
- [ ] 202006
- [ ] 202012
- [ ] 202106
- [ ] 202111
- [ ] 202205
- [ ] 202211
- [ ] 202305

#### Tested branch (Please provide the tested image version)

<!--
- Please provide tested image version
- e.g.
- [x] 20201231.100
-->

will updated with this PR image later.
- [] SONiC.master-16482.360728-2c8b4066f

#### Description for the changelog
Fix hostcfgd modify_single_file method generates empty file issue

#### Link to config_db schema for YANG module changes
<!--
Provide a link to config_db schema for the table for which YANG model
is defined
Link should point to correct section on https://github.com/Azure/sonic-buildimage/blob/master/src/sonic-yang-models/doc/Configuration.md
-->

#### A picture of a cute animal (not mandatory but encouraged)
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.

ABI check in Buster

3 participants