Skip to content

Instantly share code, notes, and snippets.

@samueldr
Created July 14, 2020 01:49
Show Gist options
  • Save samueldr/5b2faeeff9d8fe746d97b04681f76e36 to your computer and use it in GitHub Desktop.
Save samueldr/5b2faeeff9d8fe746d97b04681f76e36 to your computer and use it in GitHub Desktop.
diff --git a/devices/google-blueline/kernel-mainline/default.nix b/devices/google-blueline/kernel-mainline/default.nix
index b47c4615c497..e2b2a62c614b 100644
--- a/devices/google-blueline/kernel-mainline/default.nix
+++ b/devices/google-blueline/kernel-mainline/default.nix
@@ -19,7 +19,6 @@ in
configfile = "${src}/arch/arm64/configs/blueline_defconfig";
file = "Image.gz-dtb";
- hasDTB = true;
version = "5.8.0-rc4-mainline";
src = src;
@@ -27,7 +26,7 @@ in
isModular = false; # TODO ???
}).overrideAttrs({ postInstall ? "", postPatch ? "", nativeBuildInputs, ... }: {
- installTargets = [ "Image.gz" "zinstall" "Image.gz-dtb" "install" ];
+ installTargets = [ "Image.gz" "zinstall" "install" ];
postPatch = postPatch + ''
# FIXME : factor out
(
@@ -47,7 +46,17 @@ in
'';
nativeBuildInputs = nativeBuildInputs ++ [ dtc buildPackages.cpio ];
+ # This needs to be factored out if it is the correct way to build
+ # a device-specific FDT.
postInstall = postInstall + ''
- cp -v "$buildRoot/arch/arm64/boot/Image.gz-dtb" "$out/"
+ (PS4=" $ "; set -x
+ cp -v "$buildRoot/arch/arm64/boot/Image.gz" "$out/"
+ mkdir -p $out/dtbs/
+ make $makeFlags "''${makeFlagsArray[@]}" qcom/sdm845-blueline.dtb
+ cp -v $buildRoot/arch/arm64/boot/dts/qcom/sdm845-blueline.dtb $out/dtbs/
+
+ cp -v "$buildRoot/arch/arm64/boot/Image.gz" "$out/Image.gz-dtb"
+ cat arch/arm64/boot/dts/qcom/sdm845-blueline.dtb >> "$out/Image.gz-dtb"
+ )
'';
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment