Skip to content

New script tarball_multi_releases.sh to combine releases - #91

Merged
lgirdwood merged 2 commits into
thesofproject:mainfrom
marc-hb:combine-releases
Sep 15, 2022
Merged

lgirdwood merged 2 commits into
thesofproject:mainfrom
marc-hb:combine-releases

Conversation

@marc-hb

@marc-hb marc-hb commented Sep 7, 2022

Copy link
Copy Markdown
Collaborator

This is required to combine platforms from v2.2 and v2.3 releases

Signed-off-by: Marc Herbert marc.herbert@intel.com

@mengdonglin

Copy link
Copy Markdown
Contributor

@marc-hb Thank you! Tested and it works well with a mock v2.3.x folder for me.

@mengdonglin

mengdonglin commented Sep 8, 2022 •

Copy link
Copy Markdown
Contributor

@marc-hb @keqiaozhang I have only one open but it's not a problem of this script itself.

Should we remove all *.ldc files from https://github.com/thesofproject/sof-bin/tree/main/v2.2.x/sof-v2.2/intel-signed for v2.2.2?

For v2.1.x and previous releases, we never put *.ldc file in intel-signed folder. Instead, both intel-signed and community share the same *.ldc in the parent directory.

But from v2.2, we have *.ldc files in both intel-signed and its parent directory. Only *.ldc in sof-v2.2 are targets of symbol links:
sof-bin/v2.2.x/sof-v2.2$ ll | grep ldc
lrwxrwxrwx sof-adl.ldc -> sof-tgl.ldc
lrwxrwxrwx sof-adl-s.ldc -> sof-tgl-h.ldc
-rw-rw-r-- sof-apl.ldc
-rw-rw-r-- sof-bdw.ldc
-rw-rw-r-- sof-byt.ldc
lrwxrwxrwx sof-cfl.ldc -> sof-cnl.ldc
-rw-rw-r-- sof-cht.ldc
lrwxrwxrwx sof-cml.ldc -> sof-cnl.ldc
-rw-rw-r-- sof-cnl.ldc
lrwxrwxrwx sof-ehl.ldc -> sof-tgl.ldc
lrwxrwxrwx sof-glk.ldc -> sof-apl.ldc
-rw-rw-r-- sof-icl.ldc
-rw-rw-r-- sof-jsl.ldc
-rw-rw-r-- sof-tgl-h.ldc
-rw-rw-r-- sof-tgl.ldc

For v2.3, we may only put *.ldc in sof-v2.3 as we did for v2.1.x before. But when we combine v2.3 and v2.2.2 with this script, those old v2.2.2 *.ldc files in intel-signed will be kept in the combined tar ball.

@marc-hb
marc-hb marked this pull request as ready for review September 8, 2022 15:20
@mengdonglin

Copy link
Copy Markdown
Contributor

Should we remove all *.ldc files from https://github.com/thesofproject/sof-bin/tree/main/v2.2.x/sof-v2.2/intel-signed for v2.2.2?

Anyway, this is not a big problem. We can keep these *.ldc files, because new v2.3 zephyr-based FW binaries won't need *.ldc for logging output.

@marc-hb

marc-hb commented Sep 8, 2022

Copy link
Copy Markdown
Collaborator Author

Thanks @mengdonglin for the testing, much appreciated.

Also thanks for spotting the duplicate *.ldc files. I just submitted their removal in brand new PR #92

@mengdonglin

Copy link
Copy Markdown
Contributor

@marc-hb Thank you for #92 :)

Two minor opens:

  • Do we want to keep tarball_fw_versions.bash in the tar ball? Not sure if OSV(s) still need it after generating the tar ball.
  • Can we also include version of the symbolic links *.ri and *.ldc in the manifest after combination?
    Now the manifest only includes the version of real *.ri and *.ldc files. We may also want to check if different versions of symbolic links are also combined as we expected.
    $vim manifest.txt
    v2.2 ./community/sof-apl.ri
    v2.2 ./community/sof-cnl.ri
    v2.2 ./community/sof-icl.ri
    v2.2 ./community/sof-jsl.ri
    v2.2 ./intel-signed/sof-apl.ri
    v2.2 ./intel-signed/sof-cnl.ri
    v2.2 ./intel-signed/sof-ehl.ri
    v2.2 ./intel-signed/sof-icl.ri
    v2.2 ./intel-signed/sof-jsl.ri
    v2.2 ./sof-apl.ldc
    v2.2 ./sof-bdw.ldc
    v2.2 ./sof-bdw.ri
    v2.2 ./sof-byt.ldc
    v2.2 ./sof-byt.ri
    v2.2 ./sof-cht.ldc
    v2.2 ./sof-cht.ri
    v2.2 ./sof-cnl.ldc
    v2.2 ./sof-icl.ldc
    v2.2 ./sof-jsl.ldc
    v2.2 ./sof-tgl.ldc
    v2.2 ./sof-tgl-h.ldc
    v2.3 ./community/sof-tgl.ri
    v2.3 ./community/sof-tgl-h.ri
    v2.3 ./intel-signed/sof-adl.ri
    v2.3 ./intel-signed/sof-adl-s.ri
    v2.3 ./intel-signed/sof-tgl.ri
    v2.3 ./intel-signed/sof-tgl-h.ri

@marc-hb
marc-hb marked this pull request as draft September 9, 2022 05:24
@marc-hb

marc-hb commented Sep 9, 2022

Copy link
Copy Markdown
Collaborator Author

I got tired of manually inspecting tarballs after every .sh change so I submitted some automated tests, please review #93 first and then I will rebase this. Sorry for the delay.

@lgirdwood

Copy link
Copy Markdown
Member

@marc-hb will this also work if we use a different FW name for v2.3 e.g sofz-tgl.ri and keep the default links pointing to the v2.2 release for TGL ?

@marc-hb

marc-hb commented Sep 9, 2022

Copy link
Copy Markdown
Collaborator Author

Probably not as it is now... why would we change the firmware name to sofz-tgl.ri? The Linux kernel does not know anything about Zephyr, it will always be looking for the same filename. It only knows about IPC3 vs IPC4.

@mengdonglin

mengdonglin commented Sep 9, 2022 •

Copy link
Copy Markdown
Contributor

@marc-hb will this also work if we use a different FW name for v2.3 e.g sofz-tgl.ri and keep the default links pointing to the v2.2 release for TGL ?

@lgirdwood @marc-hb If we want to use v2.2 as default for Linux distributions and use sofz-*.ri to name v2.3 Zephyr-buildings, we needn't add any symbolic links under v2.3.x/sof-v2.3 to sofz-*.ri in intel-signed directory. Thus this scripts can support combining v2.2 sof-*.ri and v2.3 sofz-*.ri, and keep the default links pointing to the v2.2 sof-*.ri files.

For people who want to try v2.3 sofz-*.ri, they can set fw_filename=sofz-<platform name>.ri in kernel parameter.

Did a quick test with v2.2 and a mock v2.3. The combined sof-bin-v2.3 will be like:
$tree .
├── community
│   ├── sof-adl.ri -> sof-tgl.ri
│   ├── sof-adl-s.ri -> sof-tgl-h.ri
│   ├── ...
│   ├── sof-tgl-h.ri
│   ├── sof-tgl.ri
│   ├── sofz-adl.ri -> sofz-tgl.ri
│   ├── sofz-adl-s.ri -> sofz-tgl-h.ri
│   ├── sofz-rpl.ri -> sofz-tgl.ri
│   ├── sofz-rpl-s.ri -> sofz-tgl-h.ri
│   ├── sofz-tgl-h.ri
│   └── sofz-tgl.ri
├── intel-signed
│   ├── sof-adl.ri
│   ├── sof-adl-s.ri
│   ├── ...
│   ├── sof-tgl-h.ri
│   ├── sof-tgl.ri
│   ├── sofz-adl.ri
│   ├── sofz-adl-s.ri
│   ├── sofz-rpl.ri -> sofz-adl.ri
│   ├── sofz-rpl-s.ri -> sofz-adl-s.ri
│   ├── sofz-tgl-h.ri
│   └── sofz-tgl.ri
├── ...
├── sof-adl.ldc -> sof-tgl.ldc
├── sof-adl.ri -> intel-signed/sof-adl.ri
├── sof-adl-s.ldc -> sof-tgl-h.ldc
├── sof-adl-s.ri -> intel-signed/sof-adl-s.ri
...

@lgirdwood

Copy link
Copy Markdown
Member

│   ├── sofz-adl.ri -> sofz-tgl.ri
│   ├── sofz-adl-s.ri -> sofz-tgl-h.ri

We dont need the links as Zephyr option is "opt-in" i.e default will be the v2.2

@marc-hb
marc-hb force-pushed the combine-releases branch 2 times, most recently from d20606e to 9d9ba34 Compare September 10, 2022 00:59
@marc-hb

marc-hb commented Sep 10, 2022

Copy link
Copy Markdown
Collaborator Author

Do we want to keep tarball_fw_versions.bash in the tar ball?

Fixed in last force push. More coming.

@mengdonglin

mengdonglin commented Sep 10, 2022 •

Copy link
Copy Markdown
Contributor

│   ├── sofz-adl.ri -> sofz-tgl.ri
│   ├── sofz-adl-s.ri -> sofz-tgl-h.ri

We dont need the links as Zephyr option is "opt-in" i.e default will be the v2.2

@lgirdwood We have these links in community and intel-signed because the Zephyr-building FW binaries will be same for these platforms. Good to keep?

User will still use v2.2 XTOS intel-signed/sof-*.ri by default. Because all symbol links in the parent directory sof (to be /lib/firmware/intel/sof in Linux distribution) still point to v2.2 intel-signed/sof-*.ri:
sof
├── community
│   ├── ...
├── intel-signed
│   ├── ...
├── sof-adl.ri -> intel-signed/sof-adl.ri ... This is v2.2 intel-signed XTOS-building FW, not Zephyr-building FW.
├── sof-adl-s.ri -> intel-signed/sof-adl-s.ri
├── sof-tgl-h.ri -> intel-signed/sof-tgl-h.ri
└── sof-tgl.ri -> intel-signed/sof-tgl.ri
...

@marc-hb
marc-hb force-pushed the combine-releases branch 2 times, most recently from e4a4684 to dbb73ee Compare September 13, 2022 07:46
@marc-hb

marc-hb commented Sep 13, 2022 •

Copy link
Copy Markdown
Collaborator Author

Can we also include version of the symbolic links *.ri and *.ldc in the manifest after combination?

Done + other sanity checks.

Also moved the top-level directory one level down for consistency and to ease combination with topologies.

@mengdonglin

Copy link
Copy Markdown
Contributor

Can we also include version of the symbolic links *.ri and *.ldc in the manifest after combination?

Done + other sanity checks.

Also moved the top-level directory one level down for consistency and to ease combination with topologies.

@marc-hb Thank you! Tested and it looks really nice!

@lgirdwood

Copy link
Copy Markdown
Member

│   ├── sofz-adl.ri -> sofz-tgl.ri
│   ├── sofz-adl-s.ri -> sofz-tgl-h.ri

We dont need the links as Zephyr option is "opt-in" i.e default will be the v2.2

@lgirdwood We have these links in community and intel-signed because the Zephyr-building FW binaries will be same for these platforms. Good to keep?

oh yes - good to keep, I did not see the z in the file name.

@marc-hb
marc-hb force-pushed the combine-releases branch 3 times, most recently from 5228c36 to 89fb64f Compare September 15, 2022 09:00
@marc-hb
marc-hb marked this pull request as ready for review September 15, 2022 09:00
@marc-hb

marc-hb commented Sep 15, 2022 •

Copy link
Copy Markdown
Collaborator Author

Latest version can combine anything and everything: sof-v1.2.3, tools-v4.5.6 and also sof-tplg.

Also added a test that provides a sample usage and corresponding output

This is required to combine platforms from v2.2 and v2.3 releases

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
@marc-hb marc-hb changed the title New script tarball_fw_versions.sh to combine releases New script tarball_multi_releases.sh to combine releases Sep 15, 2022
@mengdonglin mengdonglin mentioned this pull request Sep 15, 2022
@lgirdwood
lgirdwood merged commit 55e77be into thesofproject:main Sep 15, 2022
@marc-hb
marc-hb deleted the combine-releases branch September 15, 2022 14:07
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.

3 participants