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
pine64-pinephone-braveheart: kernel 5.6.0 #146
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👋 Thanks for the contribution!
It's always nice to see new contributors here!
Some thoughts follow.
]; | ||
}).overrideAttrs({ postInstall ? "", ... }: { | ||
installTargets = [ "install" "dtbs" ]; | ||
postInstall = postInstall + '' | ||
mkdir -p "$out/dtbs/allwinner" | ||
cp -v "$buildRoot/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtb" "$out/dtbs/allwinner/" | ||
cp -v "$buildRoot/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dtb" "$out/dtbs/allwinner/sun50i-a64-pinephone.dtb" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a hard problem to solve.
U-Boot will, at some point, be updated to one that detects between 1.1 and 1.2, and at that moment it will need the appropriately "1.1" filename.
I think the solution, for the time being, will be to copy it both to the new name, and to the old name at that location. This way the kernel build will stay compatible with previous U-Boot builds, while allowing support with the new one.
cp -v "$buildRoot/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dtb" "$out/dtbs/allwinner/sun50i-a64-pinephone.dtb" | |
# Filename expected by older U-Boot revisions for the Pinephone. | |
cp -v "$buildRoot/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dtb" "$out/dtbs/allwinner/sun50i-a64-pinephone.dtb" | |
# Hardware-versioned filenames. | |
cp -v "$buildRoot/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dtb" "$out/dtbs/allwinner/" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Btw, there is also a 1.0.dtb
. Should we add it as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, please. Though I'm not sure it'll be useful for anyone, we should strive to be a good example in maximizing compatibility.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done!
I'll have to see with the config file, but I don't know that we want to follow exactly the PostmarketOS configuration. Though, with that said, it's likely we want to enable all options they enable. |
Co-authored-by: Samuel Dionne-Riel <samuel@dionne-riel.com>
I don't have experience tunning/configuring a kernel so it's ok for me any change |
What is the provenance of Is it recommended somewhere? If so, where, who? What does it help fixing? |
Taken from here: https://gitlab.com/postmarketOS/pmaports/-/blob/master/main/linux-postmarketos-allwinner/disable-power-save.patch |
Btw, with this version the led indicator doesn't turn off after stage-1. Any idea? |
The LED should turn green and stay green. Yet undocumented, but I want to default an LED to "on" for all devices that has one, up until the "phone environment" (like desktop environments) takes over and does whatever it wants with the LED. So, it sounds like everything is alright. You may have been comparing with a kernel build from before I implemented it for the Pinephone. |
👍
Yes, that's correct. I've been testing for some weeks with this kernel and I tested the following things:
I created a custom package that adds these binaries but for some reason nixos doesn't find the files. I don't know if this happens because it tries to load this files before the root fs is mounted... Any idea?
Did you try this things with kernel 5.5? I'm not sure if the non-working parts are because the kernel or missing configuration in nixos |
Other than Wi-Fi, I don't think I tested anything else you mentioned. For the bluetooth firmware, check if using |
I just tried this and didn't work. Maybe I've done something wrong. In my
and here is the derivation:
And here is what I have on the built image:
|
@samueldr I just realized that I was building the image + kernel from this branch that doesn't have this changes 114f545 . Now I'm trying to build the image from master but I get this error:
I'm building this on a nixos 20.09 running in a rpi 4 |
I've been working off of cross-compilation mainly, and it's been stuck in a bad place for a couple of weeks, getting better though. There must have been a change in Nixpkgs that causes mruby to fail to build properly. In the mean time, you can use samueldr/nixpkgs@22a3bf9 to build, it is a commit that is known to build with cross-compilation. |
Well, I wasn't cross-compiling. I was building this on a Raspi 4. This past weekend I bypassed the errorm commenting the |
About this PR, for me it can wait a couple of weeks and maybe I'll go for 5.7.0, if you are ok with this |
Yes, sorry, I meant that since I've been relying on that older commit, I haven't been faced with that compilation issue yet. I'm looking into it. And yeah, going with 5.7 is probably fine too. |
No worry. Thank you :) |
This kernel is based on the latest commit in master (https://gitlab.com/pine64-org/linux/-/tree/pine64-kernel-5.6.y/) and uses the pmOS config file, with only two changes:
CONFIG_RTL8723CS
is set ton
(failes to build when enabled) andCONFIG_RTL8723CS_NEW
set toy
(instead ofm
).Tested on Pinephone braveheart: