Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 685412 - sys-boot/raspberrypi-firmware-1.20190925 please add ~arm64
Summary: sys-boot/raspberrypi-firmware-1.20190925 please add ~arm64
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Andriy Utkin (RETIRED)
URL:
Whiteboard:
Keywords: KEYWORDREQ
Depends on:
Blocks:
 
Reported: 2019-05-08 22:59 UTC by Bertrand Jacquin
Modified: 2019-12-30 22:33 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bertrand Jacquin 2019-05-08 22:59:01 UTC
Hi,

Could you please mark sys-boot/raspberrypi-firmware-1.20190215 ~arm64 ?

Thanks
Comment 1 Andriy Utkin (RETIRED) gentoo-dev 2019-10-07 18:14:50 UTC
Hi arm64 team,

Could you please review this keywording request?

The version 1.20190709 enabled booting RPi4.
Comment 2 Roy Bamford gentoo-dev 2019-10-07 19:28:13 UTC
src_install() {
        insinto /boot
        cd boot || die
        doins bootcode.bin fixup*.dat start*elf
        doins *.dtb
        doins -r overlays

That doins *.dtb line will break an arm64 install.

The 32 bit and 64 bit .dtb files have the same name but different content.
The error is not fatal. A 64 bit install with a 32 bit dtb only boots on one core, so its noticed.

I'm not sure if the overlays differ between arm32 and arm64. They are all built with the kernel anyway so the dtb and dto files from the 64 bit kernel should be used in place of the 32 bit files provided by the Raspberry Pi Foundation.

The bug has 1.20190709 in the title and 1.20190215 in the opening report.
The both do the same with doins *.dtb and doins -r overlays.

<nit> The Pi4 does not use bootcode.bin, even if its present.
It has firmware instead. 
We probably don't want a USE=Pi4 flag though.</nit>

Until the Raspberry Pi Foundation provide 64 bit kernel related bits and pieces,
this ebuild should not install the overlays or device tree binaries on arm64.
It could contain an ewarn for 64 bit users though.
Comment 3 Andriy Utkin (RETIRED) gentoo-dev 2019-10-07 23:32:00 UTC
Thanks for looking at this, Roy!

I can change the ebuild to follow the example of Sakaki's sys-boot/rpi3-64bit-firmware, which results in the installation which works well on arm64. It uses the same RPi Foundation repo as the source, but doesn't install *.dtb, and has an option to not install overlays/.
Comment 4 Roy Bamford gentoo-dev 2019-10-08 19:16:38 UTC
Andrey,

That would get my ACK.
Do it and commit it as it will be ~arm64. I don't have commit access.
Comment 5 Andriy Utkin (RETIRED) gentoo-dev 2019-11-25 19:29:53 UTC
Slowly working.
These two commits set the approach. Will instantiate non-9999 ebuild from 9999 later.

https://github.com/andrey-utkin/gentoo/commit/7348ab91510c5c59aa7a62d38a0ef3fd1d9e0443
https://github.com/andrey-utkin/gentoo/commit/f38e41a3e68923b652b9e937dad7a5414e9fd9e5

News item pending, for users of raspberrypi-firmware but not -image.
Comment 6 Roy Bamford gentoo-dev 2019-11-26 08:37:10 UTC
This works.

bootcode.bin fixup*.dat and start*elf run on the GPU, which is common to all the Pis so far. That's arch agnostic.

This bit gets ~arm and ~arm64 keywords.


The kernel, its modules, dtb and device tree overlays go with the kernel.
Thats ~arm only as there is no Pi Foundation arm64 kernel. Yet.

32 bit Pi users then need both.
64 bit pi users need the firmware ebuild only

There is another way, thats maybe simpler for users.
Leave the existing ebuild as is and keep it 32 bit only.
Add another ebuild that does not install the kernel bits and pieces.

And a third way ...
In one ebuild. The profile will set either the arm or arm64 USE flags.
USE=arm gets everything
USE=arm64 does not get the kernel elements.

Both of these avoid a news item. Both require no special user action.
USE=arm64 could generate an ewarn about the missing kernel.

That's the systems design. I'm not qualified on ebuilds and you are doing the work. Keep up the good work and do it your way.
Comment 7 Larry the Git Cow gentoo-dev 2019-12-03 13:35:12 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/data/gentoo-news.git/commit/?id=70ccc4b634856aa9bcc568162765d19d39bc8d50

commit 70ccc4b634856aa9bcc568162765d19d39bc8d50
Author:     Andrey Utkin <andrey_utkin@gentoo.org>
AuthorDate: 2019-11-25 23:14:44 +0000
Commit:     Andrey Utkin <andrey_utkin@gentoo.org>
CommitDate: 2019-12-03 13:28:26 +0000

    2019-11-25-rpi-firmware-dtb-files: add news item
    
    Bug: https://bugs.gentoo.org/685412
    Signed-off-by: Andrey Utkin <andrey_utkin@gentoo.org>

 .../2019-11-25-rpi-firmware-dtb-files.en.txt       | 23 ++++++++++++++++++++++
 1 file changed, 23 insertions(+)
Comment 8 Andriy Utkin (RETIRED) gentoo-dev 2019-12-03 13:40:13 UTC
Forgot to refer to this bug in the ebuild work. Here are the commits which have been pushed a minute ago:

f524aeeb2101 sys-kernel/raspberrypi-image: add new version 4.19.75_p20190925
f4d574d2cd56 sys-boot/raspberrypi-firmware: add new version 1.20190925
b8e400e247f9 sys-kernel/raspberrypi-image: install device tree blobs
1618c312961d sys-boot/raspberrypi-firmware: don't install device tree blobs

Forgot to do what Roy proposed, to put ~arm64 into sys-boot/raspberrypi-firmware-1.20190925 .

I would love some practical testing on arm64 from someone (so far I have only tested an upgrade on 32-bit arm). Then we'll keyword sys-boot/raspberrypi-firmware-1.20190925 actually.
Comment 9 Larry the Git Cow gentoo-dev 2019-12-30 22:33:36 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c90506d8deb77f96a62ba99c0f4d9dfb3ac2a91d

commit c90506d8deb77f96a62ba99c0f4d9dfb3ac2a91d
Author:     Andrey Utkin <andrey_utkin@gentoo.org>
AuthorDate: 2019-12-30 22:31:50 +0000
Commit:     Andrey Utkin <andrey_utkin@gentoo.org>
CommitDate: 2019-12-30 22:33:04 +0000

    sys-boot/raspberrypi-firmware: add ~arm64 keyword
    
    Per approval of the approach by neddyseagoon, as expressed in the link
    given below.
    
    Acked-by: Roy Bamford <neddyseagoon@gentoo.org>
    Link: https://bugs.gentoo.org/685412#c4
    Closes: https://bugs.gentoo.org/685412
    Package-Manager: Portage-2.3.66, Repoman-2.3.16
    Signed-off-by: Andrey Utkin <andrey_utkin@gentoo.org>

 sys-boot/raspberrypi-firmware/raspberrypi-firmware-1.20190925.ebuild | 2 +-
 sys-boot/raspberrypi-firmware/raspberrypi-firmware-9999.ebuild       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)