[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1034495: ITP: linux-board-support-package-dragonboard845c -- Firmware for dragonboard845c / RB3



Dear Dmitry,

Thanks for your response!
Very informative.

And the ultimate goal is to have a debian-installer image.
So this firmware upload is just the first step.

Let me reply to you inline below.

On Mon, Apr 17, 2023 at 3:15 AM Dmitry Baryshkov
<dmitry.baryshkov@linaro.org> wrote:
>
> On Mon, 17 Apr 2023 at 03:09, Roger Shimizu <rosh@debian.org> wrote:
> >
> > Package: wnpp
> > Severity: wishlist
> > Owner: Roger Shimizu <rosh@debian.org>
> > X-Debbugs-Cc: debian-devel@lists.debian.org
> >
> > * Package name    : linux-board-support-package-dragonboard845c
> >   Version         : 20190529180356-v4
> >   Upstream Author : Linaro
> > * URL             : https://releases.linaro.org/96boards/dragonboard845c/qualcomm/firmware
> > * License         : non-free
> >   Description     : Firmware for dragonboard845c / RB3
> >
> >  This package contains the binary firmware for GPU, USB, DSP hardware
> >  coprocessors found on SDM845, which is the main SoC on the
> >  Dragonboard 845c / RB3.
>
> Generally, I think there is some misunderstanding here. Most of the
> firmware has been pushed to linux-firmware already (where possible).
> You probably have some other intentions here. If so, please describe them.

Thanks for the upstreaming work!
I checked package firmware-qcom-soc [1], and found GPU / Audio DSP /
Modem firmware is already there.

[1] https://packages.debian.org/unstable/firmware-qcom-soc

> I took a glance at the package sources on salsa. So, let's go at this
> one by one.
>
> firmware-qcom-dragonboard845c.install:
>
> [0-9]*/prog_firehose_ddr.elf lib/firmware/qcom/sdm845
>
> This is the file that is only used by the _host_ when programming the
> device. As such, it should not be a part of the en-device firmware. It
> has no use for the RB3 itself.
>
> [0-9]*/aop.mbn lib/firmware/qcom/sdm845
>
> Bootloader. It should not be a part of /lib/firmware/

Since my ultimate goal is to make an installer image, the bootloader
part is necessary.
Because we don't have the source code for this, and we have to flash
this file to one
partition of the UFS on the board in order to boot the system, we have
to treat it as
firmware.

If you have a better idea for the path name, rather than /lib/firmware/,
please let me know.

> [0-9]*/BTFM.bin lib/firmware/qcom/sdm845
>
> This is the filesystem image with bluetooth firmware files. Relevant
> files are already part of the /lib/firmware/qca. If anything important
> is missing there, it should directly into

Good to know it's already upstreamed, and it's under qca folder.

> [0-9]*/cmnlib.mbn lib/firmware/qcom/sdm845
> [0-9]*/cmnlib64.mbn lib/firmware/qcom/sdm845
> [0-9]*/devcfg.mbn lib/firmware/qcom/sdm845
>
> These three files are also used by the bootloader process, and as such
> they should not be a part of /lib/firmware.
>
> [0-9]*/dspso.bin lib/firmware/qcom/sdm845
>
> This is probably the only important file for now. This is the
> filesystem image with the shared libraries and executable code for the
> DSPs when executing compute applications there.
> We were putting it to /lib/firmware/qcom/sdm845 and mounting it later,
> because it was easier to do so (if the image is not present in
> /lib/firmware, the rootfs can try mounting dspso parition). For proper
> Debian packaging the image should be unpacked to some agreed location.
> fastrpc daemons then should be taught about this location.

Yes, we need to integrate this into the installer.

> [0-9]*/hyp.mbn lib/firmware/qcom/sdm845
> [0-9]*/imagefv.elf lib/firmware/qcom/sdm845
> [0-9]*/keymaster64.mbn lib/firmware/qcom/sdm845
> [0-9]*/sec.dat lib/firmware/qcom/sdm845
> [0-9]*/storsec.mbn lib/firmware/qcom/sdm845
> [0-9]*/tz.mbn lib/firmware/qcom/sdm845
> [0-9]*/xbl.elf lib/firmware/qcom/sdm845
> [0-9]*/xbl_config.elf lib/firmware/qcom/sdm845
> [0-9]*/qupv3fw.elf lib/firmware/qcom/sdm845
>
> Again, mostly bootloader stuff. I highly doubt that /lib/firmware
> should be polluted with these files.
>
> renesas_usb_fw.mem lib/firmware
>
> So, this is the Renesas firmware, which gets copyrighted by Qualcomm.
> We noticed this some time ago (and the fact that the supplier of the
> firmware, Thundercomm, also pulled the file without having a clear
> origin). We have been trying to clear licensing terms for this file,
> however Renesas is unresponsive. Originally this file came from the
> author (Renesas) without proper license. Thus I do not believe it
> passes required checks by ftpmasters.

If this is the issue, we can remove this blob.
But basically, this is a non-free package, and if we can redistribute
the file it should not be a problem.
The file is on linaro archive for years for free download to anymore.
And you informed Renesas about this,
so if they don't agree with the redistribution, they will ask you to
pull it off long time ago.

> linaro-abl/aosp/* lib/firmware/qcom/sdm845/abl-aosp
> linaro-abl/linux/* lib/firmware/qcom/sdm845/abl-linux
>
> I don't know what this is, but judging from the name (ABL) it also
> should not be part of /lib/firmware. Especially the AOSP file.

For the ABL, it's the abbv of android bootloader.
The binary blob came from linaro release [2], source code is from
linaro git [3][4].
But it needs closed-source signing tool [5[6] from qcom to sign the
binary, and end-user
have to flash it into one UFS partition, so we have to treat it as
firmware file.

[2] https://releases.linaro.org/96boards/dragonboard845c/linaro/rescue/21.12
[3] aosp: https://git.codelinaro.org/linaro/qcomlt/abl/-/commits/release/LU.UM.1.2.1.r1-23200-QRB5165.0-v4-header
[4] linux: https://git.codelinaro.org/linaro/qcomlt/abl/-/commits/release/LE.UM.3.2.2.r1-02700-sdm845.0
[5] https://git.linaro.org/ci/job/configs.git/tree/lt-qcom-bootloader/dragonboard845c/builders.sh#n119
[6] https://discuss.96boards.org/t/how-to-get-and-customize-the-bootloader/11128

> Next package:
> network-manager-config-dragonboard845c.install
>
> debian/eth-mac-addr.conf usr/lib/NetworkManager/conf.d/
>
> I do not think this should be a part of the
> firmware-qcom-dragonboard845c source package. It is not a firmware.

Yes, I agree this is not good for a firmware package.
I'll remove it on next upload.

> > If you have any concerns, or you can offer co-maintenance of the package in Debian, please let me know.
>
> Well, I'd like to understand your intentions with this package. Please
> feel free to ask any questions regarding these files or about
> packaging them.

I think RB3 is a mature hardware, and most kernel support was already
upstreamed.
(Kudos to Linaro)
So we should be just bit away from full debian support.
And if everything goes well, and it should be the same to support RB5,
and some other similar arm64 platforms.

Cheers,
Roger
> --
> With best wishes
> Dmitry


Reply to: