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

Upgrade to kernel 5.6 #185

Closed
wants to merge 6 commits into from
Closed

Upgrade to kernel 5.6 #185

wants to merge 6 commits into from

Conversation

fb87
Copy link

@fb87 fb87 commented Jul 16, 2020

Upgrade to kernel 5.6

  • Change default.nix to match kernel changeset, recalculate sha256 key
  • Change LEDs patch file since sun50i-a64-pinephone.dts is now replaced by sun50i-a64-pinephone.dtsi
  • Add rev to hardware to specify hardware revision to build with (input by MOBILE_NIXOS_DEVICE_HW_REV)
    e.g MOBILE_NIXOS_DEVICE_HW_REV="1.2" nix-build --argstr device pine64-pinephone-braveheart -A build.disk-image

There is not much difference in term of kernel config between v5.5 and v5.6 therefore keeping kernel config as of now.

fb87 added 6 commits July 14, 2020 17:53
…-config

  * Change `default.nix` to match kernel changeset, recalculate sha256 key
  * Change LEDs patch file since `sun50i-a64-pinephone.dts` is now replaced by `sun50i-a64-pinephone.dtsi`

Signed-off-by: S Dao <si.dao@outlook.com>
…-config

  * Change `default.nix` to match kernel changeset, recalculate sha256 key
  * Change LEDs patch file since `sun50i-a64-pinephone.dts` is now replaced by `sun50i-a64-pinephone.dtsi`

Signed-off-by: S Dao <si.dao@outlook.com>
 * Upgrade to kernel 5.6.x
 * Add `rev` to hardware to specify hardware revision to build with

Signed-off-by: S Dao <si.dao@outlook.com>
@samueldr
Copy link
Member

Hi! 👋

Thanks for the contribution, and welcome!

First of all, see #146, another attempt at upgrading the kernel.

On which @masipcat said (June 11th):

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

So this is why it hasn't been upgraded yet.

Now, I'll review your PR in isolation as if there wasn't another PR for the update, as I'm sure some of the comments may be helpful.

@samueldr
Copy link
Member

❌ The documentation build fails, since this is apparently using a new option without defining it.

error: The option `mobile.hardware.rev' is used but not defined.

Now, do we need this option? I don't think we need it.

The way the u-boot works, and the way the device tree files are named, we can have a build that works with all Pinephone revisions. If we can't it's a big failure from upstream. (Side-note, the status of U-Boot probably needs to be checked too.)

On the other PR, this is solved by providing the versioned FDTs. Note that we also keep the unversioned FDT filename for u-boot versions unaware of this change.

@@ -13,10 +13,11 @@
screen = {
width = 720; height = 1440;
};
rev = if "" == builtins.getEnv "MOBILE_NIXOS_DEVICE_HW_REV" then "1.0" else builtins.getEnv "MOBILE_NIXOS_DEVICE_HW_REV";
Copy link
Member

Choose a reason for hiding this comment

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

While there is an environment variable that can affect the build for the device name, it should probably be deprecated as this causes build reproducibility issues. This should be done entirely through configuration if wanted.

Subject: [PATCH] dts: pinephone: Setup default on and panic LEDs

* The green LED defaults to on.
* The red LED is the panic indicator.

The green LED defaults to on for an expected transition through red,
yellow and green during the different boot stages.

Signed-off-by: S Dao <si.dao@outlook.com>
Copy link
Member

Choose a reason for hiding this comment

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

(Personal peeve) I would have liked to see Co-authored-by since you changed the author of the patch. Though I do see the patch has relatively non-trivial changes too, so this is why changing the author isn't an issue in itself.

@@ -21,6 +22,6 @@
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-${hardware.rev}.dtb" "$out/dtbs/allwinner/sun50i-a64-pinephone.dtb"
Copy link
Member

Choose a reason for hiding this comment

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

This is where we should instead copy the versioned FDTs.

More things to look at:

These commits are proof that copying all Pinephone FDTs is the solution, and we should look into updating U-Boot soon :).

@samueldr
Copy link
Member

Another nit, sorry for piling on 😊.

The PR title should reference the device name, since this is a pretty heterogeneous ecosystem :).

@fb87
Copy link
Author

fb87 commented Jul 19, 2020

I expect to solve issue related to pkg-config missing when do menuconfig but seem not, it worked one day after upgrade then failed again in other day. So let's close then wait then.

@fb87 fb87 closed this Jul 19, 2020
@samueldr
Copy link
Member

#187 should solve the issue with pkg-config and menuconfig.

@fb87
Copy link
Author

fb87 commented Sep 8, 2020

OKay, let's me try again

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.

None yet

2 participants