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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

linux_rpi3: fix build failure due to wrong Kconfig #284035

Merged

Conversation

peat-psuwit
Copy link
Contributor

@peat-psuwit peat-psuwit commented Jan 26, 2024

Description of changes

Because of NixOS's generate-config.pl tries to answer 'M' to as much configs as possible, this exposes the wrong Kconfig in the RPi-specific code which is added in the new kernel tree intended to support RPi 5.

Add a kernel patch to fix the Kconfig, which results in the relavant part being disabled on the RPi 3 build of the kernel.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux (cross-built)
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 馃憤 reaction to pull requests you find important.

@gador
Copy link
Contributor

gador commented Jan 27, 2024

This is a semi-automatic executed nixpkgs-review with nixpkgs-review-checks extension. It is checked by a human on a best effort basis and does not build all packages (e.g. lumo, tensorflow or pytorch).

Result of nixpkgs-review pr 284035 run on aarch64-linux 1

2 packages failed to build and are new build failures:
2 packages built:
  • linuxKernel.kernels.linux_rpi4
  • linuxKernel.kernels.linux_rpi4.dev

@gador
Copy link
Contributor

gador commented Jan 27, 2024

The initial error is gone, but I'm now getting:

/nix/store/nmdqydqrbdz9y8161b9n0xjf7hsp3yy0-binutils-2.40/bin/ld: warning: -z relro ignored
  OBJCOPY modules.builtin.modinfo
  GEN     modules.builtin
  GEN     .vmlinux.objs
  MODPOST Module.symvers
ERROR: modpost: missing MODULE_LICENSE() in drivers/iommu/bcm2712-iommu.o
ERROR: modpost: missing MODULE_LICENSE() in drivers/iommu/bcm2712-iommu-cache.o
ERROR: modpost: "bcm2712_iommu_cache_flush" [drivers/iommu/bcm2712-iommu.ko] undefined!
make[1]: *** [../scripts/Makefile.modpost:126: Module.symvers] Error 1
make: *** [../Makefile:1966: modpost] Error 2

Because of NixOS's generate-config.pl tries to answer 'M' to as much
configs as possible, this exposes the wrong Kconfig in the RPi-specific
code which is added in the new kernel tree intended to support RPi 5.

Add kernel patches to fix the Kconfig, which results in the relavant
part being disabled on the RPi 3 build of the kernel.
@peat-psuwit
Copy link
Contributor Author

The new error should also be addressed. Please take another look.

@gador
Copy link
Contributor

gador commented Jan 30, 2024

Awesome, will do 馃憤

@gador
Copy link
Contributor

gador commented Jan 31, 2024

This is a semi-automatic executed nixpkgs-review with nixpkgs-review-checks extension. It is checked by a human on a best effort basis and does not build all packages (e.g. lumo, tensorflow or pytorch).

Result of nixpkgs-review pr 284035 run on aarch64-linux 1

4 packages built:
  • linuxKernel.kernels.linux_rpi3
  • linuxKernel.kernels.linux_rpi3.dev
  • linuxKernel.kernels.linux_rpi4
  • linuxKernel.kernels.linux_rpi4.dev

@gador
Copy link
Contributor

gador commented Jan 31, 2024

@peat-psuwit both packages build. Thanks for your work, LGTM!

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-ready-for-review/3032/3454

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-already-reviewed/2617/1466

@SuperSandro2000
Copy link
Member

@ofborg build linuxKernel.kernels.linux_rpi3 linuxKernel.kernels.linux_rpi4

@SuperSandro2000 SuperSandro2000 merged commit 4e0128e into NixOS:master Feb 22, 2024
24 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants