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

Flashrom refactoring #6922

Merged
merged 2 commits into from
Apr 20, 2021
Merged

Conversation

santhosh-kt
Copy link
Contributor

@santhosh-kt santhosh-kt commented Mar 1, 2021

Why I did it

To build flashrom properly with dependency tracking.

How I did it

Moved flashrom code from platform/broadcom/sonic-platform-modules-dell/tools directory to src/flashrom directory.
At the end, flashrom_0.9.7_amd64.deb package is build which will be installed in the devices.

How to verify it

Attached logs as reference.
New Logs.txt

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

  • 201811
  • 201911
  • 202006
  • 202012

Description for the changelog

On branch flashrom-refactoring
Changes to be committed:
(use "git reset HEAD ..." to unstage)

    modified:   ../../build_debian.sh
    modified:   ../../files/build_templates/sonic_debian_extension.j2
    modified:   ../../platform/broadcom/platform-modules-dell.mk
    modified:   ../../platform/broadcom/sonic-platform-modules-dell/debian/platform-modules-s6100.install
    deleted:    ../../platform/broadcom/sonic-platform-modules-dell/tools/flashrom.sh
    new file:   ../../rules/flashrom.dep
    new file:   ../../rules/flashrom.mk
    modified:   ../../slave.mk
    new file:   Makefile
    renamed:    ../../platform/broadcom/sonic-platform-modules-dell/tools/0002-Flashrom-support-for-Intel-Rangeley-and-Denverton-CP.patch -> patch/0002-Flashrom-support-for-Intel-Rangeley-and-Denverton-CP.patch
    new file:   patch/0003-Debian-package-base.patch
    new file:   patch/0004-Flashrom-remove-tmpl.patch
    new file:   patch/series

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

@santhosh-kt
Copy link
Contributor Author

@jleveque : All builds passed.

Copy link
Contributor

@jleveque jleveque left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. @lguohan to review also.

@jleveque jleveque merged commit 7dd9d1f into sonic-net:master Apr 20, 2021
@dflynn-Nokia
Copy link
Contributor

Hi Santhosh,

It seems this change has broken the marvell-armhf platform build.
See output below.
Can you take a look?

Here's the steps to build for marvell-armhf

make init
make configure PLATFORM=marvell-armhf PLATFORM_ARCH=armhf
make target/debs/buster/flashrom_0.9.7_armhf.deb

Thanks

[ FAIL LOG START ] [ target/debs/buster/flashrom_0.9.7_armhf.deb ]
[ REASON ] : target/debs/buster/flashrom_0.9.7_armhf.deb does not exist
[ FLAGS FILE ] : []
[ FLAGS DEPENDS ] : []
[ FLAGS DIFF ] : []
make[1]: Entering directory '/sonic/src/flashrom'
rm -rf ./flashrom-0.9.7

Obtain flashrom

git clone https://github.com/flashrom/flashrom.git flashrom-0.9.7
pushd ./flashrom-0.9.7

Check out tag: tags/0.9.7

git checkout -b flashrom-src tags/0.9.7

Apply patch series

stg init
stg import -s ../patch/series

Build package

dpkg-buildpackage -rfakeroot -b -us -uc -j8
popd
mv flashrom_0.9.7_armhf.deb /sonic/target/debs/buster/
Cloning into 'flashrom-0.9.7'...
/sonic/src/flashrom/flashrom-0.9.7 /sonic/src/flashrom
Switched to a new branch 'flashrom-src'
dpkg-buildpackage: info: source package flashrom
dpkg-buildpackage: info: source version 0.9.7
dpkg-buildpackage: info: source distribution unstable
dpkg-buildpackage: info: source changed by Dell Team support@dell.com
dpkg-source --before-build .
dpkg-buildpackage: info: host architecture armhf
fakeroot debian/rules clean
make[2]: Entering directory '/sonic/src/flashrom/flashrom-0.9.7'
make[2]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule.
dh clean
make[2]: Leaving directory '/sonic/src/flashrom/flashrom-0.9.7'
debian/rules build
make[2]: Entering directory '/sonic/src/flashrom/flashrom-0.9.7'
make[2]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule.
dh build
make[2]: Leaving directory '/sonic/src/flashrom/flashrom-0.9.7'
fakeroot debian/rules binary
make[2]: Entering directory '/sonic/src/flashrom/flashrom-0.9.7'
make[2]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule.
dh binary
make[2]: Leaving directory '/sonic/src/flashrom/flashrom-0.9.7'
dpkg-genbuildinfo --build=binary
dpkg-genbuildinfo: error: binary build with no binary artifacts found; .buildinfo is meaningless
dpkg-buildpackage: error: dpkg-genbuildinfo --build=binary subprocess returned exit status 25
make[1]: *** [Makefile:9: /sonic/target/debs/buster/flashrom_0.9.7_armhf.deb] Error 25
make[1]: Leaving directory '/sonic/src/flashrom'
[ FAIL LOG END ] [ target/debs/buster/flashrom_0.9.7_armhf.deb ]
make: *** [slave.mk:418: target/debs/buster/flashrom_0.9.7_armhf.deb] Error 1
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Makefile.work:280: recipe for target 'target/debs/buster/flashrom_0.9.7_armhf.deb' failed
make[1]: *** [target/debs/buster/flashrom_0.9.7_armhf.deb] Error 2
make[1]: Leaving directory '/home/dflynn/data/git-repos/github-sonic-buildimage'
Makefile:7: recipe for target 'target/debs/buster/flashrom_0.9.7_armhf.deb' failed

lguohan added a commit that referenced this pull request Apr 25, 2021
raphaelt-nvidia pushed a commit to raphaelt-nvidia/sonic-buildimage that referenced this pull request May 23, 2021
#### Why I did it
To build flashrom properly with dependency tracking.

#### How I did it
Moved flashrom code from platform/broadcom/sonic-platform-modules-dell/tools directory to src/flashrom directory.
At the end, flashrom_0.9.7_amd64.deb package is build which will be installed in the devices.
raphaelt-nvidia pushed a commit to raphaelt-nvidia/sonic-buildimage that referenced this pull request May 23, 2021
carl-nokia pushed a commit to carl-nokia/sonic-buildimage that referenced this pull request Aug 7, 2021
#### Why I did it
To build flashrom properly with dependency tracking.

#### How I did it
Moved flashrom code from platform/broadcom/sonic-platform-modules-dell/tools directory to src/flashrom directory.
At the end, flashrom_0.9.7_amd64.deb package is build which will be installed in the devices.
carl-nokia pushed a commit to carl-nokia/sonic-buildimage that referenced this pull request Aug 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants