Skip to content

Commit

Permalink
Update linux 6.9 uboot 2024.04 (#24)
Browse files Browse the repository at this point in the history
* Update linux to 6.9, uboot to 2024.04

* Use kwiboo patches for rk3566

* Force load pinetab panel module

* Try enabling panel via patch

* Update formatting

* Update CI for linux 6.9
  • Loading branch information
asonix authored Jul 1, 2024
1 parent b1c4bf5 commit 9523ce0
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 60 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
matrix:
package:
- kernel_linux_6_6_rockchip.kernel
- kernel_linux_6_8_pinetab.kernel
- kernel_linux_6_9_pinetab.kernel
- uBootRock64
- uBootRockPro64
- uBootPinebookPro
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ jobs:
matrix:
package:
- kernel_linux_6_6_rockchip.kernel
- kernel_linux_6_8_rockchip.kernel
- kernel_linux_6_8_pinetab.kernel
- kernel_linux_6_9_rockchip.kernel
- kernel_linux_6_9_pinetab.kernel
- uBootRock64
- uBootRockPro64
- uBootPinebookPro
Expand Down
12 changes: 6 additions & 6 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
};
"PineTab2" = {
uBoot = (uBoot system).uBootPineTab2;
kernel = (kernel system).linux_6_8_pinetab;
kernel = (kernel system).linux_6_9_pinetab;
extraModules = [ (bes2600 system) noZFS ];
};
"Rock64" = {
Expand Down Expand Up @@ -136,8 +136,8 @@
} // inputs.utils.lib.eachDefaultSystem (system: {
legacyPackages = {
kernel_linux_6_6_rockchip = (kernel system).linux_6_6_rockchip;
kernel_linux_6_8_rockchip = (kernel system).linux_6_8_rockchip;
kernel_linux_6_8_pinetab = (kernel system).linux_6_8_pinetab;
kernel_linux_6_9_rockchip = (kernel system).linux_6_9_rockchip;
kernel_linux_6_9_pinetab = (kernel system).linux_6_9_pinetab;
};
packages = (images system) // {
uBootQuartz64A = (uBoot system).uBootQuartz64A;
Expand Down
14 changes: 14 additions & 0 deletions pkgs/backlight.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
index 57a9abe78ee4..46db96bb88ff 100644
--- a/arch/arm64/configs/defconfig
+++ b/arch/arm64/configs/defconfig
@@ -923,7 +923,8 @@ CONFIG_DRM_POWERVR=m
CONFIG_FB=y
CONFIG_FB_EFI=y
CONFIG_FB_MODE_HELPERS=y
-CONFIG_BACKLIGHT_PWM=m
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_BACKLIGHT_PWM=y
CONFIG_BACKLIGHT_LP855X=m
CONFIG_LOGO=y
# CONFIG_LOGO_LINUX_MONO is not set
25 changes: 16 additions & 9 deletions pkgs/linux-rockchip.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ let
CHARGER_RK817 = yes;
COMMON_CLK_RK808 = yes;
COMMON_CLK_ROCKCHIP = yes;
DRM_ROCKCHIP = yes;
GPIO_ROCKCHIP = yes;
MFD_RK808 = yes;
MMC_DW = yes;
Expand Down Expand Up @@ -39,29 +40,35 @@ let
};
pinetabKernelConfig = with lib.kernel; {
BES2600 = module;
BES2600_WLAN_STDIO = yes;
BES2600_5GHZ_SUPPORT = yes;
BES2600_DEBUGFS = yes;

DRM_PANEL_BOE_TH101MB31UIG002_28A = yes;
};
in with pkgs.linuxKernel; {
linux_6_6 = pkgs.linuxPackages_6_6;
linux_6_6_rockchip = packagesFor
(kernels.linux_6_6.override { structuredExtraConfig = kernelConfig; });

linux_6_8 = pkgs.linuxPackages_6_8;
linux_6_8_rockchip = packagesFor
(kernels.linux_6_8.override { structuredExtraConfig = kernelConfig; });
linux_6_9 = pkgs.linuxPackages_6_9;
linux_6_9_rockchip = packagesFor
(kernels.linux_6_9.override { structuredExtraConfig = kernelConfig; });

linux_6_8_pinetab = packagesFor (kernels.linux_6_8.override {
linux_6_9_pinetab = packagesFor (kernels.linux_6_9.override {
argsOverride = {
src = pkgs.fetchFromGitHub {
owner = "dreemurrs-embedded";
repo = "linux-pinetab2";
rev = "b8c008ccf5a0d49bb783d94ebb14e6b1808e055b";
sha256 = "1F4GB1U+RSRjTSE8yCFL+Psq21viu+nRxDizPX9vTRc=";
rev = "40ef75b076fa34b2cde70a76770fe456fd425f7f";
sha256 = "wraIt2kBwgMNMzFX2DiLhPZGM2Z/2xLqUhS4vRL50vs=";
};
version = "6.8.0-danctnix1";
modDirVersion = "6.8.0-danctnix1";
version = "6.9.6-danctnix1";
modDirVersion = "6.9.6-danctnix1";
};
kernelPatches = [{
name = "Enable backlight in defconfig";
patch = ./backlight.patch;
}];
structuredExtraConfig = kernelConfig // pinetabKernelConfig;
});
}
Expand Down
54 changes: 15 additions & 39 deletions pkgs/uboot-rockchip.nix
Original file line number Diff line number Diff line change
@@ -1,56 +1,24 @@
{ pkgs, stdenv, lib, fetchpatch, fetchFromGitHub, buildUBoot, buildPackages }:

let
buildPatchedUBoot = { defconfig, BL31, ROCKCHIP_TPL ? "" }:
buildPatchedUBoot =
{ defconfig, BL31, ROCKCHIP_TPL ? "", extraPatches ? [ ] }:
let
inherit defconfig BL31 ROCKCHIP_TPL;
inherit defconfig BL31 ROCKCHIP_TPL extraPatches;
src = fetchFromGitHub {
owner = "u-boot";
repo = "u-boot";
rev = "v2023.10";
sha256 = "f0xDGxTatRtCxwuDnmsqFLtYLIyjA5xzyQcwfOy3zEM=";
rev = "v2024.04";
sha256 = "IlaDdjKq/Pq2orzcU959h93WXRZfvKBGDO/MFw9mZMg=";
};
version = "v2023.10-69-g0bc339ffa6"; # git describe --long
version = "v2024.04-0-g25049ad5608"; # git describe --long
in buildUBoot {
src = src;
version = version;
defconfig = defconfig;
filesToInstall = [ "u-boot-rockchip.bin" ];

patches = [
(fetchpatch {
name = "quartz64.patch";
url =
"https://github.com/Kwiboo/u-boot-rockchip/compare/4459ed60cb1e0562bc5b40405e2b4b9bbf766d57...0bc339ffa6f804d51c5c5292d8ff69c4d79614d3.diff";
sha256 = "ui77Nm3IS6PUzaMagqyyZDitklot8MmeYg27mVPV7Pc=";
})
./ramdisk_addr_r.patch
];

buildInputs = with buildPackages; [
ncurses # tools/kwboot
libuuid # tools/mkeficapsule
gnutls # tools/mkeficapsule
openssl # tools/imagetool
];

nativeBuildInputs = with buildPackages; [
ncurses # tools/kwboot
bc
bison
dtc
flex
openssl
(python3.withPackages (p: [
p.libfdt
p.setuptools # for pkg_resources
p.pyelftools
]))
swig
which # for scripts/dtc-version.sh
];

makeFlags = [ "CROSS_COMPILE=${stdenv.cc.targetPrefix}" ];
extraPatches = [ ./ramdisk_addr_r.patch ] ++ extraPatches;

BL31 = BL31;
ROCKCHIP_TPL = ROCKCHIP_TPL;
Expand Down Expand Up @@ -80,6 +48,14 @@ let
};
in buildPatchedUBoot {
inherit defconfig;
extraPatches = [
(fetchpatch {
name = "quartz64.patch";
url =
"https://github.com/Kwiboo/u-boot-rockchip/compare/25049ad560826f7dc1c4740883b0016014a59789...830cfcfdf54a1f08a3ca7fc17e69b4bc18cece50.diff";
sha256 = "5mLjKiRpfnLCNVnyNuxBcDmmXg8xwcki3mmLisS4YbU=";
})
];
BL31 = (rkbin + "/bin/rk35/rk3568_bl31_v1.43.elf");
ROCKCHIP_TPL = (rkbin + "/bin/rk35/rk3566_ddr_1056MHz_v1.18.bin");
};
Expand Down

0 comments on commit 9523ce0

Please sign in to comment.