changes
This commit is contained in:
9531
hosts/fw-new/pkgs/kernel/rk35xx_vendor_config
Normal file
9531
hosts/fw-new/pkgs/kernel/rk35xx_vendor_config
Normal file
File diff suppressed because it is too large
Load Diff
51
hosts/fw-new/pkgs/kernel/vendor.nix
Normal file
51
hosts/fw-new/pkgs/kernel/vendor.nix
Normal file
@@ -0,0 +1,51 @@
|
||||
# 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";
|
||||
# modDirVersion = "5.10.65";
|
||||
version = "${modDirVersion}-xunlong-rk3588";
|
||||
extraMeta.branch = "6.1";
|
||||
# extraMeta.branch = "5.10";
|
||||
|
||||
# https://github.com/orangepi-xunlong/linux-orangepi/tree/orange-pi-6.1-rk35xx
|
||||
src = fetchFromGitHub {
|
||||
owner = "orangepi-xunlong";
|
||||
repo = "linux-orangepi";
|
||||
# rev = "122b41d84d018af909a766e48f3f90cbea9868e0";
|
||||
# hash = "sha256-kOhxDP1hbrrIriOXizgZoB0I+3/JWOPcOCdNeXcPJV0=";
|
||||
# rev = "eb1c681e5184e51d8ce1f351559d149d17f48b57";
|
||||
# hash = "sha256-kOhxDP1hbrrIriOXizgZoB0I+3/JWOPcOCdNeXcPJV0=";
|
||||
rev = "752c0d0a12fdce201da45852287b48382caa8c0f";
|
||||
hash = "sha256-tVu/3SF/+s+Z6ytKvuY+ZwqsXUlm40yOZ/O5kfNfUYc=";
|
||||
};
|
||||
|
||||
|
||||
|
||||
# Steps to the generated kernel config file
|
||||
# 1. git clone --depth 1 https://github.com/armbian/linux-rockchip.git -b rk-6.1-rkr1
|
||||
# 2. put https://github.com/armbian/build/blob/main/config/kernel/linux-rk35xx-vendor.config to linux-rockchip/arch/arm64/configs/rk35xx_vendor_defconfig
|
||||
# 3. run `nix develop .#fhsEnv` in this project to enter the fhs test environment defined here.
|
||||
# 4. `cd linux-rockchip` and `make rk35xx_vendor_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_vendor_config and commit it.
|
||||
#
|
||||
configfile = ./rk35xx_vendor_config;
|
||||
allowImportFromDerivation = true;
|
||||
})
|
||||
.overrideAttrs (old: {
|
||||
name = "k"; # dodge uboot length limits
|
||||
# nativeBuildInputs = old.nativeBuildInputs ++ [ubootTools];
|
||||
})
|
||||
17
hosts/fw-new/pkgs/mali-firmware/default.nix
Normal file
17
hosts/fw-new/pkgs/mali-firmware/default.nix
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
stdenv,
|
||||
fetchurl,
|
||||
}:
|
||||
stdenv.mkDerivation {
|
||||
pname = "mali-g610-firmware";
|
||||
version = "g21p0-01eac0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/JeffyCN/mirrors/raw/e08ced3e0235b25a7ba2a3aeefd0e2fcbd434b68/firmware/g610/mali_csffw.bin";
|
||||
hash = "sha256-jnyCGlXKHDRcx59hJDYW3SX8NbgfCQlG8wKIbWdxLfU=";
|
||||
};
|
||||
|
||||
buildCommand = ''
|
||||
install -Dm444 $src $out/lib/firmware/mali_csffw.bin
|
||||
'';
|
||||
}
|
||||
23
hosts/fw-new/pkgs/orangepi-firmware/default.nix
Normal file
23
hosts/fw-new/pkgs/orangepi-firmware/default.nix
Normal file
@@ -0,0 +1,23 @@
|
||||
{ fetchFromGitHub, stdenvNoCC, ... }: stdenvNoCC.mkDerivation {
|
||||
pname = "orangepi-firmware";
|
||||
version = "2024.01.24";
|
||||
dontBuild = true;
|
||||
dontFixup = true;
|
||||
compressFirmware = false;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "orangepi-xunlong";
|
||||
repo = "firmware";
|
||||
rev = "76ead17a1770459560042a9a7c43fe615bbce5e7";
|
||||
hash = "sha256-mltaup92LTGbuCXeGTMdoFloX3vZRbaUFVbh6lwveFs=";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/lib/firmware
|
||||
cp -a * $out/lib/firmware/
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user