Closed gnull closed 1 month ago
First of all, you should use nixpkgs from your flake, not from this flake (so don't inherit it, or set follows). Don't forget to lock pkgsKernel to avoid rebuilding on every update.
You can probably use nix-store --read-log
on failed kernel derivation. If you see segmentation faults and use SD card, try USB stick (it leaves you with UEFI only) - it will be much slower but for me it eventually built, and did not kill USB stick as with my SD cards (probably too cheap or counterfeit, idk).
Here's the updated flake:
{
description = "NixOS configuration";
inputs = {
unstable.url = "nixpkgs/nixos-unstable";
nixpkgs.url = "nixpkgs/nixos-24.05";
nixpkgs.follows = "nixos-rk3588/nixpkgs";
nixos-rk3588.url = "github:ryan4yin/nixos-rk3588";
};
outputs = { nixpkgs, nixos-rk3588, ... }: let
system = "aarch64-linux";
in {
nixosConfigurations = {
opi5plus = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = {
rk3588 = {
inherit nixpkgs;
pkgsKernel = import nixpkgs {
inherit system;
};
};
};
modules = [
nixos-rk3588.nixosModules.boards.orangepi5plus.core
./system/configuration.nix
./system/hardware-configuration.nix
];
};
};
};
}
The build still fails. Here's some extra info:
I had the same issue on my side, and was wondering why I was the only one.
Building with nixos 24.05 means building with gcc 13, which look more strict on checking function declaration against function body.
I created a patch and was about to open a PR upstream:
diff --git a/drivers/media/platform/rockchip/cif/capture.c b/drivers/media/platform/rockchip/cif/capture.c
index 442ee5a86..d5cd03237 100644
--- a/drivers/media/platform/rockchip/cif/capture.c
+++ b/drivers/media/platform/rockchip/cif/capture.c
@@ -4927,7 +4927,7 @@ static void rkcif_detach_sync_mode(struct rkcif_device *cif_dev)
}
void rkcif_do_stop_stream(struct rkcif_stream *stream,
- unsigned int mode)
+ enum rkcif_stream_mode mode)
{
struct rkcif_vdev_node *node = &stream->vnode;
struct rkcif_device *dev = stream->cifdev;
@@ -6087,7 +6087,7 @@ static void rkcif_attach_sync_mode(struct rkcif_device *cifdev)
static void rkcif_monitor_reset_event(struct rkcif_device *dev);
-int rkcif_do_start_stream(struct rkcif_stream *stream, unsigned int mode)
+int rkcif_do_start_stream(struct rkcif_stream *stream, enum rkcif_stream_mode mode)
{
struct rkcif_vdev_node *node = &stream->vnode;
struct rkcif_device *dev = stream->cifdev;
The problem may be caused by #52, I didn't have time to test it at the time, so I just merged it.
You can try pinning nixos-rk3588 to the commit dc5e85f45ea3d832de04bbd7afec5c19e2128451
to see if the problem persists.
If this is the case, I think we can revert #52 first.
@ryan4yin pinning has fixed the compiler error and the system builds and boots now.
Hi!
I've encountered a kernel compile error when trying to build a system for Orange Pi 5 Plus. I'm using the following
flake.nix
(based on #57):The configuration.nix and hardware-configuration.nix are the files that were generated by nixos-generate-config while following the steps from here.
I've partitioned my SSD and mounted to
/mnt
as Nix manual suggests, and ran this command (with noflake.lock
, so it would generate one):The command starts with (there are some cached things, since I'm re-running it to record the logs):
Then it prints CC/LD/... messages about building the kernel modules, until it fails (some 20-30 minutes later) with this:
Can anyone suggest what could be the next step to debug this? I've been unsuccessfully googling for a way to get the full Make error message from
nixos-rebuild
, but can't find one.