-
Notifications
You must be signed in to change notification settings - Fork 5
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
Use a more recent kernel #2
Conversation
This uses kernel 5.11.16 from https://github.com/tobetter/linux with a custom config pulled from https://docs.linuxfactory.or.kr/install/odroidhc4/image.html It does not boot with petitboot (in the HC4 board flash), you need to either hold the boot switch button while booting or disable petitboot with these instructions: https://forum.odroid.com/viewtopic.php?p=318658#p318658 (there are instructions for restoring it here: https://forum.odroid.com/viewtopic.php?f=207&t=42217) This splits the uboot module into two, one to build the uboot binary, and another to handle generating the boot scripts. Everything goes in the ext4 partition and the vfat partition is now unused. The boot.scr file refers to all the files it needs directly from the nix store.
At first glance all of this looks good. It would be a bit nicer if we could avoid staging the full kernel config here, though. It makes it a trickier to see what the changes are compared to upstream. I tried to follow the link to the LinuxFactory source where you got the Ubuntu config from but since it only provides the full image I'm not sure whether downloading using I'm currently building everything but it looks like I can't get the uboot tools compiling due to a missing header file in openssl:
|
Changes compared to the tobetter/linux fork? That one doesn't have an HC4-specific config. It has a config for the odroid-xu4, which is arm7. But otherwise there's just the same arm64 defconfig as in mainline, which built quite a large kernel with tons of builtins and modules that would never be used. The ubuntu images that they built has a smaller config, but I'm not sure if it's in a repo anywhere. It might be fine, though, if the load addresses leave enough room. For ubootTools: the goal was to use the one in nixpkgs, so it will just get the binary from nixos hydra and not need to build anything. That works for configuration.nix on the board, but not for cross-compiling, because I don't actually know what I'm doing with cross-compiling and nix :) I think the fix is to use buildPackages when calling |
Based on the recent reports of success with stock kernels, I just upgraded my HC4 to nixos 22.05, new u-boot (from NixOS/nixpkgs#101454), and switched to the stock kernel. It's working fine so far and my config is much simpler. |
@dnr Thanks for the report. Are you using the 2021.01 version of uboot as in that PR? Do you use the https://nixos.wiki/wiki/NixOS_on_ARM/ODROID-HC4#NixOS_installation proposes to just replace that one string but for me that failed with the error that no such defconfig was found in configs. This is consistent with that https://github.com/u-boot/u-boot/tree/v2021.01/configs doesn't have any Also, what do you do about |
Are you comparing against the hardkernel linux kernel or against what I have in my flake.nix on master? |
I did it with the commands on that wiki page exactly as of yesterday. This repo: https://github.com/samueldr/nixpkgs/commits/wip/odroidc4 , which looks like that PR rebased on a more recent nixpkgs. It looks like I got u-boot 2022.01. I can't see the edit history on the wiki so I'm not sure when it was last updated or who did it, maybe the commands were different when you checked last, or samueldr rebased his branch? I didn't notice anything in the build logs about zfs, u-boot just built fine on the first try for me. Using So, my config for the HC4 included two major overrides, basically the contents of this closed PR:
|
You might not want to merge this directly, but use it as a base and redo some parts if you like.
Warnings:
Commit message follows:
This uses kernel 5.11.16 from https://github.com/tobetter/linux
with a custom config pulled from
https://docs.linuxfactory.or.kr/install/odroidhc4/image.html
It does not boot with petitboot (in the HC4 board flash), you need to
either hold the boot switch button while booting or disable petitboot
with these instructions:
https://forum.odroid.com/viewtopic.php?p=318658#p318658
(there are instructions for restoring it here:
https://forum.odroid.com/viewtopic.php?f=207&t=42217)
This splits the uboot module into two, one to build the uboot binary,
and another to handle generating the boot scripts.
Everything goes in the ext4 partition and the vfat partition is now
unused. The boot.scr file refers to all the files it needs directly from
the nix store.