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

rpi-firmware: update to 20201123. #26939

Closed
wants to merge 2 commits into from
Closed

Conversation

pbui
Copy link
Contributor

@pbui pbui commented Dec 4, 2020

  • Orphan package (suggest @Piraty takes it).

  • linux-firmware-network now provides the necessary wifi blobs, so
    rpi-firmware no longer includes them and now depends on
    linux-firmware-network.

    Otherwise the two packages conflict with each other and prevents upgrading.

  • I've tested on armv6l and armv7l with a RPI2 and RPI3 both builtin and external wireless devices.

@Piraty @sgn Per our discussion on IRC, I dropped the wifi blobs from this package and for now making it depend on linux-firmware-network.

@ericonr
Copy link
Member

ericonr commented Dec 4, 2020

As suggested on IRC, it would be nicee to make a rpi-firmware-network package that's a subpackage of linux-firmware-network.

@pbui
Copy link
Contributor Author

pbui commented Dec 4, 2020

@ericonr OK, I've introduced the rpi-firmware-network subpackage and rpi-firmware now depends on that rather than linux-firmware-network.

@ericonr
Copy link
Member

ericonr commented Dec 4, 2020

LGTM, I can test locally later.

@sgn
Copy link
Member

sgn commented Dec 5, 2020

We can simplify the whole mess by carefully reorder subpackages:

diff --git a/srcpkgs/linux-firmware/template b/srcpkgs/linux-firmware/template
index 9e335af903..c13a8c4601 100644
--- a/srcpkgs/linux-firmware/template
+++ b/srcpkgs/linux-firmware/template
@@ -12,6 +12,9 @@ checksum=3cbb7f363dc63686b1c6e325ed679f6faa4715f17fa06be11b705456e1d5dcb9
 python_version=3
 nostrip=yes
 
+subpackages="rpi-firmware-network linux-firmware-amd linux-firmware-intel
+ linux-firmware-nvidia linux-firmware-network"
+
 do_install() {
 	vmkdir usr/lib/firmware
 	vmkdir usr/share/licenses/${pkgname}
@@ -53,6 +56,7 @@ linux-firmware-nvidia_package() {
 
 linux-firmware-network_package() {
 	short_desc+=" - network"
+	depends="rpi-firmware-network"
 	nostrip=yes
 	pkg_install() {
 		vmove usr/lib/firmware/3com
@@ -61,6 +65,7 @@ linux-firmware-network_package() {
 		vmove "usr/lib/firmware/ath*"
 		vmove "usr/lib/firmware/ar*"
 		vmove "usr/lib/firmware/bnx2*"
+		vmove usr/lib/firmware/brcm
 		vmove "usr/lib/firmware/cxgb*"
 		vmove "usr/lib/firmware/htc*"
 		vmove "usr/lib/firmware/iwl*"
@@ -72,13 +77,6 @@ linux-firmware-network_package() {
 		vmove usr/lib/firmware/ueagle-atm
 		vmove usr/lib/firmware/ti-connectivity
 		vmove usr/lib/firmware/dpaa2
-
-		# Move only non-Raspberry Pi related brcm firmware files.
-		# Cannont use vmove since one of the files has a space in it,
-		# so manually create destination folder and move files.
-		mkdir -p ${PKGDESTDIR}/usr/lib/firmware/brcm
-		find ${DESTDIR}/usr/lib/firmware/brcm/* ! -iname 'brcmfmac434??-sdio.*' \
-		    | while read f; do mv "$f" ${PKGDESTDIR}/usr/lib/firmware//brcm; done
 	}
 }
 

Not sure if it's better, though.
And, I'm not even sure if linux-firmware-network should depend on rpi-firmware-network or not.

There's a lot of warning about some _package not being used, which is a bug of xbps-src.
I'll post a patch for that warning, soon.

sgn added a commit to sgn/void-packages that referenced this pull request Dec 5, 2020
As discussing in [1], on template with "subpackages" as multilines will
report false positive on some packages will never be built.

There're multiple problems here:

- expanded "subpackages" will have an empty line if it has a newline
  inside template
- "sed" expression couldn't work with multilines "subpackages"

Let's not quote "$subpkgs" and "$subpackages" in "printf" to let the
shell do expansion and trim the empty lines for us. And rewrite the
"sed" expression to work with multilines "subpackages"

[1]: void-linux#26939 (comment)
sgn added a commit to sgn/void-packages that referenced this pull request Dec 5, 2020
As discussing in [1], on template with "subpackages" as multilines will
report false positive on some packages will never be built.

There're multiple problems here:

- expanded "subpackages" will have an empty line if it has a newline
  inside template
- "sed" expression couldn't work with multilines "subpackages"

Let's not quote "$subpkgs" and "$subpackages" in "printf" to let the
shell do expansion and trim the empty lines for us. And rewrite the
"sed" expression to work with multilines "subpackages"

[1]: void-linux#26939 (comment)
srcpkgs/linux-firmware/template Outdated Show resolved Hide resolved
short_desc="Firmware files for the Raspberry Pi (git ${_gitshort})"
maintainer="Peter Bui <pbui@github.bx612.space>"
maintainer="Orphaned <orphan@voidlinux.org>"
Copy link
Member

Choose a reason for hiding this comment

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

I adopt it, thanks your work

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Excellent, do you want me to change the maintainer line in this commit or will you do it later?

Copy link
Member

Choose a reason for hiding this comment

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

please do it

sgn added a commit to sgn/void-packages that referenced this pull request Dec 7, 2020
As discussing in [1], on template with "subpackages" as multilines will
report false positive on some packages will never be built.

There're multiple problems here:

- expanded "subpackages" will have an empty line if it has a newline
  inside template
- "sed" expression couldn't work with multilines "subpackages"

Let's not quote "$subpkgs" and "$subpackages" in "printf" to let the
shell do expansion and trim the empty lines for us. And rewrite the
"sed" expression to work with multilines "subpackages"

[1]: void-linux#26939 (comment)
Now that linux-firmware-network provides the necessary wifi blobs for
the Raspberry Pi, we can remove them from rpi-firmware and provided them
in a new rpi-firmware-network subpackage.

The linux-firmware-network subpackage is modified so that only the brcm
not related to the Raspberry Pi is included.
- Orphan package.

- rpi-firmware-network (subpackage of linux-firmware) now provides the
  necessary wifi blobs, so rpi-firmware no longer includes them and now
  depends on rpi-firmware-network.
@pbui
Copy link
Contributor Author

pbui commented Dec 7, 2020

@sgn I've modified the PR to reflect your suggestion.

sgn added a commit to sgn/void-packages that referenced this pull request Dec 10, 2020
As discussing in [1], on template with "subpackages" as multilines will
report false positive on some packages will never be built.

There're multiple problems here:

- expanded "subpackages" will have an empty line if it has a newline
  inside template
- "sed" expression couldn't work with multilines "subpackages"

Let's not quote "$subpkgs" and "$subpackages" in "printf" to let the
shell do expansion and trim the empty lines for us. And rewrite the
"sed" expression to work with multilines "subpackages"

[1]: void-linux#26939 (comment)
sgn added a commit to sgn/void-packages that referenced this pull request Dec 10, 2020
As discussing in [1], on template with "subpackages" as multilines will
report false positive on some packages will never be built.

There're multiple problems here:

- expanded "subpackages" will have an empty line if it has a newline
  inside template
- "sed" expression couldn't work with multilines "subpackages"

Let's not quote "$subpkgs" and "$subpackages" in "printf" to let the
shell do expansion and trim the empty lines for us. And rewrite the
"sed" expression to work with multilines "subpackages"

[1]: void-linux#26939 (comment)
@Piraty Piraty closed this in 4123f14 Dec 11, 2020
sgn added a commit that referenced this pull request Dec 14, 2020
As discussing in [1], on template with "subpackages" as multilines will
report false positive on some packages will never be built.

There're multiple problems here:

- expanded "subpackages" will have an empty line if it has a newline
  inside template
- "sed" expression couldn't work with multilines "subpackages"

Let's not quote "$subpkgs" and "$subpackages" in "printf" to let the
shell do expansion and trim the empty lines for us. And rewrite the
"sed" expression to work with multilines "subpackages"

[1]: #26939 (comment)
atweiden added a commit to atweiden/voidpkgs that referenced this pull request Dec 19, 2020
As discussing in [1], on template with "subpackages" as multilines will
report false positive on some packages will never be built.

There're multiple problems here:

- expanded "subpackages" will have an empty line if it has a newline
  inside template
- "sed" expression couldn't work with multilines "subpackages"

Let's not quote "$subpkgs" and "$subpackages" in "printf" to let the
shell do expansion and trim the empty lines for us. And rewrite the
"sed" expression to work with multilines "subpackages"

[1]: void-linux/void-packages#26939 (comment)

void-linux/void-packages@3996821
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants