-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
89 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# args of buildLinux: | ||
# https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/os-specific/linux/kernel/generic.nix | ||
# Note that this method will use the deconfig in source tree, | ||
# commbined the common configuration defined in pkgs/os-specific/linux/kernel/common-config.nix, which is suitable for a NixOS system. | ||
# but it't not suitable for embedded systems, so we comment it out. | ||
# ================================================================ | ||
# If you already have a generated configuration file, you can build a kernel that uses it with pkgs.linuxManualConfig | ||
# The difference between deconfig and the generated configuration file is that the generated configuration file is more complete, | ||
# | ||
{ | ||
fetchFromGitHub, | ||
linuxManualConfig, | ||
ubootTools, | ||
... | ||
}: | ||
(linuxManualConfig rec { | ||
modDirVersion = "6.1.43"; | ||
version = "${modDirVersion}-radxa-rk3588"; | ||
extraMeta.branch = "6.1"; | ||
|
||
# https://github.com/radxa/kernel/tree/linux-6.1-stan-rkr1 | ||
# build script: | ||
# https://github.com/radxa/build/blob/debian/board_configs.sh | ||
src = fetchFromGitHub { | ||
owner = "radxa"; | ||
repo = "kernel"; | ||
rev = "7fe0e59bb81b910d0aa815217bfa5f162702cf26"; | ||
hash = ""; | ||
}; | ||
|
||
# Steps to the generated kernel config file | ||
# 1. git clone --depth 1 https://github.com/radxa/kernel.git -b linux-6.1-stan-rkr1 | ||
# 3. run `nix develop .#fhsEnv` in this project to enter the fhs test environment defined here. | ||
# 4. `cd linux-rockchip` and `make rockchip_linux_defconfig` to configure the kernel. | ||
# 5. Then use `make menuconfig` in kernel's root directory to view and customize the kernel(like enable/disable rknpu, rkflash, ACPI(for UEFI) etc). | ||
# 6. copy the generated .config to ./pkgs/kernel/rk35xx_radxa_config and commit it. | ||
# | ||
configfile = ./rk35xx_radxa_config; | ||
allowImportFromDerivation = true; | ||
}) | ||
.overrideAttrs (old: { | ||
name = "k"; # dodge uboot length limits | ||
nativeBuildInputs = old.nativeBuildInputs ++ [ubootTools]; | ||
}) |
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
fetchFromGitHub, | ||
buildUBoot, | ||
defconfig, | ||
... | ||
}: let | ||
rkbin = fetchFromGitHub { | ||
owner = "rockchip-linux"; | ||
repo = "rkbin"; | ||
rev = "a2a0b89b6c8c612dca5ed9ed8a68db8a07f68bc0"; | ||
hash = "sha256-U/jeUsV7bhqMw3BljmO6SI07NCDAd/+sEp3dZnyXeeA="; | ||
}; | ||
in | ||
buildUBoot rec { | ||
version = "2024.01"; | ||
src = fetchFromGitHub { | ||
owner = "u-boot"; | ||
repo = "u-boot"; | ||
rev = "v${version}"; | ||
hash = "sha256-0Da7Czy9cpQ+D5EICc3/QSZhAdCBsmeMvBgykYhAQFw="; | ||
}; | ||
inherit defconfig; | ||
patches = []; | ||
# https://github.com/armbian/build/blob/main/config/boards/rock-5a.csc | ||
# Configuring normal/SPI uboot target map | ||
extraMakeFlags = [ | ||
"BL31=${rkbin}/bin/rk35/rk3588_bl31_v1.45.elf rock-5a-spi-rk3588s_defconfig spl/u-boot-spl.bin u-boot.dtb u-boot.itb;;rkspi_loader.img" | ||
"BL31=${rkbin}/bin/rk35/rk3588_bl31_v1.45.elf rock-5a-rk3588s_defconfig spl/u-boot-spl.bin u-boot.dtb u-boot.itb;;idbloader.img u-boot.itb" | ||
]; | ||
extraMeta.platforms = ["aarch64-linux"]; | ||
filesToInstall = [ | ||
"spl/u-boot-spl.bin" | ||
|
||
"u-boot.itb" | ||
"idbloader.img" | ||
]; | ||
} |